LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::EventObserverBase Class Reference

#include "EventObserverBase.h"

Inheritance diagram for art::EventObserverBase:
art::EDAnalyzer art::OutputModule caldata::CalWireAna caldata::DumpWires calo::PrintCalorimetry cheat::CheckBackTracking cheat::RecoCheckAna cluster::ClusterAna cluster::ClusterPCA cluster::DBclusterAna cluster::HoughLineFinderAna ClusteringValidation::ClusteringValidation detsim::DumpOpDetWaveforms detsim::DumpRawDigits detsim::SimWireAna detsim::WienerFilterAna DUNE::MuonTrackingEff DUNE::NeutrinoShowerEff DUNE::NeutrinoTrackingEff ems::MultiEMShowers evd::EVD evd::Landed geo::DumpChannelMap geo::DumpGeometry hit::DumpHits hit::GausHitFinderAna hit::HitAnaModule hit::HitFinderAna hit::MagDriftAna hit::MCHitAnaExample lar::ComputePi lar::example::AnalysisExample lar::example::Exploder lar_pandora::ConsolidatedPFParticleAnalysisTemplate lar_pandora::LArPandoraEventDump lar_pandora::PFParticleAnalysis lar_pandora::PFParticleCosmicAna lar_pandora::PFParticleHitDumper lar_pandora::PFParticleMonitoring lar_pandora::PFParticleTrackAna lar_pandora::PFParticleValidation larg4::ISCalculationAna larg4::LArG4Ana larg::LArSimChannelAna MCBTDemo microboone::CosmicRemovalAna NuShowerEff opdet::FIFOHistogramAna opdet::FlashHypothesisAna opdet::FlashPurityCheckAna opdet::LEDCalibrationAna opdet::OpDigiAna opdet::OpFlashAna opdet::OpFlashMCTruthAna opdet::OpFlashSimpleAna opdet::OpHitAna opdet::SimPhotonCounter opdet::TrackTimeAssocAna opreco::OpticalRecoAna pfpf::PFPAna phot::CreateHybridLibrary phot::PhotonLibraryAnalyzer pid::PIDAAnalyzer pmtana::PMTAna reco3d::PlotSpacePoints recob::DumpChargedSpacePoints recob::DumpClusters recob::DumpPCAxes recob::DumpPFParticles recob::DumpSeeds recob::DumpSpacePoints recob::DumpTracks recob::DumpVertices RecoProxyUsageExample rwgt::ReweightAna shower::TCShowerAnalysis shower::TCShowerElectronLikelihood shower::TCShowerTemplateMaker ShowerQuality sim::DumpGTruth sim::DumpMCParticles sim::DumpMCShowers sim::DumpMCTracks sim::DumpMCTruth sim::DumpOpDetBacktrackerRecords sim::DumpSimChannels sim::DumpSimPhotons sim::DumpSimPhotonsLite trk::TrackContainmentAnalyzer trkf::SeedAna trkf::SpacePointAna trkf::TrackAna vertex::AggregateVertexAna vertex::FeatureVertexFinderAna wc::CellTree art::FileDumperOutput art::ProvenanceCheckerOutput art::ProvenanceDumper< DETAIL, Enable > art::ProvenanceDumper< DETAIL,                                                                                                                                                                                   cet::enable_if_type_exists_t< typename DETAIL::Config > > art::RootOutput

Classes

struct  EOConfig
 

Public Member Functions

bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 

Protected Member Functions

 EventObserverBase (std::vector< std::string > const &paths, fhicl::ParameterSet const &config)
 
 EventObserverBase (fhicl::ParameterSet const &config)
 
detail::CachedProductscachedProducts ()
 

Private Member Functions

void init_ (std::vector< std::string > const &paths)
 

Private Attributes

bool wantAllEvents_ {false}
 
detail::CachedProducts selectors_ {}
 
std::string process_name_ {}
 
fhicl::ParameterSetID selector_config_id_
 

Detailed Description

Definition at line 22 of file EventObserverBase.h.

Constructor & Destructor Documentation

art::EventObserverBase::EventObserverBase ( std::vector< std::string > const &  paths,
fhicl::ParameterSet const &  config 
)
explicitprotected

Definition at line 18 of file EventObserverBase.cc.

