LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::detail::LegacyModule Class Reference

#include "LegacyModule.h"

Inheritance diagram for art::detail::LegacyModule:
art::detail::SharedModule art::detail::EngineCreator art::EDAnalyzer art::EDFilter art::EDProducer artg4tk::CheckCalorimeterHits artg4tk::CheckDRCalorimeterHits artg4tk::CheckGenParticle artg4tk::CheckHits artg4tk::CheckInteractions artg4tk::CheckPhotonHits artg4tk::CheckProtonProduction artg4tk::CheckTrackerHits caldata::CalWireAna caldata::DumpWires calo::CaloChecker calo::PrintCalorimetry cheat::CheckBackTracking cheat::RecoCheckAna cluster::ClusterAna cluster::ClusterPCA cluster::ClusterTrackAna cluster::DBclusterAna cluster::HoughLineFinderAna ClusteringValidation::ClusteringValidation detsim::DumpOpDetWaveforms detsim::DumpRawDigits detsim::SimDriftedElectronClusterAna detsim::SimWireAna detsim::WienerFilterAna dnn::SaveImageH5 DUNE::MuonTrackingEff DUNE::NeutrinoShowerEff DUNE::NeutrinoTrackingEff ems::MultiEMShowers evd::EVD evg::GenieOutput 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::CheckAuxDetHit larg4::CheckMCParticle larg4::CheckSimEnergyDeposit larg4::ISCalcAna larg4::LArG4Ana larg::LArSimChannelAna lcvn::ICVNZlibMaker MCBTDemo microboone::CosmicRemovalAna nnet::EvaluateROIEff nnet::NoiseWaveformDump nnet::PointIdEffTest nnet::PointIdTrainingData nnet::RawWaveformClnSigDump nnet::RawWaveformDump nnet::WaveformDenoiseTest NuGraphAnalyzer NuShowerEff opdet::FIFOHistogramAna opdet::FlashHypothesisAna opdet::LEDCalibrationAna opdet::OpDigiAna opdet::OpFlashAna opdet::OpFlashMCTruthAna opdet::OpFlashSimpleAna opdet::OpHitAna opdet::PhotonInf opdet::SimPhotonCounter ophit::DumpOpFlashes ophit::DumpOpHits opreco::OpticalRecoAna pdsp::CheckCNNScore pfpf::PFPAna phot::CreateHybridLibrary phot::PhotonLibraryAnalyzer pid::DumpParticleIDs pid::PIDAAnalyzer pmtana::PMTAna quad::EvalVtx 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::DumpSimEnergyDeposits sim::DumpSimPhotons sim::DumpSimPhotonsLite sim::POTaccumulator trk::TrackContainmentAnalyzer trkf::SeedAna trkf::SpacePointAna trkf::TrackAna vertex::AggregateVertexAna vertex::FeatureVertexFinderAna wc::CellTree art::MixFilter< T, IOPolicy > cluster::SmallClusterFilter filt::FinalStateParticleFilter filt::LArG4ParticleFilter filter::ADCFilter filter::EventFilter filter::EventTimeFilter filter::MuonFilter simfilter::FilterCryostatNus simfilter::FilterGenInTime simfilter::FilterNoDirtNeutrinos simfilter::FilterPrimaryPDG apa::APAHitFinder artg4tk::artg4tkMain artg4tk::EventGenerator bogoblip::BlipMaker butcher::EventButcher caldata::CalWire caldata::CalWireT962 calo::Calorimetry calo::GnocchiCalorimetry calo::ShowerCalorimetry calo::TrackCalorimetry cheat::BackTrackerLoader cheat::PhotonBackTrackerLoader cluster::BlurredClustering cluster::ClusterCheater cluster::ClusterCrawler cluster::DBcluster cluster::DBCluster3D cluster::EndPointModule cluster::HoughLineFinder cluster::LineCluster cluster::LineMerger cluster::SmallClusterFinder cluster::TrajCluster cosmic::BeamFlashTrackMatchTagger cosmic::CosmicClusterTagger cosmic::CosmicPCAxisTagger cosmic::CosmicPFParticleTagger cosmic::CosmicTrackTagger cosmic::TrackPFParticleMatch CRHitRemoval CRHitRemovalByPCA detsim::DriftElectronstoPlane detsim::SimDriftElectrons detsim::SimWire ems::EMShower3D evd::GraphCluster event::EventCheater evg::AddGenieEventsToArt evgen::BaseRadioGen evgen::CORSIKAGen evgen::CosmicsGen evgen::FileMuons evgen::GaisserParam evgen::GENIEGen evgen::larg4SingleGen evgen::LightSource evgen::MarleyGen evgen::MarleyTimeGen evgen::MUSUN evgen::NDKGen evgen::NeutronOsc evgen::NucleonDecay evgen::PhotonGen evgen::RadioGen evgen::SingleGen evgen::SNNueAr40CCGen evgen::TestGENIEHelper evgen::TextFileGen evwgh::EventWeight hit::DisambigCheater hit::DPRawHitFinder hit::FFTHitFinder hit::HitCheater hit::HitFinder hit::MCHitFinder hit::RawHitFinder hit::RFFHitFinder hit::TTHitFinder lar::example::Disturbance lar_cluster3d::Cluster3D lar_pandora::CollectionSplitting lar_pandora::ILArPandora lar_pandora::LArPandoraExternalEventBuilding lar_pandora::LArPandoraShowerCreation lar_pandora::LArPandoraTrackCreation larg4::IonAndScint larg4::LArG4 larg4::larg4Main lbne::PhotonCounterT0Matching lcvn::ICVNMapper< T, U > lcvn::LArCVNEvaluator MCReco mvapid::MVAPID nnet::EmTrackClusterId nnet::EmTrackClusterId2out nnet::EmTrackClusterId2outTl nnet::EmTrackClusterId3outTl nnet::EmTrackMichelId nnet::EmTrackMichelIdTl nnet::ParticleDecayId nnet::WaveformRoiFinder noisefilteralg::WireCellNoiseFilter NuGraphInference NuSliceHitsProducer opdet::OpFlashFinder opdet::OpHitFinder opdet::OpMCDigi opdet::OptDetDigitizer opdet::OpticalRawDigitReformatter phot::PDFastSimANN phot::PDFastSimPAR phot::PDFastSimPVS phot::PhotonLibraryPropagation pid::Chi2ParticleID quad::QuadVtx reco3d::SpacePointSolver reco::shower::LArPandoraModularShowerCreation sce::SCECorrection shower::EMShower shower::TCShower ShowerReco3D shwf::ShowerCheater shwf::ShowerFinder shwf::ShowerReco sim::GenericCRT sim::MergeSimSources sim::PhotonHitConverter spacecharge::ShiftEdepSCE sppt::TTSpacePointFinder t0::MCParticleHitMatching t0::MCParticleShowerMatching t0::MCParticleTrackMatching t0::MCTruthT0Matching TrackProducerFromPFParticle TrackProducerFromTrack TrackProducerFromTrackTrajectory trk::TrackContainmentTagger trkf::CCTrackMaker trkf::CosmicTracker trkf::FeatureTracker trkf::KalmanFilterFinalTrackFitter trkf::KalmanFilterTrajectoryFitter trkf::MCSFitProducer trkf::PMAlgTrackMaker trkf::PMAlgTrajFitter trkf::SeedFinderModule trkf::SpacePointCheater trkf::SpacePointFinder trkf::SpacePts trkf::TCTrack trkf::Track3DKalman trkf::Track3DKalmanHit trkf::Track3DKalmanSPS trkf::Track3Dreco trkf::TrackCheater trkf::TrackKalmanCheater trkf::TrackStitcher trkf::VertexFitter tss::TrackShowerHits vertex::FeatureVertexFinder vertex::PrimaryVertexFinder vertex::VertexCheater vertex::VertexFinder2D

