Introduction
EventStorage package contains a library used by several DAQ
applications (ROS, SFI, SFO) to write data files. The library is also
used by offline software to write simulation output in the form of
ByteStream.
- the EventStorage library is dealing with the files (and their format) in which we store events. The document describing the library and the content of each Raw File (header, metadata content, filename conventions, etc) is found at: https://edms.cern.ch/document/580290/5
- The format of the individual events themselves are following the eformat document: https://edms.cern.ch/document/445840/4.0c
The corresponding implementation is in the eformat library.
This package also contains an interface for reading data files
(DataReader) and some implementations of it. Those are used by the
Offline Software and by test programs of the DAQ.
Tag of EventStorage for release tdaq-01-15-00 is EventStorage-01-30-02. Changes
since previous release (tdaq-01-12-00, tag v1r25p7):
-
Introduction of a FileNameCallback Interface. This interace defines a way files are named and provides a method which can be called in order to get the next file name in a sequence. The RawFileName class has been altered to implement this interface, and an internal class SimpleFileName is present inside DataWriter, which is internally used by the third constructor below.
-
API changes in the DataWriter class. Constructors:
-
//The preferred way to create a DataWriter Object is now:
//first create a RawFileName object
daq::RawFileName my_fname(...
//and pass it to the DataWriter (by reference) in the second parameter. Please note that the metadata (project, Stream, etc) is now mandatory for the constructor.
DataWriter dw(writePath,&my_fname,rPar,project,StreamType,StreamName,stream,LumiBlockNumber,apName,fmds);
-
//Backward compatible way:
DataWriter dw(writePath,fName,rPar,fmds,1); //(second parameter is string according to the TDAQ online filename rules)
-
//For offline people, as requested, the following constructor will work (But note that also here, the metadata information is now a mandatory part of the constructor):
DataWriter dw(writePath,freename_string,rPar,project,StreamType,StreamName,stream,LumiBlockNumber,apName,fmds);
-
More fine-grained Exceptions types:
DataReader
ES_SquenceNextFileMissing
ES_AllocatingMemoryFailed
ES_AllocatedMemoryTooLittle
ES_NoEndOfFileRecord
ES_WrongEventSize
ES_NoEventFound
ES_OutOfFileBoundary
ES_WrongFileFormat
ES_InternalError
DataWriter
ES_SingleFile
ES_SingleFileAlreadyExists
-
Changed MetaData behavior for RAW files: Reserved Metadata fields (streamTag, LB, GUID etc) are no longer returned in the freeMetaDatastrings. These fields can be accessed via dedicated methods:
unsigned int runNumber() const ;
uint32_t lumiblockNumber();
std::string stream();
std::string projectTag();
More detailed description of changes can be found in doc/ChangeLog