#include <RdChannelNoiseImporter_AERA.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 () |
fwk::VModule::ResultFlag | Run (evt::Event &event) override |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
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 | CheckMatchingChannel (const rdet::Channel &detChannel, const rdet::Channel &replacementChannel) |
fwk::VModule::ResultFlag | checkSetup () |
int | GetNoiseEventNumber (evt::Event &event, RadioFileIO *RadioFileIORead, TBranch *const evtSecBranch, TTree *const IOLibTree, unsigned int NumberEvents, utl::UTCDateTime eventTime) |
std::string | GetNoiseFileName (const utl::UTCDateTime &eventTime, utl::TimeStamp &noiseTimeStamp) |
bool | GetNoiseFileNameAtTime (const utl::UTCDateTime &dateTime, const utl::UTCDateTime &startingDay, std::string &NoiseImportfilename) |
REGISTER_MODULE ("RdChannelNoiseImporter_AERA", RdChannelNoiseImporter_AERA) | |
void | RemovePedestal (revt::ChannelADCTimeSeries &timeSeries) |
void | RemovePedestal (std::vector< int > &timeSeries) |
Private Attributes | |
std::string | fEvtSelInNoiseFile |
bool | fExpectSubDirectories = false |
std::string | fFilenamePrefix |
std::string | fFilenameSuffix |
double | fMaxTimeDifference = 10 * utl::minute |
int | fNoiseEvtNr = -1 |
std::string | fNoiseFilePath |
std::string | fNoiseFileSelection |
unsigned int | fNumberOfRejectedStationsWithoutNoise = 0 |
utl::RandomEngine::RandomEngineType * | fRandomEngine = nullptr |
utl::TimeStamp | fRandomNoiseTimeIntervalStart = 0 |
utl::TimeStamp | fRandomNoiseTimeIntervalStop = 0 |
bool | fRejectStationsWithoutNoiseInformation = true |
bool | fReplaceDataWithNoise = false |
std::string | fTimeIntervalInFile |
Definition at line 40 of file RdChannelNoiseImporter_AERA.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 |
|
private |
Definition at line 722 of file RdChannelNoiseImporter_AERA.cc.
References utl::abs(), utl::degree, rdet::Channel::GetAntennaTypeName(), rdet::Channel::GetBitDepth(), rdet::Channel::GetChannelType(), rdet::Channel::GetOrientationAzimuth(), rdet::Channel::GetOrientationZenith(), and rdet::Channel::GetSamplingFrequency().
Referenced by Run().
|
private |
Definition at line 485 of file RdChannelNoiseImporter_AERA.cc.
References fwk::VModule::eFailure, ERROR, fwk::VModule::eSuccess, and fNoiseFilePath.
|
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 452 of file RdChannelNoiseImporter_AERA.cc.
References fwk::VModule::eSuccess, fNumberOfRejectedStationsWithoutNoise, INFO, and out.
|
private |
Definition at line 543 of file RdChannelNoiseImporter_AERA.cc.
References utl::abs(), fEvtSelInNoiseFile, fMaxTimeDifference, fNoiseEvtNr, fRandomEngine, fTimeIntervalInFile, utl::UTCDateTime::GetHour(), utl::UTCDateTime::GetMinute(), INFOIntermediate, and utl::minute.
Referenced by Run().
|
private |
Definition at line 649 of file RdChannelNoiseImporter_AERA.cc.
References fNoiseFilePath, fNoiseFileSelection, fRandomEngine, fRandomNoiseTimeIntervalStart, fRandomNoiseTimeIntervalStop, fTimeIntervalInFile, utl::TimeStamp::GetGPSNanoSecond(), utl::TimeStamp::GetGPSSecond(), utl::UTCDateTime::GetHour(), GetNoiseFileNameAtTime(), utl::UTCDateTime::GetTimeStamp(), INFO, and INFOIntermediate.
Referenced by Run().
|
private |
Definition at line 500 of file RdChannelNoiseImporter_AERA.cc.
References fExpectSubDirectories, fFilenamePrefix, fFilenameSuffix, filename, fNoiseFilePath, fTimeIntervalInFile, utl::UTCDate::GetDay(), utl::UTCDateTime::GetHour(), utl::UTCDate::GetMonth(), utl::UTCDate::GetYear(), INFOFinal, and WARNING.
Referenced by GetNoiseFileName().
|
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 37 of file RdChannelNoiseImporter_AERA.cc.
References fwk::RandomEngineRegistry::eDetector, fEvtSelInNoiseFile, fExpectSubDirectories, fFilenamePrefix, fFilenameSuffix, fwk::VModule::fInfoLevel, fMaxTimeDifference, fNoiseEvtNr, fNoiseFilePath, fNoiseFileSelection, fRandomEngine, fRandomNoiseTimeIntervalStart, fRandomNoiseTimeIntervalStop, fRejectStationsWithoutNoiseInformation, fReplaceDataWithNoise, fTimeIntervalInFile, utl::Branch::GetChild(), utl::Branch::GetData(), fwk::CentralConfig::GetInstance(), fwk::CentralConfig::GetTopBranch(), INFO, and INFODebug.
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
|
private |
Definition at line 462 of file RdChannelNoiseImporter_AERA.cc.
References utl::abs(), utl::Trace< T >::Begin(), utl::Trace< T >::End(), utl::Trace< T >::GetSize(), and utl::TraceAlgorithm::Mean().
Referenced by Run().
|
private |
Definition at line 472 of file RdChannelNoiseImporter_AERA.cc.
References utl::abs().
|
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 74 of file RdChannelNoiseImporter_AERA.cc.
References utl::abs(), rdet::Station::ChannelsBegin(), rdet::Station::ChannelsEnd(), CheckMatchingChannel(), fwk::VModule::eContinueLoop, revt::eHardwareMismatch, revt::eNoNoiseDataAvailable, ERROR, fwk::VModule::eSuccess, fEvtSelInNoiseFile, fMaxTimeDifference, fNoiseFileSelection, fNumberOfRejectedStationsWithoutNoise, fRandomEngine, fRejectStationsWithoutNoiseInformation, fReplaceDataWithNoise, rdet::Channel::GetAntennaTypeName(), rdet::RDetector::GetBadStationReason(), rdet::RDetector::GetFullStationList(), evt::Event::GetHeader(), rdet::Channel::GetId(), revt::Channel::GetId(), rdet::Station::GetId(), GetNoiseEventNumber(), GetNoiseFileName(), det::Detector::GetRDetector(), utl::Trace< T >::GetSize(), rdet::RDetector::GetStation(), evt::Header::GetTime(), evt::Event::HasREvent(), INFODebug, INFOFinal, INFOIntermediate, revt::Channel::IsActive(), utl::minute, std::pow(), RemovePedestal(), utl::TimeStamp::SetGPSTime(), det::Detector::Update(), and WARNING.
|
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 61 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseEventNumber(), Init(), and Run().
|
private |
Definition at line 51 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseFileNameAtTime(), and Init().
|
private |
Definition at line 52 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseFileNameAtTime(), and Init().
|
private |
Definition at line 53 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseFileNameAtTime(), and Init().
|
protectedinherited |
Definition at line 123 of file VModule.h.
Referenced by RdChannelASCIINoiseImporterRD::RdChannelASCIINoiseImporterRD::Init(), Rd2dLDFFitter::Rd2dLDFFitter::Init(), Init(), and Rd2dLDFFitter::Rd2dLDFFitter::Run().
|
private |
Definition at line 64 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseEventNumber(), Init(), and Run().
|
private |
Definition at line 62 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseEventNumber(), and Init().
|
private |
Definition at line 50 of file RdChannelNoiseImporter_AERA.h.
Referenced by checkSetup(), GetNoiseFileName(), GetNoiseFileNameAtTime(), and Init().
|
private |
Definition at line 49 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseFileName(), Init(), and Run().
|
private |
Definition at line 63 of file RdChannelNoiseImporter_AERA.h.
|
private |
Definition at line 66 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseEventNumber(), GetNoiseFileName(), Init(), and Run().
|
private |
Definition at line 57 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseFileName(), and Init().
|
private |
Definition at line 58 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseFileName(), and Init().
|
private |
Definition at line 55 of file RdChannelNoiseImporter_AERA.h.
|
private |
Definition at line 56 of file RdChannelNoiseImporter_AERA.h.
|
private |
Definition at line 54 of file RdChannelNoiseImporter_AERA.h.
Referenced by GetNoiseEventNumber(), GetNoiseFileName(), GetNoiseFileNameAtTime(), and Init().