Classes

class  ScheduleIDSentry
 

Public Types

using base_engine_t = EngineCreator::base_engine_t
 
using seed_t = EngineCreator::seed_t
 
using label_t = EngineCreator::label_t
 

Public Member Functions

 LegacyModule (std::string const &module_label)
 
ScheduleID scheduleID () const noexcept
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
std::set< std::string > const & sharedResources () const
 
void createQueues (SharedResources const &resources)
 
template<BranchType , typename... T>
void serialize (T const &...resources)
 
template<BranchType , typename... T>
void serializeExternal (T const &...resources)
 

Protected Member Functions

template<BranchType BT = InEvent, typename... T>
void serialize (T const &...)
 
template<BranchType BT = InEvent, typename... T>
void serializeExternal (T const &...)
 
template<BranchType BT = InEvent>
void async ()
 

Private Types

using engine_state_t = RNGsnapshot::engine_state_t
 

Private Member Functions

void setScheduleID (ScheduleID const sid) noexcept
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 

Private Attributes

std::atomic< ScheduleIDscheduleID_
 

Detailed Description

Definition at line 13 of file LegacyModule.h.

Member Typedef Documentation

Constructor & Destructor Documentation

art::detail::LegacyModule::LegacyModule ( std::string const &  module_label)
explicit

