logbook

Name

logbook -- Access Logbooks from Tcl

Synopsis


         
lappend auto_path [file join $::env(DAQROOT) TclLibs]
package require logbook

      

logbook::logbook create filename experiment spokesperson purpose

set instance [logbook::logbook open filename]

set logbookTempdir [logbook::logbook tempdir]

DESCRIPTION

The logbook package provides access to NSCL logbook databases. It provides the logbook::logbook command which can create and access databases.

A disadvantage of the logbook package is, that while it provides an object oriented interface to the C++ API, it places the burden of resource management directly on the script author. Generally, this is terra incongnita for a Tcl programmer. If possible We recommend that you use the logbookadmin package instead as that procedural interface does storage management for you.

SUBCOMMANDS

The logbook package provides a single command logbook::logbook which is the base command of a command ensemble with three subcommands:

create filename experiment spokesperson purpose

Creates a new logbook database in filename. filename must not yet exist. experiment should be the experiment identifier, usually assigned by the institution that scheduled the experiment, spokesperson should be the person who proposed the experiment, purpose should be a brief statement of purpose for the experiment.

open filename

Provides access to the logbook database in the file filename. This access is provided in the form of a logbook instance command. This, is a command ensmeble whose subcommands allow you to manipulate the logbook. See logbookinstance for more about logbook instances and what you can do with them.

tempdir

Returns a path to the directory the logbook system uses to hold files it need to create. If your software needs to create files that don't require preservation beyond the lifetime of your script place them here. The files placed here are normally files for which there is only a transient need (e.g. rendered markdown which will then be passed to a browser or image files needed in the rendering of markdown text).