 |
Belle II Software
release-05-02-19
|
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");
virtual void initialize()
Module functions to be called from main process.
ERecordType type() const
Get record type.
const static unsigned int c_MaxEventSize
maximal EvtMessage size, in bytes (200MB).
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Class to manage streamed object.
virtual void terminate()
This method is called at the end of the event processing.
const std::vector< std::string > & getInputFilesOverride() const
Return overriden input file names, or empty vector if none were set.
virtual void event()
This method is the core of the module.
int restoreDataStore(EvtMessage *msg)
Restore DataStore objects from EvtMessage.
A class definition of an input module for Sequential ROOT I/O.
Abstract base class for different kinds of events.
virtual void beginRun()
Module functions to be called from event process.
virtual void endRun()
This method is called if the current run ends.
static Environment & Instance()
Static method to get a reference to the Environment instance.
Stream/restore DataStore objects to/from EvtMessage.
A class to manage I/O for a chain of blocked files.