The C++ Analyzer uses simple ASCII text files to store database information. There is one file for each analysis module. The name of each file is composed as follows:
db_< apparatus-name >.< detector-name >.dat
For example, a Cherenkov detector named "a1" which is part of the Left HRS spectrometer, named "L", would be associated with a database file named
There is one special file, named
db_run.dat, the contains the "run database", a collection of run-specific parameters such as beam energy and spectrometer momentum and angle settings.
All of the above database files should be stored in a location that can be modified by the user, for instance in
~/DB. The environment variable
DB_DIR must be defined to point to this top-level database directory. Since database parameters change with time, database files are organized in time-dependent subdirectories within
$DB_DIR. The name of each subdirectory has the form
DD represent the year, month, and day, respectively, of the date that is the start of the validity of the entries. Upon initialization, the Analyzer locates the most appropriate time-dependent subdirectory based on the contents of
$DB_DIR and the time-stamp of the run to be replayed. Often there is only one time-dependent subdirectory per experiment, but if significant changes occur during an experiment, it may be appropriate to create several directories. A finer division of time-dependent information can be provided by timestamps within each database file. This is especially true for the run database file which frequently will have many time-stamped sections.
For example, an experiment running in April and May of 2004 could create a database subdirectory
~/DB/20040401 and set
DB_DIR=~/DB. Other files supporting the replay of this experiment would reside in an experiment-specific directory, usually