Definition at line 5 of file LegacyModule.cc.

References art::ScheduleID::first(), art::detail::LegacyResource, and art::detail::SharedModule::serialize().

6  : EngineCreator{module_label, ScheduleID::first()}
7  {
9  }
EngineCreator(std::string const &label, ScheduleID sid)
static constexpr ScheduleID first()
Definition: ScheduleID.h:50
SharedResource_t const LegacyResource
void serialize(T const &...)

Member Function Documentation

template<BranchType BT = InEvent>
void art::detail::SharedModule::async ( )
inlineprotectedinherited

Definition at line 38 of file SharedModule.h.

References art::detail::SharedModule::asyncDeclared_, art::detail::SharedModule::implicit_serialize(), art::InEvent, and art::detail::SharedModule::serialize_for().

39  {
40  static_assert(
41  BT == InEvent,
42  "async is currently supported only for the 'InEvent' level.");
43  asyncDeclared_ = true;
44  }
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed)
inherited

Definition at line 20 of file EngineCreator.cc.

References art::detail::EngineCreator::rng().

Referenced by evg::AddGenieEventsToArt::AddGenieEventsToArt(), artg4tk::artg4tkMain::artg4tkMain(), evgen::BaseRadioGen::BaseRadioGen(), evgen::CORSIKAGen::CORSIKAGen(), evgen::CosmicsGen::CosmicsGen(), art::MixHelper::createEngine(), detsim::DriftElectronstoPlane::DriftElectronstoPlane(), art::EDAnalyzer::EDAnalyzer(), art::EDFilter::EDFilter(), art::EDProducer::EDProducer(), artg4tk::EventGenerator::EventGenerator(), evwgh::EventWeight::EventWeight(), evgen::GaisserParam::GaisserParam(), cluster::HoughLineFinder::HoughLineFinder(), art::MixHelper::initEngine_(), larg4::IonAndScint::IonAndScint(), larg4::ISCalcAna::ISCalcAna(), larg4::LArG4::LArG4(), larg4::larg4Main::larg4Main(), evgen::larg4SingleGen::larg4SingleGen(), evgen::LightSource::LightSource(), evgen::MUSUN::MUSUN(), evgen::NDKGen::NDKGen(), evgen::NeutronOsc::NeutronOsc(), nnet::NoiseWaveformDump::NoiseWaveformDump(), evgen::NucleonDecay::NucleonDecay(), opdet::OpMCDigi::OpMCDigi(), opdet::OptDetDigitizer::OptDetDigitizer(), phot::PDFastSimANN::PDFastSimANN(), phot::PDFastSimPAR::PDFastSimPAR(), phot::PDFastSimPVS::PDFastSimPVS(), evgen::PhotonGen::PhotonGen(), phot::PhotonLibraryPropagation::PhotonLibraryPropagation(), evgen::RadioGen::RadioGen(), nnet::RawWaveformClnSigDump::RawWaveformClnSigDump(), nnet::RawWaveformDump::RawWaveformDump(), art::ReplicatedAnalyzer::ReplicatedAnalyzer(), art::ReplicatedFilter::ReplicatedFilter(), art::ReplicatedProducer::ReplicatedProducer(), detsim::SimDriftElectrons::SimDriftElectrons(), detsim::SimWire::SimWire(), evgen::SingleGen::SingleGen(), evgen::SNNueAr40CCGen::SNNueAr40CCGen(), and trkf::Track3DKalman::Track3DKalman().

21 {
22  return createEngine(seed, rng()->defaultEngineKind());
23 }
base_engine_t & createEngine(seed_t seed)
long seed
Definition: chem4.cc:67
static ServiceHandle< RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited

Definition at line 26 of file EngineCreator.cc.

References art::detail::EngineCreator::moduleLabel_, art::detail::EngineCreator::requireValid(), art::detail::EngineCreator::rng(), and art::detail::EngineCreator::sid_.

28 {
29  requireValid();
30  return rng()->createEngine(sid_, moduleLabel_, seed, kind_of_engine_to_make);
31 }
long seed
Definition: chem4.cc:67
std::string const moduleLabel_
Definition: EngineCreator.h:53
static ServiceHandle< RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited

Definition at line 34 of file EngineCreator.cc.

References art::detail::EngineCreator::moduleLabel_, art::detail::EngineCreator::requireValid(), art::detail::EngineCreator::rng(), and art::detail::EngineCreator::sid_.

37 {
38  requireValid();
39  return rng()->createEngine(
40  sid_, moduleLabel_, seed, kind_of_engine_to_make, engine_label);
41 }
long seed
Definition: chem4.cc:67
std::string const moduleLabel_
Definition: EngineCreator.h:53
static ServiceHandle< RandomNumberGenerator > & rng()
void art::detail::SharedModule::createQueues ( SharedResources const &  resources)
inherited

Definition at line 34 of file SharedModule.cc.

References art::detail::SharedModule::asyncDeclared_, util::cbegin(), util::cend(), art::detail::SharedModule::chain_, art::detail::SharedResources::createQueues(), e, util::empty(), art::errors::LogicError, and art::detail::SharedModule::resourceNames_.

Referenced by art::OutputModule::doBeginJob(), art::SharedFilter::setupQueues(), art::SharedProducer::setupQueues(), art::SharedAnalyzer::setupQueues(), art::EDFilter::setupQueues(), art::EDProducer::setupQueues(), and art::EDAnalyzer::setupQueues().

35  {
37  "An error occurred while processing scheduling options for a "
38  "module.\n"};
39  if (asyncDeclared_) {
40  if (empty(resourceNames_)) {
41  return;
42  }
43  throw e
44  << "async<art::InEvent>() cannot be called in combination with any "
45  "serialize<art::InEvent>(...) calls.\n";
46  }
47 
48  if (empty(resourceNames_)) {
49  throw e << "Either 'async<art::InEvent>()' or "
50  "'serialize<art::InEvent>(...)'\n"
51  "must be called in a shared module's constructor.\n";
52  }
53  std::vector<std::string> const names(cbegin(resourceNames_),
55  auto queues = resources.createQueues(names);
56  chain_ = std::make_unique<SerialTaskQueueChain>(queues);
57  }
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:93
std::set< std::string > resourceNames_
Definition: SharedModule.h:76
std::unique_ptr< hep::concurrency::SerialTaskQueueChain > chain_
Definition: SharedModule.h:78
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:85
Float_t e
Definition: plot.C:35
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:109
ScheduleID art::detail::LegacyModule::scheduleID ( ) const
noexcept

Definition at line 12 of file LegacyModule.cc.

References scheduleID_.

Referenced by art::EDAnalyzer::EDAnalyzer(), art::EDFilter::EDFilter(), and art::EDProducer::EDProducer().

13  {
14  return scheduleID_.load();
15  }
std::atomic< ScheduleID > scheduleID_
Definition: LegacyModule.h:32
template<BranchType BT = InEvent, typename... T>
void art::detail::SharedModule::serialize ( T const &  ...)
protectedinherited
template<BranchType , typename... T>
void art::detail::SharedModule::serialize ( T const &...  resources)
inherited

Definition at line 83 of file SharedModule.h.

References art::detail::SharedModule::serialize_for_resource().

84  {
85  serialize_for_resource(resources...);
86  }
void serialize_for_resource(T const &...t)
Definition: SharedModule.h:52
template<BranchType BT = InEvent, typename... T>
void art::detail::SharedModule::serializeExternal ( T const &  ...)
protectedinherited
template<BranchType , typename... T>
void art::detail::SharedModule::serializeExternal ( T const &...  resources)
inherited

Definition at line 90 of file SharedModule.h.

References art::detail::SharedModule::serialize_for_external_resource().

91  {
92  serialize_for_external_resource(resources...);
93  }
void serialize_for_external_resource(T const &...t)
Definition: SharedModule.h:65
SerialTaskQueueChain * art::detail::SharedModule::serialTaskQueueChain ( ) const
inherited

Definition at line 22 of file SharedModule.cc.

References art::detail::SharedModule::chain_.

23  {
24  return chain_.get();
25  }
std::unique_ptr< hep::concurrency::SerialTaskQueueChain > chain_
Definition: SharedModule.h:78
void art::detail::LegacyModule::setScheduleID ( ScheduleID const  sid)
privatenoexcept

Definition at line 18 of file LegacyModule.cc.

References scheduleID_.

19  {
20  scheduleID_ = sid;
21  }
std::atomic< ScheduleID > scheduleID_
Definition: LegacyModule.h:32
std::set< std::string > const & art::detail::SharedModule::sharedResources ( ) const
inherited

Definition at line 28 of file SharedModule.cc.

References art::detail::SharedModule::resourceNames_.

29  {
30  return resourceNames_;
31  }
std::set< std::string > resourceNames_
Definition: SharedModule.h:76

Member Data Documentation

std::atomic<ScheduleID> art::detail::LegacyModule::scheduleID_
private

Definition at line 32 of file LegacyModule.h.

Referenced by scheduleID(), and setScheduleID().


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