Public Member Functions | |
BeamlineRawInputDriver (const fhicl::ParameterSet &pset, art::ProductRegistryHelper &help, const art::SourceHelper &pm) | |
virtual | ~BeamlineRawInputDriver () |
void | closeCurrentFile () |
Close currently opened file. More... | |
bool | readFile (const std::string &filename, art::FileBlock *&fileblock) |
bool | readNext (art::RunPrincipal *const &inR, art::SubRunPrincipal *const &inSR, art::RunPrincipal *&outR, art::SubRunPrincipal *&outSR, art::EventPrincipal *&outE) |
Read and fill Run, SubRun and/or Event as might be appropriate. More... | |
void | reconfigure (const fhicl::ParameterSet &pset) |
Private Member Functions | |
void | commenceRun (art::RunPrincipal *&outRun) |
start a new run More... | |
void | commenceSubRun (art::SubRunPrincipal *&outSubRun) |
start a new subrun More... | |
LariatFragment * | loadSpillFragments (TBranch *fragBranch, unsigned int index) |
load the artdaq spill fragments from the input file More... | |
std::vector< TDUFragment * > | loadTDUFragments (TBranch *tduBranch, unsigned int index) |
load the artdaq TDU fragments from the input file More... | |
LariatFragment * | getSpillFrag (const SpillWrapper *spillWrapper) |
get the lariat fragment from the artdaq fragments More... | |
bool | makeSpill (art::RunPrincipal *const &inRun, art::SubRunPrincipal *const &inSubRun, art::RunPrincipal *&outRun, art::SubRunPrincipal *&outSubRun) |
make a new spill More... | |
void | makeEvent (art::EventPrincipal *&outEvent) |
make a new event and place the digits within More... | |
Private Attributes | |
art::InputTag | fInputSpillTag |
art::InputTag | fInputTDUTag |
std::string | fConfigName |
std::string | fTriggerName |
std::string | fToFName |
std::string | fWCName |
std::string | fCherenkovName |
std::string | fMuonStackName |
std::string | fPaddleDigitName |
std::string | fWCDigitName |
std::string | fOtherDigitName |
std::string | fSourceName |
std::string | fCurrentFilename |
std::unique_ptr< TFile > | fCurrentFile |
TBranch * | fSpillBranch |
TBranch * | fTDUBranch |
TBranch * | fEventAuxBranch |
unsigned int | fNumSpillsInFile |
int | fSpillIndex |
bool | fFilterEvents |
const art::SourceHelper & | fSourceHelper |
BeamlineEvents * | fBeamlineEvents |
art::RunNumber_t | fRunNumber |
art::SubRunNumber_t | fSubRunNumber |
std::uint64_t | fTimestamp |
std::unique_ptr< daq2raw::BeamlineUnpack > | fBeamlineUnpack |
Class to fill the constraints on a template argument to the class, art::Source
Definition at line 66 of file BeamlineRawInputDriver.h.
daq2raw::BeamlineRawInputDriver::BeamlineRawInputDriver | ( | const fhicl::ParameterSet & | pset, |
art::ProductRegistryHelper & | help, | ||
const art::SourceHelper & | pm | ||
) |
Definition at line 36 of file BeamlineRawInputDriver.cxx.
References fCherenkovName, fConfigName, fMuonStackName, fOtherDigitName, fPaddleDigitName, fSourceName, fToFName, fTriggerName, fWCDigitName, fWCName, art::InEvent, reconfigure(), and art::ProductRegistryHelper::reconstitutes().
|
inlinevirtual |
Definition at line 74 of file BeamlineRawInputDriver.h.
References shutoffs::filename, allTimeWatchdog::index, and string.
void daq2raw::BeamlineRawInputDriver::closeCurrentFile | ( | ) |
Close currently opened file.
Definition at line 94 of file BeamlineRawInputDriver.cxx.
References fBeamlineEvents, fBeamlineUnpack, and fCurrentFile.
|
private |
start a new run
Definition at line 416 of file BeamlineRawInputDriver.cxx.
Referenced by makeSpill().
|
private |
start a new subrun
Definition at line 434 of file BeamlineRawInputDriver.cxx.
Referenced by makeSpill().
|
private |
get the lariat fragment from the artdaq fragments
Get the lariat fragment from the spill wrapper.
Definition at line 102 of file BeamlineRawInputDriver.cxx.
References daq2raw::SpillWrapper::get(), and daq2raw::SpillWrapper::size().
Referenced by loadSpillFragments().
|
private |
load the artdaq spill fragments from the input file
Load the artdaq fragments.
Definition at line 127 of file BeamlineRawInputDriver.cxx.
References daq2raw::SpillWrapper::add(), allTimeWatchdog::endl, daq2raw::getFragments(), getSpillFrag(), and daq2raw::SpillWrapper::ready().
Referenced by makeSpill().
|
private |
load the artdaq TDU fragments from the input file
Load the TDU artdaq fragment.
Definition at line 153 of file BeamlineRawInputDriver.cxx.
References elec2geo::block, and daq2raw::getFragments().
Referenced by makeSpill().
|
private |
make a new event and place the digits within
Definition at line 364 of file BeamlineRawInputDriver.cxx.
References allTimeWatchdog::endl, daq2raw::BeamlineEvent::EventNumber(), fBeamlineEvents, fCherenkovName, fConfigName, fMuonStackName, fOtherDigitName, fPaddleDigitName, fRunNumber, fSourceHelper, fSourceName, fSubRunNumber, fToFName, fTriggerName, fWCDigitName, fWCName, daq2raw::BeamlineEvent::GetCherenkov(), daq2raw::BeamlineEvent::GetConfig(), daq2raw::BeamlineEvent::GetMuonStack(), daq2raw::BeamlineEvents::GetNextEvent(), daq2raw::BeamlineEvent::GetOtherDigit(), daq2raw::BeamlineEvent::GetPaddleDigit(), daq2raw::BeamlineEvent::GetToF(), daq2raw::BeamlineEvent::GetTrigger(), daq2raw::BeamlineEvent::GetWC(), daq2raw::BeamlineEvent::GetWCDigit(), art::SourceHelper::makeEventPrincipal(), and art::put_product_in_principal().
Referenced by readNext().
|
private |
make a new spill
Definition at line 271 of file BeamlineRawInputDriver.cxx.
References commenceRun(), commenceSubRun(), e, allTimeWatchdog::endl, fBeamlineEvents, fBeamlineUnpack, fCurrentFilename, fEventAuxBranch, fFilterEvents, daq2raw::BeamlineEvents::FilterGoodEvents(), fNumSpillsInFile, fRunNumber, fSourceHelper, fSpillBranch, fSpillIndex, fSubRunNumber, fTDUBranch, fTimestamp, loadSpillFragments(), loadTDUFragments(), art::SourceHelper::makeRunPrincipal(), art::SourceHelper::makeSubRunPrincipal(), daq2raw::BeamlineEvents::NumEvents(), art::RunPrincipal::run(), art::EventAuxiliary::run(), art::SubRunPrincipal::subRun(), art::EventAuxiliary::subRun(), and submit_nova_art::timestamp.
Referenced by readNext().
bool daq2raw::BeamlineRawInputDriver::readFile | ( | const std::string & | filename, |
art::FileBlock *& | fileblock | ||
) |
Open the file, "name" and construct and return a new FileBlock object. MUST be successful or throw: art::Exception(art::errors::FileOpenError) or art::Exception(art::errors::FileReadError) are good candidates.
Definition at line 187 of file BeamlineRawInputDriver.cxx.
References allTimeWatchdog::endl, art::rootNames::eventTreeName(), fCurrentFile, fCurrentFilename, fEventAuxBranch, shutoffs::filename, art::errors::FileOpenError, fInputSpillTag, fInputTDUTag, fNumSpillsInFile, fSpillBranch, fSpillIndex, and fTDUBranch.
bool daq2raw::BeamlineRawInputDriver::readNext | ( | art::RunPrincipal *const & | inR, |
art::SubRunPrincipal *const & | inSR, | ||
art::RunPrincipal *& | outR, | ||
art::SubRunPrincipal *& | outSR, | ||
art::EventPrincipal *& | outE | ||
) |
Read and fill Run, SubRun and/or Event as might be appropriate.
Definition at line 235 of file BeamlineRawInputDriver.cxx.
References fBeamlineEvents, fBeamlineUnpack, daq2raw::BeamlineEvents::IsNextEvent(), makeEvent(), and makeSpill().
void daq2raw::BeamlineRawInputDriver::reconfigure | ( | const fhicl::ParameterSet & | pset | ) |
Definition at line 68 of file BeamlineRawInputDriver.cxx.
References fCherenkovName, fConfigName, fFilterEvents, fInputSpillTag, fInputTDUTag, fMuonStackName, fOtherDigitName, fPaddleDigitName, fSourceName, fToFName, fTriggerName, fWCDigitName, fWCName, fhicl::ParameterSet::get(), and string.
Referenced by BeamlineRawInputDriver().
|
private |
Definition at line 142 of file BeamlineRawInputDriver.h.
Referenced by closeCurrentFile(), makeEvent(), makeSpill(), and readNext().
|
private |
Definition at line 152 of file BeamlineRawInputDriver.h.
Referenced by closeCurrentFile(), makeSpill(), and readNext().
|
private |
Definition at line 122 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 118 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 132 of file BeamlineRawInputDriver.h.
Referenced by closeCurrentFile(), and readFile().
|
private |
Definition at line 131 of file BeamlineRawInputDriver.h.
Referenced by makeSpill(), and readFile().
|
private |
Definition at line 135 of file BeamlineRawInputDriver.h.
Referenced by makeSpill(), and readFile().
|
private |
Definition at line 140 of file BeamlineRawInputDriver.h.
Referenced by makeSpill(), and reconfigure().
|
private |
Definition at line 116 of file BeamlineRawInputDriver.h.
Referenced by readFile(), and reconfigure().
|
private |
Definition at line 117 of file BeamlineRawInputDriver.h.
Referenced by readFile(), and reconfigure().
|
private |
Definition at line 123 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 136 of file BeamlineRawInputDriver.h.
Referenced by makeSpill(), and readFile().
|
private |
Definition at line 126 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 124 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 145 of file BeamlineRawInputDriver.h.
Referenced by makeEvent(), and makeSpill().
|
private |
Definition at line 141 of file BeamlineRawInputDriver.h.
Referenced by makeEvent(), and makeSpill().
|
private |
Definition at line 128 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 133 of file BeamlineRawInputDriver.h.
Referenced by makeSpill(), and readFile().
|
private |
Definition at line 137 of file BeamlineRawInputDriver.h.
Referenced by makeSpill(), and readFile().
|
private |
Definition at line 146 of file BeamlineRawInputDriver.h.
Referenced by makeEvent(), and makeSpill().
|
private |
Definition at line 134 of file BeamlineRawInputDriver.h.
Referenced by makeSpill(), and readFile().
|
private |
Definition at line 149 of file BeamlineRawInputDriver.h.
Referenced by makeSpill().
|
private |
Definition at line 120 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 119 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 125 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().
|
private |
Definition at line 121 of file BeamlineRawInputDriver.h.
Referenced by BeamlineRawInputDriver(), makeEvent(), and reconfigure().