Module to write a Root Tree (or ASCII table) for FD and SD data. More...
#include <RecDataWriter.h>
Public Types | |
enum | ResultFlag { eSuccess, eFailure, eBreakLoop, eContinueLoop } |
Flag returned by module methods to the RunController. More... | |
enum | VersionInfoType { eFilename = 1, eRevisionNumber = 2, eDate = 3, eTime = 4, eLastEditor = 5 } |
Different types of version info that can be retrieved from GetVersionInfo. More... | |
Public Member Functions | |
fwk::VModule::ResultFlag | Finish () override |
Finish: invoked at end of the run (NOT end of the event) More... | |
utl::Stopwatch & | GetStopwatch () |
const utl::Stopwatch & | GetStopwatch () const |
std::string | GetVersionInfo (const VersionInfoType v) const |
Retrieve different sorts of module version info. More... | |
fwk::VModule::ResultFlag | Init () override |
Initialize: invoked at beginning of run (NOT beginning of event) More... | |
void | InitTiming () |
RecDataWriter () | |
fwk::VModule::ResultFlag | Run (evt::Event &event) override |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
virtual | ~RecDataWriter () |
Static Public Member Functions | |
static std::string | GetResultFlagByName (const ResultFlag flag) |
Protected Types | |
enum | InfoLevel { eInfoNone = 0, eInfoFinal = 1, eInfoIntermediate = 2, eInfoDebug = 3 } |
Protected Attributes | |
int | fInfoLevel = 0 |
Private Member Functions | |
bool | PrepareAsciiFile () |
bool | PrepareRecEventAndRootFile () |
bool | ReadAsciiConfig (utl::Branch &topB) |
bool | ReadConfig () |
bool | ReadRootConfig (utl::Branch &topB) |
REGISTER_MODULE ("RecDataWriterNG", RecDataWriter) | |
Private Attributes | |
otoa::Offline2ADST * | fADSTConverter = nullptr |
ADST::AsciiConverter * | fAsciiConverter = nullptr |
std::string | fAsciiDataMode |
int | fAsciiMinFdRecLevel = 0 |
int | fAsciiMinSdRecLevel = 0 |
RecEventFile::Mode | fAsciiOutputFileMode = RecEventFile::eWrite |
std::string | fAsciiOutputFileName |
int | fNWritten = 0 |
int | fNWrittenQuadruple = 0 |
int | fNWrittenStereo = 0 |
int | fNWrittenTriple = 0 |
RecEvent * | fRecEvent = nullptr |
RecEventFile * | fRecEventFile = nullptr |
RecEventFile::Mode | fRootOutputFileMode = RecEventFile::eWrite |
std::string | fRootOutputFileName |
int | fVerbosity = 0 |
bool | fWriteASCII = false |
bool | fWriteROOT = false |
Module to write a Root Tree (or ASCII table) for FD and SD data.
Definition at line 80 of file RecDataWriter.h.
|
protectedinherited |
|
inherited |
Flag returned by module methods to the RunController.
Enumerator | |
---|---|
eSuccess |
Report success to RunController. |
eFailure |
Report failure to RunController, causing RunController to terminate execution. |
eBreakLoop |
Break current loop. It works for nested loops too! |
eContinueLoop |
Skip remaining modules in the current loop and continue with next iteration of the loop. |
|
inherited |
RecDataWriterNG::RecDataWriter::RecDataWriter | ( | ) |
Definition at line 154 of file RecDataWriter.cc.
|
virtual |
Definition at line 159 of file RecDataWriter.cc.
References fADSTConverter, and fRecEvent.
|
overridevirtual |
Finish: invoked at end of the run (NOT end of the event)
This method is for things that should be done at the end of the run (for example, closing files or writing out histograms) {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 281 of file RecDataWriter.cc.
References fwk::VModule::eSuccess, fADSTConverter, fAsciiConverter, otoa::Offline2ADST::FinishDetectorAndFileInfo(), fNWritten, fNWrittenQuadruple, fNWrittenStereo, fNWrittenTriple, fRecEventFile, fVerbosity, otoa::Offline2ADST::GetDetectorGeometry(), otoa::Offline2ADST::GetFileInfo(), INFO, and utl::String::Plural().
|
staticinherited |
Definition at line 8 of file VModule.cc.
References fwk::VModule::eBreakLoop, fwk::VModule::eContinueLoop, fwk::VModule::eFailure, and fwk::VModule::eSuccess.
Referenced by fwk::RunController::DoNextInSequence(), fwk::RunController::FinishBranch(), and fwk::RunController::InitBranch().
|
inlineinherited |
Definition at line 106 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inlineinherited |
Definition at line 107 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inherited |
Retrieve different sorts of module version info.
Definition at line 26 of file VModule.cc.
Referenced by fwk::CentralConfig::GetConfig(), ThresholdCalculatorKG::ThresholdCalculator::Init(), fdDoubleBumpFinder::FdDoubleBumpFinder::Init(), LaserGeneratorNA::LaserGenerator::Init(), LaserLightSimulatorNA::LaserLightSimulator::Init(), FdElectronicsSimulatorOG::FdElectronicsSimulator::Init(), TelescopeSimulatorKG::TelescopeSimulator::Init(), TelescopeSimulatorKG2::TelescopeSimulator::Init(), SdSimpleSimKG::SdSimpleSim::Init(), ShowerPhotonGeneratorOG::ShowerPhotonGenerator::Init(), and testRunController::testModuleVersionInfo().
|
overridevirtual |
Initialize: invoked at beginning of run (NOT beginning of event)
This method is for things that should be done once at the beginning of a run (for example, booking histograms, performing calculations that need to be done only once, initializing parameters) {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 167 of file RecDataWriter.cc.
References otoa::Offline2ADST::Config(), fwk::VModule::eFailure, ERROR, fwk::VModule::eSuccess, fADSTConverter, fAsciiMinFdRecLevel, fAsciiMinSdRecLevel, fRootOutputFileName, INFO, utl::m, utl::nanometer, ns, and ReadConfig().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Definition at line 508 of file RecDataWriter.cc.
References io::eAppend, ERROR, io::eWrite, fAsciiConverter, fAsciiDataMode, fAsciiMinFdRecLevel, fAsciiMinSdRecLevel, fAsciiOutputFileMode, fAsciiOutputFileName, and out.
Referenced by Run().
|
private |
Definition at line 487 of file RecDataWriter.cc.
References fRecEvent, fRecEventFile, fRootOutputFileMode, fRootOutputFileName, and fWriteROOT.
Referenced by Run().
|
private |
Definition at line 451 of file RecDataWriter.cc.
References io::eAppend, ERROR, io::eWrite, fAsciiDataMode, fAsciiMinFdRecLevel, fAsciiMinSdRecLevel, fAsciiOutputFileMode, fAsciiOutputFileName, fWriteASCII, utl::Branch::Get(), utl::Branch::GetChild(), and INFO.
Referenced by ReadConfig().
|
private |
Definition at line 317 of file RecDataWriter.cc.
References otoa::Offline2ADST::Config(), fwk::VModule::eFailure, ERROR, fADSTConverter, fVerbosity, INFO, G4StationSimulatorOG::p, ReadAsciiConfig(), ReadRootConfig(), and otoa::Config::SetVerbosity().
Referenced by Init().
|
private |
Definition at line 422 of file RecDataWriter.cc.
References io::eAppend, ERROR, io::eWrite, fRootOutputFileMode, fRootOutputFileName, fWriteROOT, utl::Branch::GetChild(), utl::Branch::GetData(), and INFO.
Referenced by ReadConfig().
|
private |
|
overridevirtual |
Run: invoked once per event.
This method is for things that should be done once per event {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 237 of file RecDataWriter.cc.
References otoa::Offline2ADST::Convert(), fwk::VModule::eFailure, fwk::VModule::eSuccess, fADSTConverter, fAsciiConverter, fNWritten, fNWrittenQuadruple, fNWrittenStereo, fNWrittenTriple, fRecEvent, fRecEventFile, fWriteASCII, fWriteROOT, PrepareAsciiFile(), and PrepareRecEventAndRootFile().
|
inlineinherited |
Definition at line 98 of file VModule.h.
References fwk::VModule::fStopwatch, fwk::VModule::Run(), utl::Stopwatch::Start(), and utl::Stopwatch::Stop().
Referenced by fwk::RunController::DoNextInSequence().
|
private |
Definition at line 105 of file RecDataWriter.h.
Referenced by Finish(), Init(), ReadConfig(), Run(), and ~RecDataWriter().
|
private |
Definition at line 112 of file RecDataWriter.h.
Referenced by Finish(), PrepareAsciiFile(), and Run().
|
private |
Definition at line 111 of file RecDataWriter.h.
Referenced by PrepareAsciiFile(), and ReadAsciiConfig().
|
private |
Definition at line 113 of file RecDataWriter.h.
Referenced by Init(), PrepareAsciiFile(), and ReadAsciiConfig().
|
private |
Definition at line 114 of file RecDataWriter.h.
Referenced by Init(), PrepareAsciiFile(), and ReadAsciiConfig().
|
private |
Definition at line 109 of file RecDataWriter.h.
Referenced by PrepareAsciiFile(), and ReadAsciiConfig().
|
private |
Definition at line 108 of file RecDataWriter.h.
Referenced by PrepareAsciiFile(), and ReadAsciiConfig().
|
protectedinherited |
Definition at line 123 of file VModule.h.
Referenced by RdChannelASCIINoiseImporterRD::RdChannelASCIINoiseImporterRD::Init(), Rd2dLDFFitter::Rd2dLDFFitter::Init(), RdChannelNoiseImporter_AERA::RdChannelNoiseImporter_AERA::Init(), and Rd2dLDFFitter::Rd2dLDFFitter::Run().
|
private |
Definition at line 118 of file RecDataWriter.h.
|
private |
Definition at line 121 of file RecDataWriter.h.
|
private |
Definition at line 119 of file RecDataWriter.h.
|
private |
Definition at line 120 of file RecDataWriter.h.
|
private |
Definition at line 123 of file RecDataWriter.h.
Referenced by PrepareRecEventAndRootFile(), Run(), and ~RecDataWriter().
|
private |
Definition at line 104 of file RecDataWriter.h.
Referenced by Finish(), PrepareRecEventAndRootFile(), and Run().
|
private |
Definition at line 102 of file RecDataWriter.h.
Referenced by PrepareRecEventAndRootFile(), and ReadRootConfig().
|
private |
Definition at line 101 of file RecDataWriter.h.
Referenced by Init(), PrepareRecEventAndRootFile(), and ReadRootConfig().
|
private |
Definition at line 116 of file RecDataWriter.h.
Referenced by Finish(), and ReadConfig().
|
private |
Definition at line 110 of file RecDataWriter.h.
Referenced by ReadAsciiConfig(), and Run().
|
private |
Definition at line 103 of file RecDataWriter.h.
Referenced by PrepareRecEventAndRootFile(), ReadRootConfig(), and Run().