References fhicl::ParameterSet::id(), and init_().

20  : selector_config_id_{pset.id()}
21  {
22  init_(paths);
23  }
void init_(std::vector< std::string > const &paths)
fhicl::ParameterSetID selector_config_id_
art::EventObserverBase::EventObserverBase ( fhicl::ParameterSet const &  config)
explicitprotected

Definition at line 25 of file EventObserverBase.cc.

References fhicl::ParameterSet::id(), and init_().

26  : selector_config_id_{pset.id()}
27  {
28  auto const& paths = pset.get<vector<string>>("SelectEvents", {});
29  init_(paths);
30  }
void init_(std::vector< std::string > const &paths)
fhicl::ParameterSetID selector_config_id_

Member Function Documentation

detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotected

Definition at line 79 of file EventObserverBase.h.

References selectors_.

Referenced by art::EDAnalyzer::doEvent(), and art::OutputModule::doWriteEvent().

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inline

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and selectors_.

Referenced by art::OutputModule::doWriteEvent().

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:34
void art::EventObserverBase::init_ ( std::vector< std::string > const &  paths)
private

Definition at line 33 of file EventObserverBase.cc.

References art::detail::parse_path_spec(), process_name_, selectors_, art::detail::CachedProducts::setup(), art::detail::CachedProducts::setupDefault(), and wantAllEvents_.

Referenced by EventObserverBase().

34  {
35  ServiceHandle<TriggerNamesService const> TNS;
36  process_name_ = TNS->getProcessName();
37  vector<string> const& trigPaths = TNS->getTrigPaths();
38  if (paths.empty()) {
39  // No event selection criteria given, we want all events.
40  wantAllEvents_ = true;
41  selectors_.setupDefault(trigPaths);
42  return;
43  }
44  // Parse the event selection criteria into
45  // (process, trigger name list) pairs.
46  vector<pair<string, string>> PPS(paths.size());
47  for (size_t i = 0; i < paths.size(); ++i) {
48  detail::parse_path_spec(paths[i], PPS[i]);
49  }
50  selectors_.setup(PPS, trigPaths, process_name_);
51  }
detail::CachedProducts selectors_
void parse_path_spec(std::string path_spec, std::pair< std::string, std::string > &output)
void setup(std::vector< std::pair< std::string, std::string >> const &path_specs, std::vector< std::string > const &trigger_names, std::string const &process_name)
void setupDefault(std::vector< std::string > const &trigger_names)
bool art::EventObserverBase::modifiesEvent ( ) const
inline

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
std::string const& art::EventObserverBase::processName ( ) const
inline

Definition at line 41 of file EventObserverBase.h.

References process_name_.

Referenced by art::FileDumperOutput::printPrincipal(), and art::RootOutput::RootOutput().

42  {
43  return process_name_;
44  }
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inline

Definition at line 33 of file EventObserverBase.h.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inline

Definition at line 56 of file EventObserverBase.h.

References selector_config_id_.

Referenced by art::RootOutputFile::writeOne().

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
bool art::EventObserverBase::wantAllEvents ( ) const
inline
bool art::EventObserverBase::wantEvent ( Event const &  e)
inline

Definition at line 51 of file EventObserverBase.h.

References selectors_, and art::detail::CachedProducts::wantEvent().

Referenced by art::EDAnalyzer::doEvent(), art::OutputModule::doEvent(), and art::OutputModule::doWriteEvent().

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:34
bool wantEvent(Event const &)

Member Data Documentation

std::string art::EventObserverBase::process_name_ {}
private

Definition at line 90 of file EventObserverBase.h.

Referenced by init_(), and processName().

fhicl::ParameterSetID art::EventObserverBase::selector_config_id_
private

Definition at line 93 of file EventObserverBase.h.

Referenced by selectorConfig().

detail::CachedProducts art::EventObserverBase::selectors_ {}
private

Definition at line 89 of file EventObserverBase.h.

Referenced by cachedProducts(), getTriggerResults(), init_(), and wantEvent().

bool art::EventObserverBase::wantAllEvents_ {false}
private

Definition at line 86 of file EventObserverBase.h.

Referenced by init_(), and wantAllEvents().


The documentation for this class was generated from the following files: