|
LDMX Software
|
Base class for all event processing components. More...
#include <EventProcessor.h>
Public Member Functions | |
| DECLARE_FACTORY (EventProcessor, EventProcessor *, const std::string &, Process &) | |
| declare that we have a factory for this class | |
| EventProcessor (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual | ~EventProcessor ()=default |
| Class destructor. | |
| virtual void | configure (framework::config::Parameters ¶meters) |
| Callback for the EventProcessor to configure itself from the given set of parameters. | |
| virtual void | beforeNewRun (ldmx::RunHeader &run_header) |
| Callback for Producers to add parameters to the run header before conditions are initialized. | |
| virtual void | onNewRun (const ldmx::RunHeader &run_header) |
| Callback for the EventProcessor to take any necessary action when the run being processed changes. | |
| virtual void | onFileOpen (EventFile &event_file) |
| Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened. | |
| virtual void | onFileClose (EventFile &event_file) |
| Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed. | |
| virtual void | onProcessStart () |
| Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms. | |
| virtual void | onProcessEnd () |
| Callback for the EventProcessor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities. | |
| virtual void | process (Event &event)=0 |
| How an EventProcessor processes an event. | |
| template<class T > | |
| const T & | getCondition (const std::string &condition_name) |
| Access a conditions object for the current event. | |
| TDirectory * | getHistoDirectory () |
| Access/create a directory in the histogram file for this event processor to create histograms and analysis tuples. | |
| void | setStorageHint (framework::StorageControl::Hint hint) |
| Mark the current event as having the given storage control hint from this module_. | |
| void | setStorageHint (framework::StorageControl::Hint hint, const std::string &purposeString) |
| Mark the current event as having the given storage control hint from this module and the given purpose string. | |
| int | getLogFrequency () const |
| Get the current logging frequency from the process. | |
| int | getRunNumber () const |
| Get the run number from the process. | |
| std::string | getName () const |
| Get the processor name. | |
| void | createHistograms (const std::vector< framework::config::Parameters > &histos) |
| Internal function which is used to create histograms passed from the python configuration @parma histos vector of Parameters that configure histograms to create. | |
Protected Member Functions | |
| void | abortEvent () |
| Abort the event immediately. | |
Protected Attributes | |
| HistogramPool | histograms_ |
| helper object for making and filling histograms | |
| NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
| Manager for any ntuples. | |
| logging::logger | the_log_ |
| The logger for this EventProcessor. | |
Private Member Functions | |
| Conditions & | getConditions () const |
| Internal getter for conditions without exposing all of Process. | |
| const ldmx::EventHeader & | getEventHeader () const |
| Internal getter for EventHeader without exposing all of Process. | |
Private Attributes | |
| Process & | process_ |
| Handle to the Process. | |
| std::string | name_ |
| The name of the EventProcessor. | |
| TDirectory * | histo_dir_ {0} |
| Histogram directory. | |
Base class for all event processing components.
Definition at line 62 of file EventProcessor.h.
| framework::EventProcessor::EventProcessor | ( | const std::string & | name, |
| Process & | process ) |
Class constructor.
| name | Name for this instance of the class. |
| process | The Process class associated with EventProcessor, provided by the framework. |
Definition at line 10 of file EventProcessor.cxx.
References getHistoDirectory().
|
inlineprotected |
Abort the event immediately.
Skip the rest of the sequence and don't save anything in the event bus.
Definition at line 218 of file EventProcessor.h.
Referenced by packing::SingleSubsystemPacker::analyze(), hcal::HcalAlignPolarfires::produce(), packing::RawIO::produce(), packing::SingleSubsystemUnpacker::produce(), simcore::ReSimulator::produce(), and simcore::Simulator::produce().
|
inlinevirtual |
Callback for Producers to add parameters to the run header before conditions are initialized.
Reimplemented in ecal::test::EcalFakeSimHits, framework::Analyzer, framework::test::TestProducer, hcal::HcalRawDecoder, hcal::test::HcalFakeSimHits, packing::RawIO, packing::SingleSubsystemUnpacker, and simcore::Simulator.
Definition at line 105 of file EventProcessor.h.
|
inlinevirtual |
Callback for the EventProcessor to configure itself from the given set of parameters.
The parameters a processor has access to are the member variables of the python class in the sequence that has className equal to the EventProcessor class name.
For an example, look at MyProcessor.
| parameters | Parameters for configuration. |
Reimplemented in dqm::DarkBremInteraction, dqm::EcalClusterAnalyzer, dqm::EcalDigiVerifier, dqm::EcalMipTrackingFeatures, dqm::EcalPnetVetoResults, dqm::EcalShowerFeatures, dqm::EcalVetoResults, dqm::EcalWABRecResults, dqm::GenieTruthDQM, dqm::HCalDQM, dqm::HcalGeometryVerifier, dqm::HcalInefficiencyAnalyzer, dqm::HCalRawDigi, dqm::HcalVetoResults, dqm::HgcrocPulseTruthAnalyzer, dqm::NtuplizeHgcrocDigiCollection, dqm::NtuplizeTrigScintQIEDigis, dqm::PhotoNuclearDQM, dqm::ReSimVerifier, dqm::SampleValidation, dqm::SimObjects, dqm::Trigger, dqm::TrigScintClusterDQM, dqm::TrigScintDigiVerifier, dqm::TrigScintDQM, dqm::TrigScintHitDQM, dqm::TrigScintTrackDQM, dqm::TrkDeDxMassEstFeatures, dqm::VisiblesCutflow, dqm::VisiblesFeatureProducer, ecal::EcalClusterProducer, ecal::EcalDigiProducer, ecal::EcalMipTrackingProcessor, ecal::EcalPnetVetoProcessor, ecal::EcalRawDecoder, ecal::EcalRawEncoder, ecal::EcalRecProducer, ecal::EcalTrigPrimDigiProducer, ecal::EcalVetoProcessor, ecal::EcalWABRecProcessor, ecal::test::EcalCheckEnergyReconstruction, framework::test::TestAnalyzer, framework::test::TestConfig, framework::test::TestProducer, hcal::HcalAlignPolarfires, hcal::HcalClusterProducer, hcal::HcalDigiProducer, hcal::HcalDoubleEndRecProducer, hcal::HcalPedestalAnalyzer, hcal::HcalRawDecoder, hcal::HcalRecProducer, hcal::HcalSimpleDigiAndRecProducer, hcal::HcalSingleEndRecProducer, hcal::HcalTrigPrimDigiProducer, hcal::HcalVetoProcessor, hcal::HcalWABVetoProcessor, hcal::test::HcalCheckPositionMap, hcal::test::HcalCheckReconstruction, hcal::VisiblesVetoProcessor, ldmx::ecal::TrigPrimResolutionAnalyzer, packing::FiberTrackerRawDecoder, packing::RawIO, packing::SingleSubsystemPacker, packing::SingleSubsystemUnpacker, packing::WRRawDecoder, recon::BeamElectronLocator, recon::EcalPreselectionSkimmer, recon::ElectronCounter, recon::MyProcessor, recon::OverlayProducer, recon::ParticleFlow, recon::PFEcalClusterProducer, recon::PFHcalClusterProducer, recon::PFTrackProducer, recon::PFTruthProducer, recon::RecoilFiducialityProcessor, recon::RecoilMissesEcalSkimmer, recon::SequentialTrigger, recon::TrackDeDxMassEstimator, recon::TriggerProcessor, simcore::GenieReweightProducer, simcore::ReSimulator, simcore::Simulator, simcore::SimulatorBase, tracking::dqm::StraightTracksDQM, tracking::dqm::TrackerDigiDQM, tracking::dqm::TrackingRecoDQM, tracking::reco::AlignmentTestProcessor, tracking::reco::CKFProcessor, tracking::reco::DigitizationProcessor, tracking::reco::GreedyAmbiguitySolver, tracking::reco::GSFProcessor, tracking::reco::LinearSeedFinder, tracking::reco::LinearTrackFinder, tracking::reco::LinearTruthTracking, tracking::reco::SeedFinderProcessor, tracking::reco::TruthSeedProcessor, tracking::reco::Vertexer, tracking::reco::VertexProcessor, tracking::TrackerVetoProcessor, trigger::DumpFileWriter, trigger::EcalTPSelector, trigger::HcalTPSelector, trigger::NtupleWriter, trigger::PropagationMapWriter, trigger::TrigEcalClusterProducer, trigger::TrigEcalEnergySum, trigger::TrigElectronProducer, trigger::TrigHcalEnergySum, trigger::TrigMipReco, trigscint::EventReadoutProducer, trigscint::QIEAnalyzer, trigscint::QIEDecoder, trigscint::QIEEncoder, trigscint::QualityFlagAnalyzer, trigscint::TestBeamClusterAnalyzer, trigscint::TestBeamClusterProducer, trigscint::TestBeamHitAnalyzer, trigscint::TestBeamHitProducer, trigscint::TrigScintClusterProducer, trigscint::TrigScintDigiProducer, trigscint::TrigScintFirmwareHitProducer, trigscint::TrigScintFirmwareTracker, trigscint::TrigScintQIEDigiProducer, trigscint::TrigScintRecHitProducer, trigscint::TrigScintTrackProducer, and trigscint::TruthHitProducer.
Definition at line 99 of file EventProcessor.h.
| void framework::EventProcessor::createHistograms | ( | const std::vector< framework::config::Parameters > & | histos | ) |
Internal function which is used to create histograms passed from the python configuration @parma histos vector of Parameters that configure histograms to create.
Definition at line 45 of file EventProcessor.cxx.
|
inline |
Access a conditions object for the current event.
Definition at line 155 of file EventProcessor.h.
References framework::Conditions::getCondition(), and getConditions().
Referenced by dqm::NtuplizeHgcrocDigiCollection::analyze(), ldmx::ecal::TrigPrimResolutionAnalyzer::analyze(), simcore::ConditionsInterface::getCondition(), tracking::reco::TrackingGeometryUser::getNamedCondition(), ecal::EcalDigiProducer::onNewRun(), hcal::HcalDigiProducer::onNewRun(), hcal::HcalSimpleDigiAndRecProducer::onNewRun(), recon::OverlayProducer::onNewRun(), simcore::Simulator::onNewRun(), ecal::EcalDigiProducer::produce(), ecal::EcalMipTrackingProcessor::produce(), ecal::EcalRawDecoder::produce(), ecal::EcalRawEncoder::produce(), ecal::EcalRecProducer::produce(), ecal::EcalTrigPrimDigiProducer::produce(), ecal::EcalVetoProcessor::produce(), ecal::EcalWABRecProcessor::produce(), hcal::HcalDigiProducer::produce(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRawDecoder::produce(), hcal::HcalRecProducer::produce(), hcal::HcalSimpleDigiAndRecProducer::produce(), hcal::HcalSingleEndRecProducer::produce(), hcal::HcalTrigPrimDigiProducer::produce(), and trigger::TrigEcalClusterProducer::produce().
|
private |
Internal getter for conditions without exposing all of Process.
Definition at line 18 of file EventProcessor.cxx.
Referenced by getCondition().
|
private |
Internal getter for EventHeader without exposing all of Process.
Definition at line 22 of file EventProcessor.cxx.
| TDirectory * framework::EventProcessor::getHistoDirectory | ( | ) |
Access/create a directory in the histogram file for this event processor to create histograms and analysis tuples.
Definition at line 26 of file EventProcessor.cxx.
Referenced by dqm::GenieTruthDQM::analyze(), dqm::SimObjects::createCalorimeterHists(), dqm::SimObjects::createTrackerHists(), EventProcessor(), dqm::GenieTruthDQM::onProcessStart(), dqm::HCalRawDigi::onProcessStart(), dqm::NtuplizeHgcrocDigiCollection::onProcessStart(), dqm::NtuplizeTrigScintQIEDigis::onProcessStart(), dqm::SimObjects::onProcessStart(), dqm::Trigger::onProcessStart(), dqm::TrigScintClusterDQM::onProcessStart(), dqm::TrigScintDQM::onProcessStart(), dqm::TrigScintHitDQM::onProcessStart(), dqm::TrigScintTrackDQM::onProcessStart(), ecal::test::EcalCheckEnergyReconstruction::onProcessStart(), framework::test::TestAnalyzer::onProcessStart(), hcal::test::HcalCheckReconstruction::onProcessStart(), ldmx::ecal::TrigPrimResolutionAnalyzer::onProcessStart(), packing::FiberTrackerRawDecoder::onProcessStart(), and packing::WRRawDecoder::onProcessStart().
| int framework::EventProcessor::getLogFrequency | ( | ) | const |
Get the current logging frequency from the process.
Definition at line 39 of file EventProcessor.cxx.
|
inline |
Get the processor name.
Definition at line 202 of file EventProcessor.h.
References name_.
Referenced by tracking::reco::LinearSeedFinder::configure(), tracking::reco::SeedFinderProcessor::configure(), ecal::EcalTrigPrimDigiProducer::produce(), and hcal::HcalTrigPrimDigiProducer::produce().
| int framework::EventProcessor::getRunNumber | ( | ) | const |
Get the run number from the process.
Definition at line 43 of file EventProcessor.cxx.
|
inlinevirtual |
Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed.
| filename | Input event ROOT file name |
Definition at line 128 of file EventProcessor.h.
|
inlinevirtual |
Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened.
| filename | Input event ROOT file name. |
Definition at line 120 of file EventProcessor.h.
|
inlinevirtual |
Callback for the EventProcessor to take any necessary action when the run being processed changes.
| run_header | The RunHeader containing run information. |
Reimplemented in dqm::GenieTruthDQM, ecal::EcalDigiProducer, ecal::EcalMipTrackingProcessor, ecal::EcalVetoProcessor, framework::RunHeaderAnalyzer, hcal::HcalDigiProducer, hcal::HcalSimpleDigiAndRecProducer, recon::OverlayProducer, simcore::GenieReweightProducer, simcore::Simulator, tracking::reco::AlignmentTestProcessor, tracking::reco::CKFProcessor, tracking::reco::DigitizationProcessor, tracking::reco::GreedyAmbiguitySolver, tracking::reco::GSFProcessor, tracking::reco::TruthSeedProcessor, trigger::TrigMipReco, and trigscint::TrigScintDigiProducer.
Definition at line 112 of file EventProcessor.h.
|
inlinevirtual |
Callback for the EventProcessor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities.
Reimplemented in ecal::EcalMipTrackingProcessor, ecal::EcalVetoProcessor, ecal::EcalWABRecProcessor, hcal::HcalPedestalAnalyzer, packing::RawIO, recon::ParticleFlow, simcore::Simulator, simcore::SimulatorBase, tracking::dqm::TrackingRecoDQM, tracking::reco::AlignmentTestProcessor, tracking::reco::CKFProcessor, tracking::reco::GSFProcessor, tracking::reco::LinearSeedFinder, tracking::reco::LinearTrackFinder, tracking::reco::LinearTruthTracking, tracking::reco::SeedFinderProcessor, tracking::reco::Vertexer, tracking::reco::VertexProcessor, trigger::DumpFileWriter, trigger::NtupleWriter, trigger::PropagationMapWriter, trigger::TrigElectronProducer, trigger::TrigMipReco, trigscint::QIEAnalyzer, trigscint::QIEDecoder, trigscint::QIEEncoder, trigscint::QualityFlagAnalyzer, trigscint::TestBeamClusterAnalyzer, trigscint::TestBeamClusterProducer, trigscint::TestBeamHitAnalyzer, trigscint::TrigScintClusterProducer, and trigscint::TrigScintTrackProducer.
Definition at line 142 of file EventProcessor.h.
|
inlinevirtual |
Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms.
Reimplemented in dqm::GenieTruthDQM, dqm::HCalRawDigi, dqm::NtuplizeHgcrocDigiCollection, dqm::NtuplizeTrigScintQIEDigis, dqm::SimObjects, dqm::Trigger, dqm::TrigScintClusterDQM, dqm::TrigScintDQM, dqm::TrigScintHitDQM, dqm::TrigScintTrackDQM, ecal::test::EcalCheckEnergyReconstruction, framework::test::TestAnalyzer, hcal::test::HcalCheckPositionMap, hcal::test::HcalCheckReconstruction, ldmx::ecal::TrigPrimResolutionAnalyzer, packing::FiberTrackerRawDecoder, packing::WRRawDecoder, recon::BeamElectronLocator, recon::OverlayProducer, simcore::SimulatorBase, tracking::reco::AlignmentTestProcessor, tracking::reco::CKFProcessor, tracking::reco::DigitizationProcessor, tracking::reco::GSFProcessor, tracking::reco::LinearSeedFinder, tracking::reco::SeedFinderProcessor, tracking::reco::TruthSeedProcessor, tracking::reco::Vertexer, tracking::reco::VertexProcessor, trigger::DumpFileWriter, trigger::NtupleWriter, trigger::PropagationMapWriter, trigger::TrigElectronProducer, trigscint::QIEAnalyzer, trigscint::QIEDecoder, trigscint::QIEEncoder, trigscint::QualityFlagAnalyzer, trigscint::TestBeamClusterAnalyzer, trigscint::TestBeamClusterProducer, trigscint::TestBeamHitAnalyzer, trigscint::TrigScintClusterProducer, and trigscint::TrigScintTrackProducer.
Definition at line 135 of file EventProcessor.h.
|
pure virtual |
How an EventProcessor processes an event.
This becomes Producer::produce or Analyzer::analyze depending on which one the user inherits from.
Implemented in framework::Analyzer, and framework::Producer.
|
inline |
Mark the current event as having the given storage control hint from this module_.
| controlhint | The storage control hint to apply for the given event |
Definition at line 174 of file EventProcessor.h.
References setStorageHint().
Referenced by dqm::EcalClusterAnalyzer::analyze(), dqm::EcalDigiVerifier::analyze(), ecal::EcalVetoProcessor::produce(), framework::test::TestProducer::produce(), hcal::HcalAlignPolarfires::produce(), hcal::HcalVetoProcessor::produce(), hcal::HcalWABVetoProcessor::produce(), recon::EcalPreselectionSkimmer::produce(), recon::RecoilFiducialityProcessor::produce(), recon::RecoilMissesEcalSkimmer::produce(), recon::SequentialTrigger::produce(), recon::TriggerProcessor::produce(), tracking::TrackerVetoProcessor::produce(), and setStorageHint().
| void framework::EventProcessor::setStorageHint | ( | framework::StorageControl::Hint | hint, |
| const std::string & | purposeString ) |
Mark the current event as having the given storage control hint from this module and the given purpose string.
| controlhint | The storage control hint to apply for the given event |
| purposeString | A purpose string which can be used in the skim control configuration |
Definition at line 34 of file EventProcessor.cxx.
|
private |
|
protected |
helper object for making and filling histograms
Definition at line 221 of file EventProcessor.h.
Referenced by dqm::EcalClusterAnalyzer::analyze(), dqm::EcalDigiVerifier::analyze(), dqm::EcalMipTrackingFeatures::analyze(), dqm::EcalPnetVetoResults::analyze(), dqm::EcalShowerFeatures::analyze(), dqm::EcalVetoResults::analyze(), dqm::EcalWABRecResults::analyze(), dqm::HcalGeometryVerifier::analyze(), dqm::HcalInefficiencyAnalyzer::analyze(), dqm::HCalRawDigi::analyze(), dqm::HcalVetoResults::analyze(), dqm::HgcrocPulseTruthAnalyzer::analyze(), dqm::PhotoNuclearDQM::analyze(), dqm::SampleValidation::analyze(), dqm::SimObjects::analyze(), dqm::Trigger::analyze(), dqm::TrigScintClusterDQM::analyze(), dqm::TrigScintDigiVerifier::analyze(), dqm::TrigScintDQM::analyze(), dqm::TrigScintHitDQM::analyze(), dqm::TrigScintTrackDQM::analyze(), dqm::TrkDeDxMassEstFeatures::analyze(), dqm::VisiblesCutflow::analyze(), dqm::VisiblesFeatureProducer::analyze(), ldmx::ecal::TrigPrimResolutionAnalyzer::analyze(), tracking::dqm::StraightTracksDQM::analyze(), tracking::dqm::TrackerDigiDQM::analyze(), tracking::dqm::TrackingRecoDQM::analyze(), dqm::SimObjects::createCalorimeterHists(), dqm::SimObjects::createTrackerHists(), dqm::PhotoNuclearDQM::findParticleKinematics(), dqm::PhotoNuclearDQM::findRecoilProperties(), dqm::PhotoNuclearDQM::findSubleadingKinematics(), dqm::HCalRawDigi::onProcessStart(), dqm::SimObjects::onProcessStart(), dqm::Trigger::onProcessStart(), dqm::TrigScintClusterDQM::onProcessStart(), dqm::TrigScintDQM::onProcessStart(), dqm::TrigScintHitDQM::onProcessStart(), dqm::TrigScintTrackDQM::onProcessStart(), ldmx::ecal::TrigPrimResolutionAnalyzer::onProcessStart(), dqm::DarkBremInteraction::produce(), and tracking::dqm::TrackingRecoDQM::trackStateMonitoring().
|
private |
The name of the EventProcessor.
Definition at line 244 of file EventProcessor.h.
Referenced by getName().
|
protected |
Manager for any ntuples.
Definition at line 224 of file EventProcessor.h.
Referenced by dqm::GenieTruthDQM::analyze(), ecal::test::EcalCheckEnergyReconstruction::analyze(), hcal::test::HcalCheckReconstruction::analyze(), dqm::GenieTruthDQM::onProcessStart(), ecal::test::EcalCheckEnergyReconstruction::onProcessStart(), and hcal::test::HcalCheckReconstruction::onProcessStart().
|
private |
Handle to the Process.
Definition at line 241 of file EventProcessor.h.
|
protected |
The logger for this EventProcessor.
Definition at line 227 of file EventProcessor.h.