LDMX Software
|
Class encapsulating parameters for configuring a processor. More...
#include <Parameters.h>
Public Member Functions | |
Parameters () | |
Constructor. | |
~Parameters () | |
Destructor. | |
void | setParameters (std::map< std::string, std::any > parameters) |
Set the mapping of parameter names to value. | |
template<typename T > | |
void | addParameter (const std::string &name, const T &value) |
Add a parameter to the parameter list. | |
bool | exists (const std::string &name) const |
Check to see if a parameter exists. | |
template<typename T > | |
T | getParameter (const std::string &name) const |
Retrieve the parameter of the given name. | |
template<typename T > | |
T | getParameter (const std::string &name, const T &def) const |
Retrieve a parameter with a default specified. | |
std::vector< std::string > | keys () const |
Get a list of the keys available. | |
Private Attributes | |
std::map< std::string, std::any > | parameters_ |
Parameters. | |
Class encapsulating parameters for configuring a processor.
Definition at line 27 of file Parameters.h.
|
inline |
|
inline |
|
inline |
Add a parameter to the parameter list.
If the parameter already exists in the list, throw an exception.
[in] | name | Name of the parameter. |
[in] | value | The value of the parameter. |
Exception | if a parameter by that name already exist in the list. |
Definition at line 55 of file Parameters.h.
References exists(), and parameters_.
Referenced by eventdisplay::Display::SetFile().
|
inline |
Check to see if a parameter exists.
[in] | name | name of parameter to check |
Definition at line 71 of file Parameters.h.
References parameters_.
Referenced by addParameter(), hcal::HcalGeometryProvider::getCondition(), getParameter(), and getParameter().
|
inline |
Retrieve the parameter of the given name.
Exception | if parameter of the given name isn't found |
Exception | if parameter is found but not of the input type |
T | the data type to cast the parameter to. | |
[in] | name | the name of the parameter value to retrieve. |
Definition at line 89 of file Parameters.h.
References exists(), and parameters_.
Referenced by simcore::APrimePhysics::APrimePhysics(), simcore::Simulator::beforeNewRun(), ecal::EcalDigiProducer::configure(), ecal::EcalRawDecoder::configure(), ecal::EcalRawEncoder::configure(), ecal::EcalRecProducer::configure(), ecal::EcalTrigPrimDigiProducer::configure(), trigger::NtupleWriter::configure(), trigger::PropagationMapWriter::configure(), recon::EcalPreselectionSkimmer::configure(), packing::FiberTrackerRawDecoder::configure(), packing::WRRawDecoder::configure(), hcal::HcalDigiProducer::configure(), hcal::HcalRawDecoder::configure(), hcal::HcalRecProducer::configure(), hcal::HcalTrigPrimDigiProducer::configure(), hcal::HcalDoubleEndRecProducer::configure(), hcal::HcalSingleEndRecProducer::configure(), dqm::HCalDQM::configure(), dqm::HcalGeometryVerifier::configure(), dqm::HcalInefficiencyAnalyzer::configure(), dqm::HCalRawDigi::configure(), dqm::PhotoNuclearDQM::configure(), dqm::ReSimVerifier::configure(), ecal::DNNEcalVetoProcessor::configure(), ecal::EcalClusterProducer::configure(), ecal::EcalVetoProcessor::configure(), hcal::HcalClusterProducer::configure(), hcal::HcalVetoProcessor::configure(), hcal::HcalWABVetoProcessor::configure(), recon::BeamElectronLocator::configure(), recon::ElectronCounter::configure(), recon::MyProcessor::configure(), recon::OverlayProducer::configure(), recon::SequentialTrigger::configure(), recon::TriggerProcessor::configure(), simcore::ReSimulator::configure(), simcore::SimulatorBase::configure(), tracking::dqm::TrackingRecoDQM::configure(), tracking::reco::CKFProcessor::configure(), tracking::reco::DigitizationProcessor::configure(), tracking::reco::GSFProcessor::configure(), tracking::reco::SeedFinderProcessor::configure(), tracking::reco::TruthSeedProcessor::configure(), tracking::reco::Vertexer::configure(), tracking::reco::VertexProcessor::configure(), trigscint::EventReadoutProducer::configure(), trigscint::QIEAnalyzer::configure(), trigscint::QualityFlagAnalyzer::configure(), trigscint::TestBeamClusterAnalyzer::configure(), trigscint::TestBeamHitAnalyzer::configure(), trigscint::TestBeamHitProducer::configure(), trigscint::TrigScintDigiProducer::configure(), trigscint::TrigScintQIEDigiProducer::configure(), trigscint::TrigScintRecHitProducer::configure(), trigscint::TruthHitProducer::configure(), dqm::EcalDigiVerifier::configure(), dqm::EcalMipTrackingFeatures::configure(), dqm::EcalShowerFeatures::configure(), dqm::EcalVetoResults::configure(), dqm::SimObjects::configure(), dqm::Trigger::configure(), recon::ParticleFlow::configure(), recon::PFEcalClusterProducer::configure(), recon::PFHcalClusterProducer::configure(), recon::PFTrackProducer::configure(), recon::PFTruthProducer::configure(), trigger::EcalTPSelector::configure(), trigger::TrigEcalClusterProducer::configure(), trigger::TrigEcalEnergySum::configure(), trigger::TrigElectronProducer::configure(), trigger::TrigHcalEnergySum::configure(), trigscint::TestBeamClusterProducer::configure(), hcal::HcalAlignPolarfires::configure(), hcal::HcalPedestalAnalyzer::configure(), packing::RawIO::configure(), packing::SingleSubsystemPacker::configure(), packing::SingleSubsystemUnpacker::configure(), trigscint::QIEDecoder::configure(), trigscint::QIEEncoder::configure(), trigscint::TrigScintClusterProducer::configure(), trigscint::TrigScintFirmwareHitProducer::configure(), trigscint::TrigScintFirmwareTracker::configure(), trigscint::TrigScintTrackProducer::configure(), dqm::TrigScintClusterDQM::configure(), dqm::TrigScintDQM::configure(), dqm::TrigScintHitDQM::configure(), dqm::TrigScintTrackDQM::configure(), simcore::APrimePhysics::ConstructParticle(), simcore::APrimePhysics::ConstructProcess(), simcore::GammaPhysics::ConstructProcess(), simcore::biasoperators::DarkBrem::DarkBrem(), biasing::utility::DecayChildrenKeeper::DecayChildrenKeeper(), biasing::DeepEcalProcessFilter::DeepEcalProcessFilter(), biasing::EcalDarkBremFilter::EcalDarkBremFilter(), ldmx::EcalGeometry::EcalGeometry(), ecal::EcalGeometryProvider::EcalGeometryProvider(), simcore::EcalSD::EcalSD(), simcore::biasoperators::ElectroNuclear::ElectroNuclear(), framework::EventFile::EventFile(), packing::rawdatafile::File::File(), simcore::biasoperators::GammaToMuPair::GammaToMuPair(), simcore::geo::GDMLParser::GDMLParser(), simcore::generators::GeneralParticleSource::GeneralParticleSource(), hcal::HcalGeometryProvider::getCondition(), ldmx::HcalGeometry::HcalGeometry(), hcal::HcalReconConditionsProvider::HcalReconConditionsProvider(), simcore::HcalSD::HcalSD(), ldmx::HgcrocEmulator::HgcrocEmulator(), simcore::RunManager::Initialize(), simcore::biasoperators::K0LongInelastic::K0LongInelastic(), simcore::generators::LHEPrimaryGenerator::LHEPrimaryGenerator(), biasing::MidShowerDiMuonBkgdFilter::MidShowerDiMuonBkgdFilter(), biasing::MidShowerNuclearBkgdFilter::MidShowerNuclearBkgdFilter(), simcore::generators::MultiParticleGunPrimaryGenerator::MultiParticleGunPrimaryGenerator(), simcore::biasoperators::NeutronInelastic::NeutronInelastic(), biasing::NonFiducialFilter::NonFiducialFilter(), biasing::utility::PartialEnergySorter::PartialEnergySorter(), simcore::generators::ParticleGun::ParticleGun(), simcore::biasoperators::PhotoNuclear::PhotoNuclear(), biasing::PhotoNuclearProductsFilter::PhotoNuclearProductsFilter(), biasing::PrimaryToEcalFilter::PrimaryToEcalFilter(), framework::Process::Process(), framework::RandomNumberSeedService::RandomNumberSeedService(), simcore::RunManager::RunManager(), simcore::ScoringPlaneSD::ScoringPlaneSD(), simcore::RunManager::setupPhysics(), biasing::utility::StepPrinter::StepPrinter(), biasing::TaggerHitFilter::TaggerHitFilter(), biasing::TaggerVetoFilter::TaggerVetoFilter(), biasing::TargetBremFilter::TargetBremFilter(), biasing::TargetDarkBremFilter::TargetDarkBremFilter(), biasing::TargetENProcessFilter::TargetENProcessFilter(), biasing::TargetProcessFilter::TargetProcessFilter(), simcore::TrackerSD::TrackerSD(), biasing::utility::TrackProcessFilter::TrackProcessFilter(), and simcore::TrigScintSD::TrigScintSD().
|
inline |
Retrieve a parameter with a default specified.
Return the input default if a parameter is not found in map.
Definition at line 118 of file Parameters.h.
References exists().
|
inline |
Get a list of the keys available.
This may be helpful in debugging to make sure the parameters are spelled correctly.
Definition at line 130 of file Parameters.h.
References parameters_.
Referenced by hcal::HcalGeometryProvider::getCondition().
|
inline |
Set the mapping of parameter names to value.
[in,out] | parameters | mapping between parameter names and the corresponding value. |
Definition at line 41 of file Parameters.h.
References parameters_.
Referenced by framework::ConfigurePython::ConfigurePython(), eventdisplay::DetectorGeometry::DetectorGeometry(), and framework::getMembers().
|
private |
Definition at line 138 of file Parameters.h.
Referenced by addParameter(), exists(), getParameter(), keys(), and setParameters().