9 #include <daq/storage/modules/SeqRootMergerModule.h>
11 #include <framework/core/Environment.h>
30 B2INFO(
"SeqRootMerger: Constructor done.");
34 SeqRootMergerModule::~SeqRootMergerModule()
42 for (
size_t i = 0; i < inputFiles.size(); i++) {
43 m_file.push_back(
new SeqFile(inputFiles[i].c_str(),
"r"));
49 int SeqRootMergerModule::readFile()
51 B2INFO(
"SeqRootMerger: initialize() started.");
55 if (m_file.size() == 0)
return 0;
56 int i = rand() % m_file.size();
61 if (evtmsg->
type() == MSG_STREAMERINFO) {
62 B2INFO(
"Reading StreamerInfo");
69 m_file.erase(m_file.begin() + i);
84 B2INFO(
"SeqRootMerger: beginRun called.");
89 B2INFO(
"SeqRootMerger: endRun done.");
95 B2INFO(
"SeqRootMerger: terminate called");
Stream/restore DataStore objects to/from EvtMessage.
int restoreDataStore(EvtMessage *msg)
Restore DataStore objects from EvtMessage.
const std::vector< std::string > & getInputFilesOverride() const
Return overriden input file names, or empty vector if none were set.
static Environment & Instance()
Static method to get a reference to the Environment instance.
Class to manage streamed object.
ERecordType type() const
Get record type.
static const unsigned int c_MaxEventSize
maximal EvtMessage size, in bytes (200MB).
A class to manage I/O for a chain of blocked files.
A class definition of an input module for Sequential ROOT I/O.
virtual void event()
This method is the core of the module.
virtual void initialize()
Module functions to be called from main process.
virtual void beginRun()
Module functions to be called from event process.
virtual void terminate()
This method is called at the end of the event processing.
virtual void endRun()
This method is called if the current run ends.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.