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.
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-10-00 is v1r22p4. Changes
since previous release (tdaq-01-09-01, tag v1r17p20):
-
Raw File formats:
- File format version continues to be version 5 (since 2008).
- New feature: Checksum calculation added
- Apart from this, same comments as in previous release:
- DetectorMask is TWO 32-bit words in version 5
- No backward compatibility with old format version 1 (before 2003)
- Backward compatibility with format version 2 (2003-2007), when Detector Mask defined as one 32 bit word
- FileConverter application is there to convert files with format 2 into files with format 5
-
Merging Raw Files (new):
- New MergedRawFile class to implement Tier0's request for a way to merge raw files into bigger files
- A merged file consists of a Header on top, and then the
individual raw files, appended one after the other.
The MergedRawFile class defines how to serialise, deserialise
and ask questions to the Merged File Header.
- A C++ example on merging a list of files is the
testMergingFile
executable. You need to give it as arguments: a file containing the list of files to merge, a merged-file limit (MB), and (optionally) the output merged-file name-core. If the merged-file limit is 0, this means: merge all the files given into one big merged file.
-
Raw File Name convnetion (changed):
- Got rid of the AgreedFileName() method and
src/FileNameParameters.h for the definition of global constants.
- This and more functionality is now implemented in the new
RawFileName class, which describes filenames of raw data.
Use this to contruct, interpret and modify RAW file-names
-
Example:
- replace:
EventStorage/AgreedFileName.h
with
EventStorage/RawFileName.h
- replace:
std::string fileName=daq::AgreedFileName(fileTag,m_runNumber,streamType,
streamName,lumiBlockNumber,appName);
with:
daq::RawFileName fileNameObj(projectTag,
fileTag, m_runNumber, streamType,
streamName,lumiBlockNumber,appName);
std::string fileName= fileNameObj.fileNameCore();
or with (if you do not care about the filename being "iterpretable" for runNumber, projectTag etc):
daq::RawFileName fileNameObj(myWhateverFileName);
std::string fileName= fileNameObj.fileNameCore();
-
projectTag is a string like "data_test", or whatever (if you leave it empty, you'll get "data_test");
it's the 1st field that defines a dataset.
Your filenames are going to
be named:
projectTag.runNumber.streamtType_streamName.daq.RAW._lbLUMIBlockNumber._AppName._0001.data
Note: you notice that the fileTag
is required in the constructor, but it's not
part of the fileName. That's because the fileName convention was agreed after the release
was built, and changes on the constructor interface are not patchable. So, anything you use
for fileTag
is irrelevant.
-
Data Reader (changed):
- Re-desgined this part of the library to be able to read
individual Raw files
and merged Raw files in "singlets", sequences or in random
access mode (via indexes) in a transparent way.
- For the end user: PickDataReader helper function is
still used to get such a Reader-class.
- The
readData
test executable is an example showing
that merged or individual RAW files are read transparentely for the user
More detailed description of changes can be found in doc/ChangeLog