GENIEGenerator
Loading...
Searching...
No Matches
genie::Algorithm Class Reference

Algorithm abstract base class. More...

#include <Algorithm.h>

Inheritance diagram for genie::Algorithm:
[legend]
Collaboration diagram for genie::Algorithm:
[legend]

Public Member Functions

virtual ~Algorithm ()
virtual void Configure (const Registry &config)
virtual void Configure (string config)
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
virtual void SetId (string name, string config)
const AlgorithmSubAlg (const RgKey &registry_key) const
void AdoptConfig (void)
void AdoptSubstructure (void)
virtual void Print (ostream &stream) const
 Print algorithm info.

Static Public Member Functions

static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)

Protected Member Functions

 Algorithm ()
 Algorithm (string name)
 Algorithm (string name, string config)
void Initialize (void)
void DeleteConfig (void)
void DeleteSubstructure (void)
RegistryExtractLocalConfig (const Registry &in) const
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
template<class T>
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
template<class T>
bool GetParamDef (const RgKey &name, T &p, const T &def) const
template<class T>
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.

Protected Attributes

bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Private Attributes

RegistryfConfig
 Summary configuration derived from fConvVect, not necessarily allocated.

Friends

ostream & operator<< (ostream &stream, const Algorithm &alg)

Detailed Description

Algorithm abstract base class.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool

Marco Roda <mroda \at liverpool.ac.uk> University of Liverpool

Created:\n May 02, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 54 of file Algorithm.h.

Constructor & Destructor Documentation

◆ ~Algorithm()

Algorithm::~Algorithm ( )
virtual

Definition at line 56 of file Algorithm.cxx.

57{
58 this->DeleteConfig();
59 this->DeleteSubstructure();
60}
void DeleteSubstructure(void)
void DeleteConfig(void)

References DeleteConfig(), and DeleteSubstructure().

◆ Algorithm() [1/3]

Algorithm::Algorithm ( )
protected

Definition at line 38 of file Algorithm.cxx.

39{
40 this->Initialize();
41}
void Initialize(void)

References Initialize().

Referenced by AdoptSubstructure(), genie::AxialFormFactorModelI::AxialFormFactorModelI(), genie::AxialFormFactorModelI::AxialFormFactorModelI(), genie::AxialFormFactorModelI::AxialFormFactorModelI(), genie::hnl::ChannelCalculatorI::ChannelCalculatorI(), genie::hnl::ChannelCalculatorI::ChannelCalculatorI(), genie::hnl::ChannelCalculatorI::ChannelCalculatorI(), Compare(), Configure(), DeleteSubstructure(), genie::DISStructureFuncModelI::DISStructureFuncModelI(), genie::DISStructureFuncModelI::DISStructureFuncModelI(), genie::DISStructureFuncModelI::DISStructureFuncModelI(), genie::ELFormFactorsModelI::ELFormFactorsModelI(), genie::ELFormFactorsModelI::ELFormFactorsModelI(), genie::ELFormFactorsModelI::ELFormFactorsModelI(), genie::EngelFormFactor::EngelFormFactor(), genie::EngelFormFactor::EngelFormFactor(), genie::EventGeneratorListAssembler::EventGeneratorListAssembler(), genie::EventGeneratorListAssembler::EventGeneratorListAssembler(), genie::EventRecordVisitorI::EventRecordVisitorI(), genie::EventRecordVisitorI::EventRecordVisitorI(), genie::EventRecordVisitorI::EventRecordVisitorI(), genie::FragmentationFunctionI::FragmentationFunctionI(), genie::FragmentationFunctionI::FragmentationFunctionI(), genie::FragmentationFunctionI::FragmentationFunctionI(), GetConfig(), genie::HadronTensorModelI::HadronTensorModelI(), genie::HadronTensorModelI::HadronTensorModelI(), genie::HadronTensorModelI::HadronTensorModelI(), genie::InteractionListAssembler::InteractionListAssembler(), genie::InteractionListAssembler::InteractionListAssembler(), genie::InteractionListGeneratorI::InteractionListGeneratorI(), genie::InteractionListGeneratorI::InteractionListGeneratorI(), genie::InteractionListGeneratorI::InteractionListGeneratorI(), genie::InteractionSelectorI::InteractionSelectorI(), genie::InteractionSelectorI::InteractionSelectorI(), genie::InteractionSelectorI::InteractionSelectorI(), genie::mueloss::MuELossI::MuELossI(), genie::mueloss::MuELossI::MuELossI(), genie::mueloss::MuELossI::MuELossI(), genie::NuclearModelI::NuclearModelI(), genie::NuclearModelI::NuclearModelI(), genie::NuclearModelI::NuclearModelI(), operator<<, genie::PDFModelI::PDFModelI(), genie::PDFModelI::PDFModelI(), genie::PDFModelI::PDFModelI(), Print(), genie::QELFormFactorsModelI::QELFormFactorsModelI(), genie::QELFormFactorsModelI::QELFormFactorsModelI(), genie::QELFormFactorsModelI::QELFormFactorsModelI(), genie::QvalueShifter::QvalueShifter(), genie::QvalueShifter::QvalueShifter(), genie::RSHelicityAmplModelI::RSHelicityAmplModelI(), genie::RSHelicityAmplModelI::RSHelicityAmplModelI(), genie::RSHelicityAmplModelI::RSHelicityAmplModelI(), genie::SmithMonizUtils::SmithMonizUtils(), genie::SmithMonizUtils::SmithMonizUtils(), SubAlg(), genie::XSecAlgorithmI::XSecAlgorithmI(), genie::XSecAlgorithmI::XSecAlgorithmI(), genie::XSecAlgorithmI::XSecAlgorithmI(), genie::XSecIntegratorI::XSecIntegratorI(), genie::XSecIntegratorI::XSecIntegratorI(), genie::XSecIntegratorI::XSecIntegratorI(), and genie::XSecScaleI::XSecScaleI().

◆ Algorithm() [2/3]

Algorithm::Algorithm ( string name)
protected

Definition at line 43 of file Algorithm.cxx.

44{
45 this->Initialize();
46 fID.SetId(name);
47}
AlgId fID
algorithm name and configuration set
Definition Algorithm.h:165

References fID, and Initialize().

◆ Algorithm() [3/3]

Algorithm::Algorithm ( string name,
string config )
protected

Definition at line 49 of file Algorithm.cxx.

50{
51 this->Initialize();
52 fID.SetId(name,config);
53 this->FindConfig();
54}
virtual void FindConfig(void)

References fID, FindConfig(), and Initialize().

Member Function Documentation

◆ AddLowRegistry()

int Algorithm::AddLowRegistry ( Registry * rp,
bool owns = true )
protected

add registry with lowest priority, also update ownership

Definition at line 702 of file Algorithm.cxx.

702 {
703
704 fConfVect.push_back( rp ) ;
705 fOwnerships.push_back( own ) ;
706
707 if ( fConfig ) {
708 delete fConfig ;
709 fConfig = 0 ;
710 }
711
712 return fConfVect.size() ;
713
714}
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
Definition Algorithm.h:217
vector< bool > fOwnerships
ownership for every registry in fConfVect
Definition Algorithm.h:173
vector< Registry * > fConfVect
Definition Algorithm.h:170

References fConfig, fConfVect, and fOwnerships.

Referenced by genie::EventGenerator::Configure(), and FindConfig().

◆ AddTopRegisties()

int Algorithm::AddTopRegisties ( const vector< Registry * > & rs,
bool owns = false )
protected

Add registries with top priority, also udated Ownerships.

Definition at line 754 of file Algorithm.cxx.

754 {
755
756 fConfVect.insert( fConfVect.begin(), rs.begin(), rs.end() ) ;
757
758 fOwnerships.insert( fOwnerships.begin(), rs.size(), own ) ;
759
760 if ( fConfig ) {
761 delete fConfig ;
762 fConfig = 0 ;
763 }
764
765 return fConfVect.size() ;
766
767}

References fConfig, fConfVect, and fOwnerships.

◆ AddTopRegistry()

int Algorithm::AddTopRegistry ( Registry * rp,
bool owns = true )
protected

add registry with top priority, also update ownership

Definition at line 686 of file Algorithm.cxx.

686 {
687
688 fConfVect.insert( fConfVect.begin(), rp ) ;
689 fOwnerships.insert( fOwnerships.begin(), own ) ;
690
691 if ( fConfig ) {
692 delete fConfig ;
693 fConfig = 0 ;
694 }
695
696 return fConfVect.size() ;
697
698}

References fConfig, fConfVect, and fOwnerships.

Referenced by genie::EventGeneratorListAssembler::AssembleGeneratorList(), FindConfig(), and MergeTopRegistry().

◆ AdoptConfig()

void Algorithm::AdoptConfig ( void )

Clone the configuration registry looked up from the configuration pool and take its ownership

Definition at line 386 of file Algorithm.cxx.

386 {
387
388 LOG("Algorithm", pNOTICE)
389 << this->Id().Key() << " is taking ownership of its configuration";
390
391 // if(fOwnsConfig) {
392 // LOG("Algorithm", pWARN)
393 // << this->Id().Key() << " already owns its configuration!";
394 // return;
395 // }
396
397 this->Configure( GetConfig() );
398}
#define pNOTICE
Definition Messenger.h:61
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
string Key(void) const
Definition AlgId.h:46
virtual const Registry & GetConfig(void) const
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition Algorithm.h:98

References Configure(), GetConfig(), Id(), genie::AlgId::Key(), LOG, and pNOTICE.

◆ AdoptSubstructure()

void Algorithm::AdoptSubstructure ( void )

Take ownership of the algorithms subtructure (sub-algorithms,...) by copying them from the AlgFactory pool to the local pool Also bring all the configuration variables to the top level config Registry. This can be used to group together a series of algorithms & their configurations and extract (a clone of) this group from the shared pools. Having a series of algorithms/configurations behaving as a monolithic block, with a single point of configuration (the top level) is to be used when bits & pieces of GENIE are used in isolation for data fitting or reweighting

Definition at line 400 of file Algorithm.cxx.

401{
402// Take ownership of the algorithms subtructure (sub-algorithms,..) by copying
403// them from the AlgFactory pool to the local pool. Also bring all the
404// configuration variables to the top level. See the header for more details.
405// A secial naming convention is required for configuration parameter keys
406// for parameters belonging to sub-algorithms (or sub-algorithms of these
407// sub-algorithms and so on...).
408// The convention is: "sub-alg-key/sub-sub-alg-key/.../original name"
409// This is a recursive method: The AdoptSubtructure()of all sub-algorithms is
410// invoked.
411//
412 LOG("Algorithm", pNOTICE)
413 << "Algorithm: " << this->Id().Key() << " is adopting its substructure";
414
415// Registry deep_config;
416// deep_config.UnLock();
417// deep_config.SetName(this->Id().Key());
418
419 // deep_config.SetName(this->Id().Config() + ";D");
420 // fID.SetConfig(this->Id().Config() + ";D");
421
423
425 fOwnsSubstruc = true;
426
427 AlgFactory * algf = AlgFactory::Instance();
428
429 const RgIMap & rgmap = GetConfig().GetItemMap();
430
431 RgIMapConstIter iter = rgmap.begin();
432 for( ; iter != rgmap.end(); ++iter) {
433
434 RgKey reg_key = iter->first;
435 RegistryItemI * ri = iter->second;
436
437 if(ri->TypeInfo() == kRgAlg) {
438 LOG("Algorithm", pDEBUG)
439 << "Found sub-algorithm pointed to by " << reg_key;
440 RgAlg reg_alg = fConfig->GetAlg(reg_key);
441 AlgId id(reg_alg);
442
443 LOG("Algorithm", pDEBUG) << "Adopting sub-algorithm = " << id.Key();
444 Algorithm * subalg = algf->AdoptAlgorithm(id.Name(),id.Config());
445 subalg->AdoptSubstructure();
446
447 LOG("Algorithm", pDEBUG) << "Adding sub-algorithm to local pool";
448 AlgMapPair key_alg_pair(reg_key, subalg);
449 fOwnedSubAlgMp->insert(key_alg_pair);
450
451 }
452
453 }
454
455
456 if ( fConfig ) {
457 delete fConfig ;
458 fConfig = 0 ;
459 }
460
461}
#define pDEBUG
Definition Messenger.h:63
string RgKey
static AlgFactory * Instance()
Algorithm * AdoptAlgorithm(const AlgId &algid) const
void AdoptSubstructure(void)
bool fOwnsSubstruc
true if it owns its substructure (sub-algs,...)
Definition Algorithm.h:164
AlgMap * fOwnedSubAlgMp
local pool for owned sub-algs (taken out of the factory pool)
Definition Algorithm.h:176
virtual RgType_t TypeInfo(void) const =0
const RgIMap & GetItemMap(void) const
Definition Registry.h:161
map< RgKey, RegistryItemI * > RgIMap
Definition Registry.h:45
map< RgKey, RegistryItemI * >::const_iterator RgIMapConstIter
Definition Registry.h:49
pair< string, Algorithm * > AlgMapPair
Definition Algorithm.h:52
map< string, Algorithm * > AlgMap
Definition Algorithm.h:49

References genie::AlgFactory::AdoptAlgorithm(), AdoptSubstructure(), Algorithm(), DeleteSubstructure(), fConfig, fOwnedSubAlgMp, fOwnsSubstruc, GetConfig(), genie::Registry::GetItemMap(), Id(), genie::AlgFactory::Instance(), genie::AlgId::Key(), genie::kRgAlg, LOG, pDEBUG, pNOTICE, and genie::RegistryItemI::TypeInfo().

Referenced by AdoptSubstructure(), main(), and testReconfigInOwnedModules().

◆ AllowReconfig()

virtual bool genie::Algorithm::AllowReconfig ( void ) const
inlinevirtual

Allow reconfigration after initializaton? Algorithms may opt-out, if reconfiguration is not necessary, to improve event reweighting speed.

Definition at line 106 of file Algorithm.h.

106{ return fAllowReconfig; }

References fAllowReconfig.

Referenced by genie::AlgFactory::ForceReconfiguration().

◆ BuildParamMatColSizeKey()

string Algorithm::BuildParamMatColSizeKey ( const std::string & comm_name)
static

Definition at line 545 of file Algorithm.cxx.

545 {
546
547 return "Ncol" + comm_name + 's' ;
548
549}

Referenced by genie::AlgConfigPool::AddParameterMatrix(), genie::AlgConfigPool::AddParameterMatrix(), and GetParamMatKeys().

◆ BuildParamMatKey()

string Algorithm::BuildParamMatKey ( const std::string & comm_name,
unsigned int i,
unsigned int j )
static

Definition at line 527 of file Algorithm.cxx.

527 {
528
529 std::stringstream name;
530 name << comm_name << '-' << i << "-" << j ;
531 return name.str() ;
532
533}

Referenced by genie::AlgConfigPool::AddParameterMatrix(), genie::AlgConfigPool::AddParameterMatrix(), and GetParamMatKeys().

◆ BuildParamMatRowSizeKey()

string Algorithm::BuildParamMatRowSizeKey ( const std::string & comm_name)
static

Definition at line 537 of file Algorithm.cxx.

537 {
538
539 return "Nrow" + comm_name + 's' ;
540
541}

Referenced by genie::AlgConfigPool::AddParameterMatrix(), genie::AlgConfigPool::AddParameterMatrix(), and GetParamMatKeys().

◆ BuildParamVectKey()

string Algorithm::BuildParamVectKey ( const std::string & comm_name,
unsigned int i )
static

Definition at line 510 of file Algorithm.cxx.

510 {
511
512 std::stringstream name;
513 name << comm_name << '-' << i ;
514 return name.str() ;
515
516}

Referenced by genie::AlgConfigPool::AddParameterVector(), and GetParamVectKeys().

◆ BuildParamVectSizeKey()

string Algorithm::BuildParamVectSizeKey ( const std::string & comm_name)
static

Definition at line 520 of file Algorithm.cxx.

520 {
521
522 return 'N' + comm_name + 's' ;
523
524}

Referenced by genie::AlgConfigPool::AddParameterVector(), and GetParamVectKeys().

◆ Compare()

AlgCmp_t Algorithm::Compare ( const Algorithm * alg) const
virtual

Compare with input algorithm.

Definition at line 286 of file Algorithm.cxx.

287{
288// Compares itself with the input algorithm
289
290 string alg1 = this->Id().Name();
291 string config1 = this->Id().Config();
292 string alg2 = algo->Id().Name();
293 string config2 = algo->Id().Config();
294
295 if(alg1 == alg2)
296 {
297 if(config1 == config2) return kAlgCmpIdentical;
298 else return kAlgCmpDiffConfig;
299 }
300 else return kAlgCmpDiffAlg;
301
302 return kAlgCmpUnknown;
303}
string Config(void) const
Definition AlgId.h:45
string Name(void) const
Definition AlgId.h:44
@ kAlgCmpDiffConfig
Definition AlgCmp.h:31
@ kAlgCmpIdentical
Definition AlgCmp.h:30
@ kAlgCmpUnknown
Definition AlgCmp.h:29
@ kAlgCmpDiffAlg
Definition AlgCmp.h:32

References Algorithm(), genie::AlgId::Config(), Id(), genie::kAlgCmpDiffAlg, genie::kAlgCmpDiffConfig, genie::kAlgCmpIdentical, genie::kAlgCmpUnknown, and genie::AlgId::Name().

◆ Configure() [1/2]

void Algorithm::Configure ( const Registry & config)
virtual

Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority

Reimplemented in genie::AGCharmPythiaBaseHadro2023, genie::AGKY2019, genie::AGKYLowW2019, genie::AhrensDMELPXSec, genie::AhrensNCELPXSec, genie::AivazisCharmPXSecLO, genie::AlamSimoAtharVacasSKPXSec2014, genie::AlamSimoAtharVacasSKXSec, genie::AlvarezRusoCOHPiPXSec, genie::BardinIMDRadCorPXSec, genie::BBA03ELFormFactorsModel, genie::BBA05ELFormFactorsModel, genie::BBA07ELFormFactorsModel, genie::BergerSehgalCOHPiPXSec2015, genie::BergerSehgalFMCOHPiPXSec2015, genie::BertuzzoDNuCOHPXSec, genie::BostedChristyEMPXSec, genie::BSKLNBaseRESPXSec2014, genie::BYPDF, genie::BYStrucFunc, genie::CascadeReweight, genie::CEvNSEventGenerator, genie::CEvNSXSec, genie::COHDNuEventGenerator, genie::COHDNuInteractionListGenerator, genie::COHDNuXSec, genie::COHInteractionListGenerator, genie::COHKinematicsGenerator, genie::COHXSec, genie::COHXSecAR, genie::CollinsSpillerFragm, genie::DarkSectorDecayer, genie::Decayer, genie::DFRInteractionListGenerator, genie::DFRKinematicsGenerator, genie::DFRXSec, genie::DipoleAxialFormFactorModel, genie::DipoleELFormFactorsModel, genie::DISHadronicSystemGenerator, genie::DISInteractionListGenerator, genie::DISKinematicsGenerator, genie::DISXSec, genie::DMBYStrucFunc, genie::DMDISInteractionListGenerator, genie::DMDISKinematicsGenerator, genie::DMDISXSec, genie::DMEInteractionListGenerator, genie::DMEKinematicsGenerator, genie::DMElectronPXSec, genie::DMElectronXSec, genie::DMELEventGenerator, genie::DMELInteractionListGenerator, genie::DMELKinematicsGenerator, genie::DMELXSec, genie::EffectiveSF, genie::EmpiricalMECPXSec2015, genie::EngelFormFactor, genie::EventGenerator, genie::evtlib::EventLibraryInterface, genie::evtlib::EvtLibInteractionListGenerator, genie::evtlib::EvtLibPXSec, genie::FermiMover, genie::FGMBodekRitchie, genie::GalsterELFormFactorsModel, genie::GLRESGenerator, genie::GLRESPXSec, genie::GLRESWdecPythia6, genie::GLRESWdecPythia8, genie::GRV98LO, genie::H3AMNuGammaPXSec, genie::HadronTransporter, genie::HEDISGenerator, genie::HEDISInteractionListGenerator, genie::HEDISKinematicsGenerator, genie::HEDISPXSec, genie::HEDISXSec, genie::HELeptonInteractionListGenerator, genie::HELeptonKinematicsGenerator, genie::HELeptonXSec, genie::HENuElGenerator, genie::HENuElPXSec, genie::hnl::BRCalculator, genie::hnl::ChannelCalculatorI, genie::hnl::Decayer, genie::hnl::FluxCreator, genie::hnl::VertexGenerator, genie::HybridXSecAlgorithm, genie::IBDInteractionListGenerator, genie::IBDKinematicsGenerator, genie::IBDXSecMap, genie::IMDAnnihilationPXSec, genie::IMDXSec, genie::Intranuke2018, genie::Intranuke2025, genie::Intranuke, genie::INukeDeltaPropg, genie::KLVOxygenIBDPXSec, genie::KNOTunedQPMDISPXSec, genie::KovalenkoQELCharmPXSec, genie::LeptoHadPythia6, genie::LeptoHadPythia8, genie::LHAPDF5, genie::LHAPDF6, genie::LocalFGM, genie::LwlynSmithFF, genie::LwlynSmithQELCCPXSec, genie::MartiniEricsonChanfrayMarteauMECPXSec2016, genie::MArunAxialFormFactorModel, genie::MECGenerator, genie::MECInteractionListGenerator, genie::MECXSec, genie::MKFFEM, genie::MKSPPPXSec2020, genie::NewQELXSec, genie::NievesQELCCPXSec, genie::NievesSimoVacasMECPXSec2016, genie::NNBarOscPrimaryVtxGenerator, genie::NormGenerator, genie::NormInteractionListGenerator, genie::NormXSec, genie::NucBindEnergyAggregator, genie::NucDeExcitationSim, genie::NuclearModelMap, genie::NucleonDecayPrimaryVtxGenerator, genie::NuEInteractionListGenerator, genie::NuEKinematicsGenerator, genie::NuElectronPXSec, genie::NuElectronXSec, genie::OutgoingDarkGenerator, genie::P33PaschosLalakulichPXSec, genie::PaisQELLambdaPXSec, genie::PattonCEvNSPXSec, genie::PauliBlocker, genie::PetersonFragm, genie::PhotonCOHGenerator, genie::PhotonCOHPXSec, genie::PhotonCOHWdecPythia6, genie::PhotonCOHWdecPythia8, genie::PhotonRESGenerator, genie::PhotonRESPXSec, genie::PhotonRESWdecPythia6, genie::PhotonRESWdecPythia8, genie::PhysInteractionSelector, genie::PrimaryLeptonGenerator, genie::Pythia6Hadro2019, genie::Pythia8Hadro2019, genie::QELEventGenerator, genie::QELEventGeneratorSM, genie::QELEventGeneratorSuSA, genie::QELInteractionListGenerator, genie::QELKinematicsGenerator, genie::QELXSec, genie::QPMDISPXSec, genie::QPMDISStrucFuncBase, genie::QPMDMDISPXSec, genie::QPMDMDISStrucFuncBase, genie::QvalueShifter, genie::ReinDFRPXSec, genie::ReinSehgalCOHPiPXSec, genie::ReinSehgalRESPXSec, genie::ReinSehgalRESXSec, genie::ReinSehgalRESXSecFast, genie::ReinSehgalSPPPXSec, genie::ReinSehgalSPPXSec, genie::RESHadronicSystemGenerator, genie::RESInteractionListGenerator, genie::RESKinematicsGenerator, genie::RESXSec, genie::RosenbluthPXSec, genie::RSHelicityAmplModelNCn, genie::RSHelicityAmplModelNCp, genie::RSPPInteractionListGenerator, genie::RSPPResonanceSelector, genie::SKInteractionListGenerator, genie::SKKinematicsGenerator, genie::SlowRsclCharmDISPXSecLO, genie::SmithMonizQELCCPXSec, genie::SmithMonizQELCCXSec, genie::SmithMonizUtils, genie::SpectralFunc1d, genie::SpectralFunc, genie::SpectralFunction2p2h, genie::SPPEventGenerator, genie::SPPXSec, genie::SRCNuclearRecoil, genie::StrumiaVissaniIBDPXSec, genie::SuSAv2MECPXSec, genie::SuSAv2QELPXSec, genie::TabulatedHadronTensorModelI, genie::TransverseEnhancementFFModel, genie::UnstableParticleDecayer, genie::VertexGenerator, genie::XSecLinearCombinations, genie::XSecScaleI, genie::ZExpAxialFormFactorModel, and genie::ZExpELFormFactorModel.

Definition at line 62 of file Algorithm.cxx.

63{
64// Configure the Algorithm using the input configuration Registry
65
66 LOG("Algorithm", pNOTICE) << "Input configuration: " << config;
67
68 if ( config.NEntries() <= 0 ) {
69
70 LOG("Algorithm", pNOTICE) "Registry " << config.Name() << " is empty. Not added to " << fID.Name();
71 return;
72 }
73
74 Registry* rp = ExtractLocalConfig( config ) ;
75 if ( rp ) {
76
77 MergeTopRegistry( *rp ) ;
78 LOG("Algorithm", pNOTICE) << fID.Name() << " merged with external configuration: " << *rp;
79
80 // The memory handled by this pointer has been copied and needs to be cleared
81 delete rp ;
82 }
83
84 if(!fOwnsSubstruc) return; // doesn't own substructure
85 if(fOwnedSubAlgMp->size()==0) return; // no sub-algorithms
86
87 LOG("Algorithm", pNOTICE) << "Configuring algorithms stored at local pool";
88
89 // loop over local pool algorithms
90
91 for( AlgMapIter alg_iter = fOwnedSubAlgMp->begin();
92 alg_iter != fOwnedSubAlgMp->end(); ++alg_iter) {
93
94 string alg_key = alg_iter->first;
95 Algorithm * alg = alg_iter->second;
96
97 if(!alg) {
98 LOG("Algorithm", pERROR)
99 << "Key: " << alg_key << " points to a null algorithm at local pool";
100 continue;
101 }
102
103 LOG("Algorithm", pNOTICE) << "Configuring sub-alg: " << alg->Id().Key();
104
105 rp = ExtractLowerConfig( config, alg_key ) ;
106 if ( rp ) {
107
108 alg -> Configure( *rp ) ;
109
110 delete rp ;
111
112 }
113
114 }
115
116}
#define pERROR
Definition Messenger.h:59
Registry * ExtractLowerConfig(const Registry &in, const string &alg_key) const
Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
Registry * ExtractLocalConfig(const Registry &in) const
int MergeTopRegistry(const Registry &r)
string Name(void) const
get the registry name
Definition Registry.cxx:597
int NEntries(void) const
get number of items
Definition Registry.cxx:582
map< string, Algorithm * >::iterator AlgMapIter
Definition Algorithm.h:50

References Algorithm(), Configure(), ExtractLocalConfig(), ExtractLowerConfig(), fID, fOwnedSubAlgMp, fOwnsSubstruc, Id(), genie::AlgId::Key(), LOG, MergeTopRegistry(), pERROR, and pNOTICE.

Referenced by AdoptConfig(), genie::AGCharmPythiaBaseHadro2023::Configure(), genie::AGCharmPythiaBaseHadro2023::Configure(), genie::AGKY2019::Configure(), genie::AGKY2019::Configure(), genie::AGKYLowW2019::Configure(), genie::AGKYLowW2019::Configure(), genie::AhrensDMELPXSec::Configure(), genie::AhrensDMELPXSec::Configure(), genie::AhrensNCELPXSec::Configure(), genie::AhrensNCELPXSec::Configure(), genie::AivazisCharmPXSecLO::Configure(), genie::AivazisCharmPXSecLO::Configure(), genie::AlamSimoAtharVacasSKPXSec2014::Configure(), genie::AlamSimoAtharVacasSKPXSec2014::Configure(), genie::AlamSimoAtharVacasSKXSec::Configure(), genie::AlamSimoAtharVacasSKXSec::Configure(), Configure(), genie::AlvarezRusoCOHPiPXSec::Configure(), genie::AlvarezRusoCOHPiPXSec::Configure(), genie::BardinIMDRadCorPXSec::Configure(), genie::BardinIMDRadCorPXSec::Configure(), genie::BBA03ELFormFactorsModel::Configure(), genie::BBA03ELFormFactorsModel::Configure(), genie::BBA05ELFormFactorsModel::Configure(), genie::BBA05ELFormFactorsModel::Configure(), genie::BBA07ELFormFactorsModel::Configure(), genie::BBA07ELFormFactorsModel::Configure(), genie::BergerSehgalCOHPiPXSec2015::Configure(), genie::BergerSehgalCOHPiPXSec2015::Configure(), genie::BergerSehgalFMCOHPiPXSec2015::Configure(), genie::BergerSehgalFMCOHPiPXSec2015::Configure(), genie::BertuzzoDNuCOHPXSec::Configure(), genie::BertuzzoDNuCOHPXSec::Configure(), genie::BostedChristyEMPXSec::Configure(), genie::BostedChristyEMPXSec::Configure(), genie::BSKLNBaseRESPXSec2014::Configure(), genie::BSKLNBaseRESPXSec2014::Configure(), genie::BYPDF::Configure(), genie::BYPDF::Configure(), genie::CascadeReweight::Configure(), genie::CascadeReweight::Configure(), genie::CEvNSEventGenerator::Configure(), genie::CEvNSEventGenerator::Configure(), genie::CEvNSXSec::Configure(), genie::CEvNSXSec::Configure(), genie::COHDNuEventGenerator::Configure(), genie::COHDNuEventGenerator::Configure(), genie::COHDNuInteractionListGenerator::Configure(), genie::COHDNuInteractionListGenerator::Configure(), genie::COHDNuXSec::Configure(), genie::COHDNuXSec::Configure(), genie::COHInteractionListGenerator::Configure(), genie::COHInteractionListGenerator::Configure(), genie::COHKinematicsGenerator::Configure(), genie::COHKinematicsGenerator::Configure(), genie::COHXSec::Configure(), genie::COHXSec::Configure(), genie::COHXSecAR::Configure(), genie::COHXSecAR::Configure(), genie::CollinsSpillerFragm::Configure(), genie::CollinsSpillerFragm::Configure(), genie::DarkSectorDecayer::Configure(), genie::DarkSectorDecayer::Configure(), genie::Decayer::Configure(), genie::Decayer::Configure(), genie::DFRInteractionListGenerator::Configure(), genie::DFRInteractionListGenerator::Configure(), genie::DFRKinematicsGenerator::Configure(), genie::DFRKinematicsGenerator::Configure(), genie::DFRXSec::Configure(), genie::DFRXSec::Configure(), genie::DipoleAxialFormFactorModel::Configure(), genie::DipoleAxialFormFactorModel::Configure(), genie::DipoleELFormFactorsModel::Configure(), genie::DipoleELFormFactorsModel::Configure(), genie::DISHadronicSystemGenerator::Configure(), genie::DISHadronicSystemGenerator::Configure(), genie::DISInteractionListGenerator::Configure(), genie::DISInteractionListGenerator::Configure(), genie::DISKinematicsGenerator::Configure(), genie::DISKinematicsGenerator::Configure(), genie::DISXSec::Configure(), genie::DISXSec::Configure(), genie::DMDISInteractionListGenerator::Configure(), genie::DMDISInteractionListGenerator::Configure(), genie::DMDISKinematicsGenerator::Configure(), genie::DMDISKinematicsGenerator::Configure(), genie::DMDISXSec::Configure(), genie::DMDISXSec::Configure(), genie::DMEInteractionListGenerator::Configure(), genie::DMEInteractionListGenerator::Configure(), genie::DMEKinematicsGenerator::Configure(), genie::DMEKinematicsGenerator::Configure(), genie::DMElectronPXSec::Configure(), genie::DMElectronPXSec::Configure(), genie::DMElectronXSec::Configure(), genie::DMElectronXSec::Configure(), genie::DMELEventGenerator::Configure(), genie::DMELEventGenerator::Configure(), genie::DMELInteractionListGenerator::Configure(), genie::DMELInteractionListGenerator::Configure(), genie::DMELKinematicsGenerator::Configure(), genie::DMELKinematicsGenerator::Configure(), genie::DMELXSec::Configure(), genie::DMELXSec::Configure(), genie::EffectiveSF::Configure(), genie::EffectiveSF::Configure(), genie::EmpiricalMECPXSec2015::Configure(), genie::EmpiricalMECPXSec2015::Configure(), genie::EngelFormFactor::Configure(), genie::EngelFormFactor::Configure(), genie::EventGenerator::Configure(), genie::EventGenerator::Configure(), genie::evtlib::EventLibraryInterface::Configure(), genie::evtlib::EventLibraryInterface::Configure(), genie::evtlib::EvtLibInteractionListGenerator::Configure(), genie::evtlib::EvtLibInteractionListGenerator::Configure(), genie::evtlib::EvtLibPXSec::Configure(), genie::evtlib::EvtLibPXSec::Configure(), genie::FermiMover::Configure(), genie::FermiMover::Configure(), genie::FGMBodekRitchie::Configure(), genie::FGMBodekRitchie::Configure(), genie::GalsterELFormFactorsModel::Configure(), genie::GalsterELFormFactorsModel::Configure(), genie::GLRESGenerator::Configure(), genie::GLRESGenerator::Configure(), genie::GLRESPXSec::Configure(), genie::GLRESPXSec::Configure(), genie::GLRESWdecPythia6::Configure(), genie::GLRESWdecPythia6::Configure(), genie::GLRESWdecPythia8::Configure(), genie::GLRESWdecPythia8::Configure(), genie::GRV98LO::Configure(), genie::GRV98LO::Configure(), genie::H3AMNuGammaPXSec::Configure(), genie::H3AMNuGammaPXSec::Configure(), genie::HadronTransporter::Configure(), genie::HadronTransporter::Configure(), genie::HAIntranuke::Configure(), genie::HEDISGenerator::Configure(), genie::HEDISGenerator::Configure(), genie::HEDISInteractionListGenerator::Configure(), genie::HEDISInteractionListGenerator::Configure(), genie::HEDISKinematicsGenerator::Configure(), genie::HEDISKinematicsGenerator::Configure(), genie::HEDISPXSec::Configure(), genie::HEDISPXSec::Configure(), genie::HEDISXSec::Configure(), genie::HEDISXSec::Configure(), genie::HELeptonInteractionListGenerator::Configure(), genie::HELeptonInteractionListGenerator::Configure(), genie::HELeptonKinematicsGenerator::Configure(), genie::HELeptonKinematicsGenerator::Configure(), genie::HELeptonXSec::Configure(), genie::HELeptonXSec::Configure(), genie::HENuElGenerator::Configure(), genie::HENuElGenerator::Configure(), genie::HENuElPXSec::Configure(), genie::HENuElPXSec::Configure(), genie::hnl::BRCalculator::Configure(), genie::hnl::BRCalculator::Configure(), genie::hnl::Decayer::Configure(), genie::hnl::Decayer::Configure(), genie::hnl::FluxCreator::Configure(), genie::hnl::FluxCreator::Configure(), genie::hnl::VertexGenerator::Configure(), genie::hnl::VertexGenerator::Configure(), genie::HybridXSecAlgorithm::Configure(), genie::IBDInteractionListGenerator::Configure(), genie::IBDInteractionListGenerator::Configure(), genie::IBDKinematicsGenerator::Configure(), genie::IBDKinematicsGenerator::Configure(), genie::IBDXSecMap::Configure(), genie::IBDXSecMap::Configure(), genie::IMDAnnihilationPXSec::Configure(), genie::IMDAnnihilationPXSec::Configure(), genie::IMDXSec::Configure(), genie::IMDXSec::Configure(), genie::Intranuke2018::Configure(), genie::Intranuke2018::Configure(), genie::Intranuke2025::Configure(), genie::Intranuke2025::Configure(), genie::Intranuke::Configure(), genie::Intranuke::Configure(), genie::INukeDeltaPropg::Configure(), genie::INukeDeltaPropg::Configure(), genie::KLVOxygenIBDPXSec::Configure(), genie::KLVOxygenIBDPXSec::Configure(), genie::KNOTunedQPMDISPXSec::Configure(), genie::KNOTunedQPMDISPXSec::Configure(), genie::KovalenkoQELCharmPXSec::Configure(), genie::KovalenkoQELCharmPXSec::Configure(), genie::LeptoHadPythia6::Configure(), genie::LeptoHadPythia6::Configure(), genie::LeptoHadPythia8::Configure(), genie::LeptoHadPythia8::Configure(), genie::LHAPDF5::Configure(), genie::LHAPDF5::Configure(), genie::LHAPDF6::Configure(), genie::LHAPDF6::Configure(), genie::LocalFGM::Configure(), genie::LocalFGM::Configure(), genie::LwlynSmithFF::Configure(), genie::LwlynSmithFF::Configure(), genie::LwlynSmithQELCCPXSec::Configure(), genie::LwlynSmithQELCCPXSec::Configure(), genie::MartiniEricsonChanfrayMarteauMECPXSec2016::Configure(), genie::MartiniEricsonChanfrayMarteauMECPXSec2016::Configure(), genie::MArunAxialFormFactorModel::Configure(), genie::MArunAxialFormFactorModel::Configure(), genie::MECGenerator::Configure(), genie::MECGenerator::Configure(), genie::MECInteractionListGenerator::Configure(), genie::MECInteractionListGenerator::Configure(), genie::MECXSec::Configure(), genie::MECXSec::Configure(), genie::MKFFEM::Configure(), genie::MKFFEM::Configure(), genie::MKSPPPXSec2020::Configure(), genie::MKSPPPXSec2020::Configure(), genie::NewQELXSec::Configure(), genie::NievesQELCCPXSec::Configure(), genie::NievesQELCCPXSec::Configure(), genie::NievesSimoVacasMECPXSec2016::Configure(), genie::NievesSimoVacasMECPXSec2016::Configure(), genie::NNBarOscPrimaryVtxGenerator::Configure(), genie::NNBarOscPrimaryVtxGenerator::Configure(), genie::NormGenerator::Configure(), genie::NormGenerator::Configure(), genie::NormInteractionListGenerator::Configure(), genie::NormInteractionListGenerator::Configure(), genie::NormXSec::Configure(), genie::NormXSec::Configure(), genie::NucBindEnergyAggregator::Configure(), genie::NucBindEnergyAggregator::Configure(), genie::NucDeExcitationSim::Configure(), genie::NucDeExcitationSim::Configure(), genie::NuclearModelMap::Configure(), genie::NuclearModelMap::Configure(), genie::NucleonDecayPrimaryVtxGenerator::Configure(), genie::NucleonDecayPrimaryVtxGenerator::Configure(), genie::NuEInteractionListGenerator::Configure(), genie::NuEInteractionListGenerator::Configure(), genie::NuEKinematicsGenerator::Configure(), genie::NuEKinematicsGenerator::Configure(), genie::NuElectronPXSec::Configure(), genie::NuElectronPXSec::Configure(), genie::NuElectronXSec::Configure(), genie::NuElectronXSec::Configure(), genie::OutgoingDarkGenerator::Configure(), genie::OutgoingDarkGenerator::Configure(), genie::P33PaschosLalakulichPXSec::Configure(), genie::P33PaschosLalakulichPXSec::Configure(), genie::PaisQELLambdaPXSec::Configure(), genie::PaisQELLambdaPXSec::Configure(), genie::PattonCEvNSPXSec::Configure(), genie::PattonCEvNSPXSec::Configure(), genie::PauliBlocker::Configure(), genie::PauliBlocker::Configure(), genie::PetersonFragm::Configure(), genie::PetersonFragm::Configure(), genie::PhotonCOHGenerator::Configure(), genie::PhotonCOHGenerator::Configure(), genie::PhotonCOHPXSec::Configure(), genie::PhotonCOHPXSec::Configure(), genie::PhotonCOHWdecPythia6::Configure(), genie::PhotonCOHWdecPythia6::Configure(), genie::PhotonCOHWdecPythia8::Configure(), genie::PhotonCOHWdecPythia8::Configure(), genie::PhotonRESGenerator::Configure(), genie::PhotonRESGenerator::Configure(), genie::PhotonRESPXSec::Configure(), genie::PhotonRESPXSec::Configure(), genie::PhotonRESWdecPythia6::Configure(), genie::PhotonRESWdecPythia6::Configure(), genie::PhotonRESWdecPythia8::Configure(), genie::PhotonRESWdecPythia8::Configure(), genie::PhysInteractionSelector::Configure(), genie::PhysInteractionSelector::Configure(), genie::PrimaryLeptonGenerator::Configure(), genie::PrimaryLeptonGenerator::Configure(), genie::Pythia6Hadro2019::Configure(), genie::Pythia6Hadro2019::Configure(), genie::Pythia8Hadro2019::Configure(), genie::Pythia8Hadro2019::Configure(), genie::QELEventGenerator::Configure(), genie::QELEventGenerator::Configure(), genie::QELEventGeneratorSM::Configure(), genie::QELEventGeneratorSM::Configure(), genie::QELEventGeneratorSuSA::Configure(), genie::QELEventGeneratorSuSA::Configure(), genie::QELInteractionListGenerator::Configure(), genie::QELInteractionListGenerator::Configure(), genie::QELKinematicsGenerator::Configure(), genie::QELKinematicsGenerator::Configure(), genie::QELXSec::Configure(), genie::QELXSec::Configure(), genie::QPMDISPXSec::Configure(), genie::QPMDISPXSec::Configure(), genie::QPMDISStrucFuncBase::Configure(), genie::QPMDISStrucFuncBase::Configure(), genie::QPMDMDISPXSec::Configure(), genie::QPMDMDISPXSec::Configure(), genie::QPMDMDISStrucFuncBase::Configure(), genie::QPMDMDISStrucFuncBase::Configure(), genie::QvalueShifter::Configure(), genie::QvalueShifter::Configure(), genie::ReinDFRPXSec::Configure(), genie::ReinDFRPXSec::Configure(), genie::ReinSehgalCOHPiPXSec::Configure(), genie::ReinSehgalCOHPiPXSec::Configure(), genie::ReinSehgalRESPXSec::Configure(), genie::ReinSehgalRESPXSec::Configure(), genie::ReinSehgalRESXSec::Configure(), genie::ReinSehgalRESXSec::Configure(), genie::ReinSehgalRESXSecFast::Configure(), genie::ReinSehgalRESXSecFast::Configure(), genie::ReinSehgalSPPPXSec::Configure(), genie::ReinSehgalSPPPXSec::Configure(), genie::ReinSehgalSPPXSec::Configure(), genie::ReinSehgalSPPXSec::Configure(), genie::RESHadronicSystemGenerator::Configure(), genie::RESHadronicSystemGenerator::Configure(), genie::RESInteractionListGenerator::Configure(), genie::RESInteractionListGenerator::Configure(), genie::RESKinematicsGenerator::Configure(), genie::RESKinematicsGenerator::Configure(), genie::RESXSec::Configure(), genie::RESXSec::Configure(), genie::RosenbluthPXSec::Configure(), genie::RosenbluthPXSec::Configure(), genie::RSHelicityAmplModelNCn::Configure(), genie::RSHelicityAmplModelNCn::Configure(), genie::RSHelicityAmplModelNCp::Configure(), genie::RSHelicityAmplModelNCp::Configure(), genie::RSPPInteractionListGenerator::Configure(), genie::RSPPInteractionListGenerator::Configure(), genie::RSPPResonanceSelector::Configure(), genie::RSPPResonanceSelector::Configure(), genie::SKInteractionListGenerator::Configure(), genie::SKInteractionListGenerator::Configure(), genie::SKKinematicsGenerator::Configure(), genie::SKKinematicsGenerator::Configure(), genie::SlowRsclCharmDISPXSecLO::Configure(), genie::SlowRsclCharmDISPXSecLO::Configure(), genie::SmithMonizQELCCPXSec::Configure(), genie::SmithMonizQELCCPXSec::Configure(), genie::SmithMonizQELCCXSec::Configure(), genie::SmithMonizQELCCXSec::Configure(), genie::SmithMonizUtils::Configure(), genie::SmithMonizUtils::Configure(), genie::SpectralFunc1d::Configure(), genie::SpectralFunc1d::Configure(), genie::SpectralFunc::Configure(), genie::SpectralFunc::Configure(), genie::SpectralFunction2p2h::Configure(), genie::SpectralFunction2p2h::Configure(), genie::SPPEventGenerator::Configure(), genie::SPPEventGenerator::Configure(), genie::SPPXSec::Configure(), genie::SPPXSec::Configure(), genie::SRCNuclearRecoil::Configure(), genie::SRCNuclearRecoil::Configure(), genie::StrumiaVissaniIBDPXSec::Configure(), genie::StrumiaVissaniIBDPXSec::Configure(), genie::SuSAv2MECPXSec::Configure(), genie::SuSAv2QELPXSec::Configure(), genie::TabulatedHadronTensorModelI::Configure(), genie::TabulatedHadronTensorModelI::Configure(), genie::TransverseEnhancementFFModel::Configure(), genie::TransverseEnhancementFFModel::Configure(), genie::UnstableParticleDecayer::Configure(), genie::UnstableParticleDecayer::Configure(), genie::VertexGenerator::Configure(), genie::VertexGenerator::Configure(), genie::XSecLinearCombinations::Configure(), genie::XSecLinearCombinations::Configure(), genie::XSecScaleI::Configure(), genie::XSecScaleI::Configure(), genie::ZExpAxialFormFactorModel::Configure(), genie::ZExpAxialFormFactorModel::Configure(), genie::ZExpELFormFactorModel::Configure(), genie::ZExpELFormFactorModel::Configure(), genie::AlgFactory::ForceReconfiguration(), genie::AlgFactory::InstantiateAlgorithm(), and testReconfigInOwnedModules().

◆ Configure() [2/2]

void Algorithm::Configure ( string config)
virtual

Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration

Reimplemented in genie::AGCharmPythiaBaseHadro2023, genie::AGKY2019, genie::AGKYLowW2019, genie::AhrensDMELPXSec, genie::AhrensNCELPXSec, genie::AivazisCharmPXSecLO, genie::AlamSimoAtharVacasSKPXSec2014, genie::AlamSimoAtharVacasSKXSec, genie::AlvarezRusoCOHPiPXSec, genie::BardinIMDRadCorPXSec, genie::BBA03ELFormFactorsModel, genie::BBA05ELFormFactorsModel, genie::BBA07ELFormFactorsModel, genie::BergerSehgalCOHPiPXSec2015, genie::BergerSehgalFMCOHPiPXSec2015, genie::BertuzzoDNuCOHPXSec, genie::BostedChristyEMPXSec, genie::BSKLNBaseRESPXSec2014, genie::BYPDF, genie::BYStrucFunc, genie::CascadeReweight, genie::CEvNSEventGenerator, genie::CEvNSXSec, genie::COHDNuEventGenerator, genie::COHDNuInteractionListGenerator, genie::COHDNuXSec, genie::COHInteractionListGenerator, genie::COHKinematicsGenerator, genie::COHXSec, genie::COHXSecAR, genie::CollinsSpillerFragm, genie::DarkSectorDecayer, genie::Decayer, genie::DFRInteractionListGenerator, genie::DFRKinematicsGenerator, genie::DipoleAxialFormFactorModel, genie::DipoleELFormFactorsModel, genie::DISHadronicSystemGenerator, genie::DISInteractionListGenerator, genie::DISKinematicsGenerator, genie::DISXSec, genie::DMBYStrucFunc, genie::DMDISInteractionListGenerator, genie::DMDISKinematicsGenerator, genie::DMDISXSec, genie::DMEInteractionListGenerator, genie::DMEKinematicsGenerator, genie::DMElectronPXSec, genie::DMElectronXSec, genie::DMELEventGenerator, genie::DMELInteractionListGenerator, genie::DMELKinematicsGenerator, genie::DMELXSec, genie::EffectiveSF, genie::EmpiricalMECPXSec2015, genie::EngelFormFactor, genie::EventGenerator, genie::evtlib::EventLibraryInterface, genie::evtlib::EvtLibInteractionListGenerator, genie::evtlib::EvtLibPXSec, genie::FermiMover, genie::FGMBodekRitchie, genie::GalsterELFormFactorsModel, genie::GLRESGenerator, genie::GLRESPXSec, genie::GLRESWdecPythia6, genie::GLRESWdecPythia8, genie::GRV98LO, genie::H3AMNuGammaPXSec, genie::HadronTransporter, genie::HAIntranuke, genie::HEDISGenerator, genie::HEDISInteractionListGenerator, genie::HEDISKinematicsGenerator, genie::HEDISPXSec, genie::HEDISXSec, genie::HELeptonInteractionListGenerator, genie::HELeptonKinematicsGenerator, genie::HELeptonXSec, genie::HENuElGenerator, genie::HENuElPXSec, genie::hnl::BRCalculator, genie::hnl::ChannelCalculatorI, genie::hnl::Decayer, genie::hnl::FluxCreator, genie::hnl::VertexGenerator, genie::HybridXSecAlgorithm, genie::IBDInteractionListGenerator, genie::IBDKinematicsGenerator, genie::IBDXSecMap, genie::IMDAnnihilationPXSec, genie::IMDXSec, genie::Intranuke2018, genie::Intranuke2025, genie::Intranuke, genie::INukeDeltaPropg, genie::KLVOxygenIBDPXSec, genie::KNOTunedQPMDISPXSec, genie::KovalenkoQELCharmPXSec, genie::LeptoHadPythia6, genie::LeptoHadPythia8, genie::LHAPDF5, genie::LHAPDF6, genie::LocalFGM, genie::LwlynSmithFF, genie::LwlynSmithQELCCPXSec, genie::MartiniEricsonChanfrayMarteauMECPXSec2016, genie::MArunAxialFormFactorModel, genie::MECGenerator, genie::MECInteractionListGenerator, genie::MECXSec, genie::MKFFEM, genie::MKSPPPXSec2020, genie::NievesQELCCPXSec, genie::NievesSimoVacasMECPXSec2016, genie::NNBarOscPrimaryVtxGenerator, genie::NormGenerator, genie::NormInteractionListGenerator, genie::NormXSec, genie::NucBindEnergyAggregator, genie::NuclearModelMap, genie::NucleonDecayPrimaryVtxGenerator, genie::NuEInteractionListGenerator, genie::NuEKinematicsGenerator, genie::NuElectronPXSec, genie::NuElectronXSec, genie::OutgoingDarkGenerator, genie::P33PaschosLalakulichPXSec, genie::PaisQELLambdaPXSec, genie::PattonCEvNSPXSec, genie::PauliBlocker, genie::PetersonFragm, genie::PhotonCOHGenerator, genie::PhotonCOHPXSec, genie::PhotonCOHWdecPythia6, genie::PhotonCOHWdecPythia8, genie::PhotonRESGenerator, genie::PhotonRESPXSec, genie::PhotonRESWdecPythia6, genie::PhotonRESWdecPythia8, genie::PhysInteractionSelector, genie::PrimaryLeptonGenerator, genie::Pythia6Hadro2019, genie::Pythia8Hadro2019, genie::QELEventGenerator, genie::QELEventGeneratorSM, genie::QELEventGeneratorSuSA, genie::QELInteractionListGenerator, genie::QELKinematicsGenerator, genie::QELXSec, genie::QPMDISPXSec, genie::QPMDISStrucFuncBase, genie::QPMDMDISPXSec, genie::QPMDMDISStrucFuncBase, genie::QvalueShifter, genie::ReinDFRPXSec, genie::ReinSehgalCOHPiPXSec, genie::ReinSehgalRESPXSec, genie::ReinSehgalRESXSec, genie::ReinSehgalRESXSecFast, genie::ReinSehgalSPPPXSec, genie::ReinSehgalSPPXSec, genie::RESHadronicSystemGenerator, genie::RESInteractionListGenerator, genie::RESKinematicsGenerator, genie::RESXSec, genie::RosenbluthPXSec, genie::RSHelicityAmplModelNCn, genie::RSHelicityAmplModelNCp, genie::RSPPInteractionListGenerator, genie::RSPPResonanceSelector, genie::SKInteractionListGenerator, genie::SKKinematicsGenerator, genie::SlowRsclCharmDISPXSecLO, genie::SmithMonizQELCCPXSec, genie::SmithMonizQELCCXSec, genie::SmithMonizUtils, genie::SpectralFunc1d, genie::SpectralFunc, genie::SpectralFunction2p2h, genie::SPPEventGenerator, genie::SPPXSec, genie::SRCNuclearRecoil, genie::StrumiaVissaniIBDPXSec, genie::SuSAv2MECPXSec, genie::SuSAv2QELPXSec, genie::TransverseEnhancementFFModel, genie::UnstableParticleDecayer, genie::VertexGenerator, genie::XSecLinearCombinations, genie::XSecScaleI, genie::ZExpAxialFormFactorModel, and genie::ZExpELFormFactorModel.

Definition at line 118 of file Algorithm.cxx.

119{
120// Configure the Algorithm looking up at the ConfigPool singleton for a
121// configuration Registry corresponding to the input named parameter set.
122
123 fID.SetConfig(config);
124 this->FindConfig();
125}

References fID, and FindConfig().

◆ DeleteConfig()

void Algorithm::DeleteConfig ( void )
protected

Definition at line 463 of file Algorithm.cxx.

464{
465 // there is nothing to delete if the configuration is not owned but is
466 // rather looked up from the configuration pool
467 //
468
469 for ( unsigned int i = 0 ; i < fConfVect.size() ; ++i ) {
470 if ( fOwnerships[i] ) {
471 delete fConfVect[i] ;
472 }
473 }
474
475 fConfVect.clear() ;
476 fOwnerships.clear() ;
477
478 // delete owned configuration registry
479
480 if(fConfig) {
481 delete fConfig;
482 fConfig=0;
483 }
484
485}

References fConfig, fConfVect, and fOwnerships.

Referenced by FindConfig(), and ~Algorithm().

◆ DeleteSubstructure()

void Algorithm::DeleteSubstructure ( void )
protected

Definition at line 488 of file Algorithm.cxx.

489{
490 // there is nothing to delete if the sub-algorithms are not owned but rather
491 // taken from the AlgFactory's pool
492 //
493 if(!fOwnsSubstruc) return;
494
495 // delete local algorithm pool
496 //
497 AlgMapIter iter = fOwnedSubAlgMp->begin();
498 for( ; iter != fOwnedSubAlgMp->end(); ++iter) {
499 Algorithm * alg = iter->second;
500 if(alg) {
501 delete alg;
502 alg=0;
503 }
504 }
505 delete fOwnedSubAlgMp;
506 fOwnedSubAlgMp = 0;
507}

References Algorithm(), fOwnedSubAlgMp, and fOwnsSubstruc.

Referenced by AdoptSubstructure(), and ~Algorithm().

◆ ExtractLocalConfig()

Registry * Algorithm::ExtractLocalConfig ( const Registry & in) const
protected

Split an incoming configuration Registry into a block valid for this algorithm Ownership of the returned registry belongs to the algo

Definition at line 619 of file Algorithm.cxx.

619 {
620
621 const RgIMap & rgmap = in.GetItemMap();
622 Registry * out = new Registry( in.Name(), false );
623
624 for( RgIMapConstIter reg_iter = rgmap.begin();
625 reg_iter != rgmap.end(); ++reg_iter ) {
626
627 RgKey reg_key = reg_iter->first;
628 if( reg_key.find( '/' ) != string::npos) continue;
629
630 // at this point
631 // this key is referred to the local algorithm
632 // it has to be copied in out;
633
634 RegistryItemI * ri = reg_iter->second;
635 RgIMapPair key_item_pair( reg_key, ri->Clone() );
636 out -> Set(key_item_pair);
637
638 }
639
640 if ( out -> NEntries() <= 0 ) {
641 delete out ;
642 out = 0 ;
643 }
644
645 return out ;
646}
virtual RegistryItemI * Clone(void) const =0
pair< RgKey, RegistryItemI * > RgIMapPair
Definition Registry.h:46

References genie::RegistryItemI::Clone(), genie::Registry::GetItemMap(), and genie::Registry::Name().

Referenced by Configure().

◆ ExtractLowerConfig()

Registry * Algorithm::ExtractLowerConfig ( const Registry & in,
const string & alg_key ) const
protected

Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.

Definition at line 650 of file Algorithm.cxx.

650 {
651
652 const RgIMap & rgmap = in.GetItemMap();
653 Registry * out = new Registry( in.Name(), false );
654
655 for( RgIMapConstIter reg_iter = rgmap.begin();
656 reg_iter != rgmap.end(); ++reg_iter ) {
657
658 RgKey reg_key = reg_iter->first;
659 if( reg_key.find(alg_key+"/") == string::npos) continue;
660
661 // at this point
662 // this key is referred to the sub-algorithm
663 // indicated by alg_key: it has to be copied in out;
664
665 int new_key_start = reg_key.find_first_of('/')+1;
666 RgKey new_reg_key = reg_key.substr( new_key_start, reg_key.length() );
667
668 RegistryItemI * ri = reg_iter->second;
669 RgIMapPair key_item_pair(new_reg_key, ri->Clone());
670 out -> Set(key_item_pair);
671
672 }
673
674 if ( out -> NEntries() <= 0 ) {
675 delete out ;
676 out = 0 ;
677 }
678
679 return out ;
680
681}

References genie::RegistryItemI::Clone(), genie::Registry::GetItemMap(), and genie::Registry::Name().

Referenced by Configure().

◆ FindConfig()

void Algorithm::FindConfig ( void )
virtual

Lookup configuration from the config pool Similar logic from void Configure(string)

Definition at line 127 of file Algorithm.cxx.

128{
129// Finds its configration Registry from the ConfigPool and gets a pointer to
130// it. If the Registry comes from the ConfigPool then the Algorithm does not
131// own its configuration (the ConfigPool singleton keeps the ownership and the
132// responsibility to -eventually- delete all the Registries it instantiates
133// by parsing the XML config files).
134
135 DeleteConfig() ;
136
137 AlgConfigPool * pool = AlgConfigPool::Instance();
138
139 Registry * config = 0 ;
140
141 // load the Default config if config is not the default
142 if ( fID.Config() != "Default" ) {
143 config = pool -> FindRegistry( fID.Name(), "Default" );
144 if ( config ) {
145 if ( config -> NEntries() > 0 ) {
146 AddTopRegistry( config, false ) ;
147 LOG("Algorithm", pDEBUG) << "\n" << *config;
148 }
149 }
150 }
151
152 // Load the right config
153 config = pool->FindRegistry(this);
154
155 if(!config)
156 // notify & keep whatever config Registry was used before.
157 LOG("Algorithm", pWARN)
158 << "No Configuration available for "
159 << this->Id().Key() << " at the ConfigPool";
160 else {
161 if ( config -> NEntries() > 0 ) {
162 AddTopRegistry( config, false ) ;
163 LOG("Algorithm", pDEBUG) << "\n" << config;
164 }
165 }
166
167 const string common_key_root = "Common" ;
168 std::map<string, string> common_lists;
169
170 // Load Common Parameters if key that start with "Common" is found
171 for ( unsigned int i = 0 ; i < fConfVect.size() ; ++i ) {
172 const Registry & temp = * fConfVect[i] ;
173 for ( RgIMapConstIter it = temp.GetItemMap().begin() ; it != temp.GetItemMap().end() ; ++it ) {
174
175 // check if it is a "Common" entry
176 if ( it -> first.find( common_key_root ) == 0 ) {
177 // retrieve the type of the common entry
178 std::string type = it -> first.substr(common_key_root.size() ) ;
179
180 if ( temp.ItemIsLocal( it -> first ) ) {
181
182 string temp_list = temp.GetString( it -> first ) ;
183 if ( temp_list.length() > 0 ) {
184 common_lists[type] = temp_list ;
185 }
186 }
187 }
188
189 }
190
191 } // loop over the local registries
192
193
194 for ( std::map<string, string>::const_iterator it = common_lists.begin() ;
195 it != common_lists.end() ; ++it ) {
196
197 vector<string> list = str::Split( it -> second , "," ) ;
198
199 for ( unsigned int i = 0; i < list.size(); ++i ) {
200
201 config = pool -> CommonList( it -> first, list[i] ) ;
202
203 if ( ! config ) {
204 LOG("Algorithm", pFATAL)
205 << "No Common parameters available for " << it -> first << " list "
206 << list[i] << " at the ConfigPool";
207
208 exit( 78 ) ;
209 }
210 else {
211 AddLowRegistry( config, false ) ;
212 LOG("Algorithm", pDEBUG) << "Loading "
213 << it -> first << " registry "
214 << list[i] << " \n" << config;
215 }
216
217 }
218
219 }
220
221
222 // Load Tunable from CommonParameters
223 // only if the option is specified in RunOpt
224 config = pool -> CommonList( "Param", "Tunable" ) ;
225 if ( config ) {
226 if ( config -> NEntries() > 0 ) {
227 AddTopRegistry( config, false ) ;
228 LOG("Algorithm", pDEBUG) << "Loading Tunable registry \n" << config;
229 }
230 }
231 else {
232 // notify & keep whatever config Registry was used before.
233 LOG("Algorithm", pWARN)
234 << "No Tunable parameter set available at the ConfigPool";
235 }
236
237 if ( fConfig ) {
238 delete fConfig ;
239 fConfig = 0 ;
240 }
241
242}
#define pFATAL
Definition Messenger.h:56
#define pWARN
Definition Messenger.h:60
Registry * FindRegistry(string key) const
static AlgConfigPool * Instance()
int AddLowRegistry(Registry *rp, bool owns=true)
add registry with lowest priority, also update ownership
int AddTopRegistry(Registry *rp, bool owns=true)
add registry with top priority, also update ownership
RgStr GetString(RgKey key) const
Definition Registry.cxx:481
bool ItemIsLocal(RgKey key) const
local or global?
Definition Registry.cxx:178
vector< string > Split(string input, string delim)

References AddLowRegistry(), AddTopRegistry(), DeleteConfig(), fConfig, fConfVect, fID, genie::AlgConfigPool::FindRegistry(), genie::Registry::GetItemMap(), genie::Registry::GetString(), Id(), genie::AlgConfigPool::Instance(), genie::Registry::ItemIsLocal(), genie::AlgId::Key(), LOG, pDEBUG, pFATAL, pWARN, and genie::utils::str::Split().

Referenced by Algorithm(), and Configure().

◆ GetConfig()

const Registry & Algorithm::GetConfig ( void ) const
virtual

Get configuration registry Evaluate the summary of the configuration and returns it The summary of a configuration is a merge of all the registries known to the algorithm (see Configure() methods) but every parameter is appearing only once and in case of repetitions, only the parameter from the registry with the highest prioriry is considered.

Definition at line 246 of file Algorithm.cxx.

246 {
247
248 if ( fConfig ) return * fConfig ;
249
250 const_cast<Algorithm*>( this ) -> fConfig = new Registry( fID.Key() + "_summary", false ) ;
251
252 // loop and append
253 // understand the append mechanism
254 for ( unsigned int i = 0 ; i < fConfVect.size(); ++i ) {
255 fConfig -> Append( * fConfVect[i] ) ;
256 }
257
258 if ( fOwnsSubstruc ) {
259
260 for ( AlgMapConstIter iter = fOwnedSubAlgMp -> begin() ;
261 iter != fOwnedSubAlgMp -> end() ; ++iter ) {
262
263 Algorithm * subalg = iter -> second ;
264
265 LOG("Algorithm", pDEBUG) << "Appending config from " << iter -> first << " -> " << subalg -> Id() ;
266 const Registry & r = subalg->GetConfig();
267 RgKey prefix = iter -> first + "/";
268 fConfig -> Append(r,prefix);
269
270 }
271
272 } //if owned substructure
273
274 return * fConfig ;
275}
map< string, Algorithm * >::const_iterator AlgMapConstIter
Definition Algorithm.h:51

References Algorithm(), fConfig, fConfVect, fID, fOwnedSubAlgMp, fOwnsSubstruc, GetConfig(), Id(), LOG, and pDEBUG.

Referenced by AdoptConfig(), AdoptSubstructure(), genie::EventGeneratorListAssembler::AssembleGeneratorList(), genie::HybridXSecAlgorithm::ChooseXSecAlg(), GetAlgorithms(), GetConfig(), GetOwnedConfig(), genie::GRV98LO::GRV98LO(), genie::NewQELXSec::Integrate(), genie::LHAPDF5::LHAPDF5(), genie::BostedChristyEMPXSec::LoadConfig(), genie::CascadeReweight::LoadConfig(), genie::Decayer::LoadConfig(), genie::FGMBodekRitchie::LoadConfig(), genie::GLRESWdecPythia8::LoadConfig(), genie::HadronTransporter::LoadConfig(), genie::HybridXSecAlgorithm::LoadConfig(), genie::IBDXSecMap::LoadConfig(), genie::MECScaleVsW::LoadConfig(), genie::NievesQELCCPXSec::LoadConfig(), genie::NievesSimoVacasMECPXSec2016::LoadConfig(), genie::NuclearModelMap::LoadConfig(), genie::PhotonRESWdecPythia8::LoadConfig(), genie::Pythia6Hadro2019::LoadConfig(), genie::Pythia8Hadro2019::LoadConfig(), genie::QvalueShifter::LoadConfig(), genie::SmithMonizUtils::LoadConfig(), genie::SuSAv2MECPXSec::LoadConfig(), genie::SuSAv2QELPXSec::LoadConfig(), genie::XSecScaleMap::LoadConfig(), main(), genie::AlgFactory::Print(), Print(), TestPythiaTauDecays(), testReconfigInOwnedModules(), and genie::P33PaschosLalakulichPXSec::XSec().

◆ GetOwnedConfig()

Registry * Algorithm::GetOwnedConfig ( void )

Returns the pointer of the summary registry, see previous method Gives access to the summary so it could be changed. The usage of this method is deprecated as it is mantained only for back compatibility. If you need to add or chage a parter (or more), use the AddTopRegistry() instead

Definition at line 279 of file Algorithm.cxx.

280{
281
282 GetConfig() ;
283 return fConfig;
284}

References fConfig, and GetConfig().

Referenced by genie::EffectiveSF::LoadConfig(), and genie::TransverseEnhancementFFModel::LoadConfig().

◆ GetParam()

template<class T>
bool genie::Algorithm::GetParam ( const RgKey & name,
T & p,
bool is_top_call = true ) const
protected

Ideal access to a parameter value from the vector of registries Returns true if the value is found and the parameters is set

Referenced by genie::CollinsSpillerFragm::BuildFunction(), genie::PetersonFragm::BuildFunction(), GetParamMatKeys(), GetParamVectKeys(), genie::AGCharmPythiaBaseHadro2023::LoadConfig(), genie::AGKY2019::LoadConfig(), genie::AGKYLowW2019::LoadConfig(), genie::AhrensDMELPXSec::LoadConfig(), genie::AhrensNCELPXSec::LoadConfig(), genie::AivazisCharmPXSecLO::LoadConfig(), genie::AlamSimoAtharVacasSKPXSec2014::LoadConfig(), genie::BaryonResonanceDecayer::LoadConfig(), genie::BBA03ELFormFactorsModel::LoadConfig(), genie::BBA05ELFormFactorsModel::LoadConfig(), genie::BBA07ELFormFactorsModel::LoadConfig(), genie::BergerSehgalCOHPiPXSec2015::LoadConfig(), genie::BergerSehgalFMCOHPiPXSec2015::LoadConfig(), genie::BertuzzoDNuCOHPXSec::LoadConfig(), genie::BostedChristyEMPXSec::LoadConfig(), genie::BSKLNBaseRESPXSec2014::LoadConfig(), genie::BYPDF::LoadConfig(), genie::CascadeReweight::LoadConfig(), genie::COHDNuEventGenerator::LoadConfig(), genie::COHDNuXSec::LoadConfig(), genie::COHKinematicsGenerator::LoadConfig(), genie::COHXSec::LoadConfig(), genie::DarkSectorDecayer::LoadConfig(), genie::Decayer::LoadConfig(), genie::DFRKinematicsGenerator::LoadConfig(), genie::DFRXSec::LoadConfig(), genie::DipoleAxialFormFactorModel::LoadConfig(), genie::DipoleELFormFactorsModel::LoadConfig(), genie::DISHadronicSystemGenerator::LoadConfig(), genie::DISXSec::LoadConfig(), genie::DMDISXSec::LoadConfig(), genie::DMElectronPXSec::LoadConfig(), genie::EffectiveSF::LoadConfig(), genie::EmpiricalMECPXSec2015::LoadConfig(), genie::EventGenerator::LoadConfig(), genie::FGMBodekRitchie::LoadConfig(), genie::GalsterELFormFactorsModel::LoadConfig(), genie::GLRESPXSec::LoadConfig(), genie::GLRESWdecPythia6::LoadConfig(), genie::GLRESWdecPythia8::LoadConfig(), genie::H3AMNuGammaPXSec::LoadConfig(), genie::HadronTransporter::LoadConfig(), genie::HAIntranuke2018::LoadConfig(), genie::HAIntranuke2025::LoadConfig(), genie::HAIntranuke::LoadConfig(), genie::HEDISKinematicsGenerator::LoadConfig(), genie::HEDISPXSec::LoadConfig(), genie::HEDISXSec::LoadConfig(), genie::HNIntranuke2018::LoadConfig(), genie::HNIntranuke2025::LoadConfig(), genie::hnl::BRCalculator::LoadConfig(), genie::hnl::Decayer::LoadConfig(), genie::hnl::FluxCreator::LoadConfig(), genie::IBDXSecMap::LoadConfig(), genie::INukeDeltaPropg::LoadConfig(), genie::KNOTunedQPMDISPXSec::LoadConfig(), genie::LeptoHadPythia6::LoadConfig(), genie::LeptoHadPythia8::LoadConfig(), genie::LHAPDF6::LoadConfig(), genie::LocalFGM::LoadConfig(), genie::LwlynSmithFF::LoadConfig(), genie::LwlynSmithQELCCPXSec::LoadConfig(), genie::MArunAxialFormFactorModel::LoadConfig(), genie::MECGenerator::LoadConfig(), genie::MECScaleVsW::LoadConfig(), genie::MECXSec::LoadConfig(), genie::MKSPPPXSec2020::LoadConfig(), genie::NievesQELCCPXSec::LoadConfig(), genie::NievesSimoVacasMECPXSec2016::LoadConfig(), genie::NuclearModelI::LoadConfig(), genie::NuclearModelMap::LoadConfig(), genie::NuElectronPXSec::LoadConfig(), genie::OutgoingDarkGenerator::LoadConfig(), genie::P33PaschosLalakulichPXSec::LoadConfig(), genie::PaisQELLambdaPXSec::LoadConfig(), genie::PattonCEvNSPXSec::LoadConfig(), genie::PhotonCOHWdecPythia6::LoadConfig(), genie::PhotonCOHWdecPythia8::LoadConfig(), genie::PhotonRESPXSec::LoadConfig(), genie::PhotonRESWdecPythia6::LoadConfig(), genie::PhotonRESWdecPythia8::LoadConfig(), genie::PrimaryLeptonGenerator::LoadConfig(), genie::PythiaBaseHadro2019::LoadConfig(), genie::QELEventGeneratorSuSA::LoadConfig(), genie::QPMDISPXSec::LoadConfig(), genie::QPMDISStrucFuncBase::LoadConfig(), genie::QPMDMDISPXSec::LoadConfig(), genie::QPMDMDISStrucFuncBase::LoadConfig(), genie::QvalueShifter::LoadConfig(), genie::ReinDFRPXSec::LoadConfig(), genie::ReinSehgalCOHPiPXSec::LoadConfig(), genie::ReinSehgalRESPXSec::LoadConfig(), genie::ReinSehgalRESXSec::LoadConfig(), genie::ReinSehgalRESXSecFast::LoadConfig(), genie::ReinSehgalSPPPXSec::LoadConfig(), genie::ReinSehgalSPPXSec::LoadConfig(), genie::RESKinematicsGenerator::LoadConfig(), genie::RosenbluthPXSec::LoadConfig(), genie::RSHelicityAmplModelNCn::LoadConfig(), genie::RSHelicityAmplModelNCp::LoadConfig(), genie::RSPPResonanceSelector::LoadConfig(), genie::SlowRsclCharmDISPXSecLO::LoadConfig(), genie::SmithMonizQELCCPXSec::LoadConfig(), genie::SmithMonizUtils::LoadConfig(), genie::SpectralFunc1d::LoadConfig(), genie::SPPXSec::LoadConfig(), genie::StrumiaVissaniIBDPXSec::LoadConfig(), genie::SuSAv2MECPXSec::LoadConfig(), genie::SuSAv2QELPXSec::LoadConfig(), genie::TabulatedHadronTensorModelI::LoadConfig(), genie::UnstableParticleDecayer::LoadConfig(), genie::VertexGenerator::LoadConfig(), genie::XSecLinearCombinations::LoadConfig(), genie::ZExpAxialFormFactorModel::LoadConfig(), genie::ZExpELFormFactorModel::LoadConfig(), genie::MECInteractionListGenerator::LoadConfigData(), genie::PhysInteractionSelector::LoadConfigData(), genie::RESInteractionListGenerator::LoadConfigData(), genie::PauliBlocker::LoadModelType(), genie::evtlib::EventLibraryInterface::LoadRecords(), genie::evtlib::EvtLibPXSec::LoadXSecs(), genie::BYStrucFunc::ReadBYParams(), genie::DMBYStrucFunc::ReadBYParams(), genie::LHAPDF5::SetPDFSetFromConfig(), and SubAlg().

◆ GetParamDef()

template<class T>
bool genie::Algorithm::GetParamDef ( const RgKey & name,
T & p,
const T & def ) const
protected

Ideal access to a parameter value from the vector of registries, With default value. Returns true if the value is set from the registries, false if the value is the default

Referenced by genie::TabulatedHadronTensorModelI::GetTensorFileBasename(), genie::AGCharmPythiaBaseHadro2023::LoadConfig(), genie::AGKYLowW2019::LoadConfig(), genie::AhrensDMELPXSec::LoadConfig(), genie::AlamSimoAtharVacasSKXSec::LoadConfig(), genie::BaryonResonanceDecayer::LoadConfig(), genie::BostedChristyEMPXSec::LoadConfig(), genie::BSKLNBaseRESPXSec2014::LoadConfig(), genie::CEvNSEventGenerator::LoadConfig(), genie::CEvNSXSec::LoadConfig(), genie::COHDNuEventGenerator::LoadConfig(), genie::COHDNuXSec::LoadConfig(), genie::COHKinematicsGenerator::LoadConfig(), genie::COHXSec::LoadConfig(), genie::COHXSecAR::LoadConfig(), genie::DFRKinematicsGenerator::LoadConfig(), genie::DFRXSec::LoadConfig(), genie::DISHadronicSystemGenerator::LoadConfig(), genie::DISKinematicsGenerator::LoadConfig(), genie::DISXSec::LoadConfig(), genie::DMDISKinematicsGenerator::LoadConfig(), genie::DMDISXSec::LoadConfig(), genie::DMEKinematicsGenerator::LoadConfig(), genie::DMElectronPXSec::LoadConfig(), genie::DMElectronXSec::LoadConfig(), genie::DMELEventGenerator::LoadConfig(), genie::DMELKinematicsGenerator::LoadConfig(), genie::DMELXSec::LoadConfig(), genie::EffectiveSF::LoadConfig(), genie::EmpiricalMECPXSec2015::LoadConfig(), genie::FermiMover::LoadConfig(), genie::FGMBodekRitchie::LoadConfig(), genie::GalsterELFormFactorsModel::LoadConfig(), genie::HAIntranuke2018::LoadConfig(), genie::HAIntranuke2025::LoadConfig(), genie::HAIntranuke::LoadConfig(), genie::HEDISKinematicsGenerator::LoadConfig(), genie::HEDISXSec::LoadConfig(), genie::HELeptonKinematicsGenerator::LoadConfig(), genie::HELeptonXSec::LoadConfig(), genie::HNIntranuke2018::LoadConfig(), genie::HNIntranuke2025::LoadConfig(), genie::IBDKinematicsGenerator::LoadConfig(), genie::IMDXSec::LoadConfig(), genie::KNOTunedQPMDISPXSec::LoadConfig(), genie::KovalenkoQELCharmPXSec::LoadConfig(), genie::LocalFGM::LoadConfig(), genie::LwlynSmithQELCCPXSec::LoadConfig(), genie::MECGenerator::LoadConfig(), genie::MECScaleVsW::LoadConfig(), genie::MECXSec::LoadConfig(), genie::MKSPPPXSec2020::LoadConfig(), genie::NewQELXSec::LoadConfig(), genie::NievesQELCCPXSec::LoadConfig(), genie::NormXSec::LoadConfig(), genie::NucBindEnergyAggregator::LoadConfig(), genie::NucDeExcitationSim::LoadConfig(), genie::NuEInteractionListGenerator::LoadConfig(), genie::NuEKinematicsGenerator::LoadConfig(), genie::NuElectronXSec::LoadConfig(), genie::P33PaschosLalakulichPXSec::LoadConfig(), genie::PattonCEvNSPXSec::LoadConfig(), genie::QELEventGenerator::LoadConfig(), genie::QELEventGeneratorSM::LoadConfig(), genie::QELEventGeneratorSuSA::LoadConfig(), genie::QELKinematicsGenerator::LoadConfig(), genie::QELXSec::LoadConfig(), genie::QPMDISStrucFuncBase::LoadConfig(), genie::QPMDMDISPXSec::LoadConfig(), genie::QPMDMDISStrucFuncBase::LoadConfig(), genie::ReinSehgalRESPXSec::LoadConfig(), genie::ReinSehgalRESXSec::LoadConfig(), genie::ReinSehgalRESXSecFast::LoadConfig(), genie::ReinSehgalSPPXSec::LoadConfig(), genie::RESKinematicsGenerator::LoadConfig(), genie::RESXSec::LoadConfig(), genie::SKKinematicsGenerator::LoadConfig(), genie::SmithMonizQELCCPXSec::LoadConfig(), genie::SmithMonizQELCCXSec::LoadConfig(), genie::SPPEventGenerator::LoadConfig(), genie::SPPXSec::LoadConfig(), genie::SRCNuclearRecoil::LoadConfig(), genie::SuSAv2MECPXSec::LoadConfig(), genie::TabulatedHadronTensorModelI::LoadConfig(), genie::COHInteractionListGenerator::LoadConfigData(), genie::DFRInteractionListGenerator::LoadConfigData(), genie::DISInteractionListGenerator::LoadConfigData(), genie::DMDISInteractionListGenerator::LoadConfigData(), genie::DMELInteractionListGenerator::LoadConfigData(), genie::HEDISInteractionListGenerator::LoadConfigData(), genie::HELeptonInteractionListGenerator::LoadConfigData(), genie::MECInteractionListGenerator::LoadConfigData(), genie::QELInteractionListGenerator::LoadConfigData(), genie::RESInteractionListGenerator::LoadConfigData(), genie::RSPPInteractionListGenerator::LoadConfigData(), and genie::SKInteractionListGenerator::LoadConfigData().

◆ GetParamMat()

template<class T>
int genie::Algorithm::GetParamMat ( const std::string & comm_name,
TMatrixT< T > & mat,
bool is_top_call = true ) const
protected

Handle to load matrix of parameters.

◆ GetParamMatKeys()

int Algorithm::GetParamMatKeys ( const std::string & comm_name,
std::vector< RgKey > & k,
bool is_top_call = true ) const
protected

Definition at line 585 of file Algorithm.cxx.

586 {
587
588 k.clear() ;
589
590 int n_row = 0, n_col = 0 ;
591 std::string row_name = Algorithm::BuildParamMatRowSizeKey( comm_name ) ;
592 std::string col_name = Algorithm::BuildParamMatColSizeKey( comm_name ) ;
593
594 bool found = GetParam( row_name, n_row, is_top_call ) && GetParam( col_name, n_col, is_top_call ) ;
595
596 if ( ! found ) {
597 return 0 ;
598 }
599
600 for ( int i = 0; i < n_row; ++i ) {
601 for ( int j = 0; j < n_col; ++j ) {
602
603 RgKey temp_key = Algorithm::BuildParamMatKey( comm_name, i, j ) ;
604
605 // potentially, if it is a top call,
606 // we might want to check if the key actually exist in the global Registry
607 // Not a priority irght now
608
609 k.push_back( temp_key ) ;
610 }
611 }
612
613 return k.size() ;
614}
static string BuildParamMatKey(const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatColSizeKey(const std::string &comm_name)
static string BuildParamMatRowSizeKey(const std::string &comm_name)
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const

References BuildParamMatColSizeKey(), BuildParamMatKey(), BuildParamMatRowSizeKey(), and GetParam().

◆ GetParamMatSym()

template<class T>
int genie::Algorithm::GetParamMatSym ( const std::string & comm_name,
TMatrixTSym< T > & mat,
bool is_top_call = true ) const
protected

◆ GetParamVect()

◆ GetParamVectKeys()

int Algorithm::GetParamVectKeys ( const std::string & comm_name,
std::vector< RgKey > & k,
bool is_top_call = true ) const
protected

Definition at line 555 of file Algorithm.cxx.

556 {
557
558 k.clear() ;
559
560 int n ;
561 std::string n_name = Algorithm::BuildParamVectSizeKey( comm_name ) ;
562
563 bool found = GetParam( n_name, n, is_top_call ) ;
564
565 if ( ! found ) {
566 return 0 ;
567 }
568
569 for ( int i = 0; i < n; ++i ) {
570
571 RgKey temp_key = Algorithm::BuildParamVectKey( comm_name, i ) ;
572
573 // potentially, if it is a top call,
574 // we might want to check if the key actually exist in the global Registry
575 // Not a priority irght now
576
577 k.push_back( temp_key ) ;
578 }
579
580 return k.size() ;
581}
static string BuildParamVectSizeKey(const std::string &comm_name)
static string BuildParamVectKey(const std::string &comm_name, unsigned int i)

References BuildParamVectKey(), BuildParamVectSizeKey(), and GetParam().

Referenced by genie::XSecLinearCombinations::LoadConfig().

◆ GetStatus()

virtual AlgStatus_t genie::Algorithm::GetStatus ( void ) const
inlinevirtual

Get algorithm status.

Definition at line 101 of file Algorithm.h.

101{ return fStatus; }
AlgStatus_t fStatus
algorithm execution status
Definition Algorithm.h:175

References fStatus.

◆ Id()

virtual const AlgId & genie::Algorithm::Id ( void ) const
inlinevirtual

Get algorithm ID.

Definition at line 98 of file Algorithm.h.

98{ return fID; }

References fID.

Referenced by genie::KineGeneratorWithCache::AccessCacheBranch(), AdoptConfig(), AdoptSubstructure(), genie::InteractionListAssembler::AssembleInteractionList(), genie::InteractionGeneratorMap::BuildMap(), genie::XSecAlgorithmMap::BuildMap(), genie::XSecSplineList::BuildSplineKey(), genie::DISXSec::CacheBranchName(), genie::DMDISXSec::CacheBranchName(), Compare(), Configure(), genie::GEVGDriver::CreateSplines(), genie::KNOTunedQPMDISPXSec::DISRESJoinSuppressionFactor(), FindConfig(), genie::AlgConfigPool::FindRegistry(), genie::AlgFactory::ForceReconfiguration(), genie::GEVGDriver::GenerateEvent(), GetAlgorithms(), GetConfig(), genie::COHXSec::Integrate(), genie::EventGenerator::LoadConfig(), genie::HadronTransporter::LoadConfig(), genie::NievesQELCCPXSec::LoadConfig(), genie::NievesSimoVacasMECPXSec2016::LoadConfig(), genie::QPMDISPXSec::LoadConfig(), genie::QPMDMDISPXSec::LoadConfig(), genie::SuSAv2MECPXSec::LoadConfig(), genie::SuSAv2QELPXSec::LoadConfig(), genie::EventGeneratorListAssembler::LoadGenerator(), main(), main(), genie::AlgFactory::Print(), genie::InteractionGeneratorMap::Print(), genie::XSecAlgorithmMap::Print(), genie::COHHadronicSystemGenerator::ProcessEventRecord(), genie::COHPrimaryLeptonGenerator::ProcessEventRecord(), genie::EventGenerator::ProcessEventRecord(), genie::AGKY2019::SelectHadronizer(), SubAlg(), TestPythiaTauDecays(), and genie::GEVGDriver::UseSplines().

◆ Initialize()

void Algorithm::Initialize ( void )
protected

Definition at line 335 of file Algorithm.cxx.

336{
337// Algorithm initialization
338//
339 fAllowReconfig = true;
340 fOwnsSubstruc = false;
341 fConfig = 0;
342 fOwnedSubAlgMp = 0;
343}

References fAllowReconfig, fConfig, fOwnedSubAlgMp, and fOwnsSubstruc.

Referenced by Algorithm(), Algorithm(), and Algorithm().

◆ MergeTopRegistry()

int Algorithm::MergeTopRegistry ( const Registry & r)
protected

Merge with top level registry if first reg of the vector is owned Otherwise an owned copy is added as a top registry

Definition at line 719 of file Algorithm.cxx.

719 {
720
721 if ( fOwnerships.empty() ) {
722
723 // this algorithm is not configured right now, the incoming registry is the only configuration
724 Registry * p = new Registry( r ) ;
725 AddTopRegistry( p ) ;
726
727 return 1 ;
728 }
729
730 if ( fOwnerships[0] ) {
731 //the top registry is owned: it can be changed with no consequences for other algorithms
732 fConfVect[0] -> Merge( r ) ;
733 }
734 else {
735 // The top registry is not owned so it cannot be changed
736 // The registry will be added with top priority
737
738 Registry * p = new Registry( r ) ;
739 AddTopRegistry( p ) ;
740 }
741
742 // The configuration has changed so the summary is not updated anymore and must be deleted
743 if ( fConfig ) {
744 delete fConfig ;
745 fConfig = 0 ;
746 }
747
748 return fConfVect.size() ;
749}

References AddTopRegistry(), fConfig, fConfVect, and fOwnerships.

Referenced by Configure().

◆ Print()

void Algorithm::Print ( ostream & stream) const
virtual

Print algorithm info.

Definition at line 315 of file Algorithm.cxx.

316{
317 // print algorithm name & parameter-set
318 stream << "\nAlgorithm Key: " << this->fID.Key();
319 stream << " - Owns Substruc: " << ((fOwnsSubstruc) ? "[true]" : "[false]");
320
321 // print algorithm configuration
322 const Registry & r = this->GetConfig();
323 stream << r;
324
325 if(fOwnsSubstruc) {
326 AlgMapConstIter iter = fOwnedSubAlgMp->begin();
327 for(; iter!=fOwnedSubAlgMp->end(); ++iter) {
328 Algorithm * alg = iter->second;
329 stream << "<Next algorithm is owned by : " << this->fID.Key() << ">";
330 stream << *alg;
331 }
332 }
333}

References Algorithm(), fID, fOwnedSubAlgMp, fOwnsSubstruc, and GetConfig().

Referenced by operator<<.

◆ SetId() [1/2]

void Algorithm::SetId ( const AlgId & id)
virtual

Set algorithm ID.

Definition at line 305 of file Algorithm.cxx.

306{
307 fID.Copy(id);
308}

References fID.

◆ SetId() [2/2]

void Algorithm::SetId ( string name,
string config )
virtual

Definition at line 310 of file Algorithm.cxx.

311{
312 fID.SetId(name, config);
313}

References fID.

◆ SubAlg()

const Algorithm * Algorithm::SubAlg ( const RgKey & registry_key) const

Access the sub-algorithm pointed to by the input key, either from the local pool or from AlgFactory's pool

Definition at line 345 of file Algorithm.cxx.

346{
347// Returns the sub-algorithm pointed to this algorithm's XML config file using
348// the the values of the key.
349// This method asserts the existence of these keys in the XML config.
350// Note: Since only 1 parameter is used, the key value should contain both the
351// algorithm name and its configuration set according to the usual scheme:
352// namespace::algorithm_name/configuration_set
353//
354 LOG("Algorithm", pINFO)
355 << "Fetching sub-alg within alg: " << this->Id().Key()
356 << " pointed to by key: " << registry_key;
357
358 //-- if the algorithm owns its substructure:
359 // return the sub-algorithm from the local pool
360 //
361 if(fOwnsSubstruc) {
362 AlgMapConstIter iter = fOwnedSubAlgMp->find(registry_key);
363 if(iter!=fOwnedSubAlgMp->end()) return iter->second;
364 LOG("Algorithm", pERROR)
365 << "Owned sub-alg pointed to by key: " << registry_key
366 << " was not found within alg: " << this->Id().Key();
367 return 0;
368 }
369
370 //-- if the algorithm does not own its substructure:
371 // return the sub-algorithm from the AlgFactory's pool
372 RgAlg alg ;
373 GetParam( registry_key, alg ) ;
374
375 LOG("Algorithm", pINFO)
376 << "Registry key: " << registry_key << " points to algorithm: " << alg;
377
378 // retrieve the Algorithm object from the the Algorithm factory
379 AlgFactory * algf = AlgFactory::Instance();
380 const Algorithm * algbase = algf->GetAlgorithm(alg.name, alg.config);
381 assert(algbase);
382
383 return algbase;
384}
#define pINFO
Definition Messenger.h:62
const Algorithm * GetAlgorithm(const AlgId &algid)

References Algorithm(), RgAlg::config, fOwnedSubAlgMp, fOwnsSubstruc, genie::AlgFactory::GetAlgorithm(), GetParam(), Id(), genie::AlgFactory::Instance(), genie::AlgId::Key(), LOG, RgAlg::name, pERROR, and pINFO.

Referenced by genie::HybridXSecAlgorithm::ChooseXSecAlg(), genie::NewQELXSec::Integrate(), genie::AGCharmPythiaBaseHadro2023::LoadConfig(), genie::AGKY2019::LoadConfig(), genie::AhrensDMELPXSec::LoadConfig(), genie::AhrensNCELPXSec::LoadConfig(), genie::AivazisCharmPXSecLO::LoadConfig(), genie::AlamSimoAtharVacasSKPXSec2014::LoadConfig(), genie::AlvarezRusoCOHPiPXSec::LoadConfig(), genie::BardinIMDRadCorPXSec::LoadConfig(), genie::BergerSehgalCOHPiPXSec2015::LoadConfig(), genie::BergerSehgalFMCOHPiPXSec2015::LoadConfig(), genie::BertuzzoDNuCOHPXSec::LoadConfig(), genie::BSKLNBaseRESPXSec2014::LoadConfig(), genie::BYPDF::LoadConfig(), genie::DISHadronicSystemGenerator::LoadConfig(), genie::DMElectronPXSec::LoadConfig(), genie::DMELEventGenerator::LoadConfig(), genie::EmpiricalMECPXSec2015::LoadConfig(), genie::EventGenerator::LoadConfig(), genie::FermiMover::LoadConfig(), genie::GLRESGenerator::LoadConfig(), genie::GLRESPXSec::LoadConfig(), genie::HadronTransporter::LoadConfig(), genie::HAIntranuke2018::LoadConfig(), genie::HAIntranuke2025::LoadConfig(), genie::HAIntranuke::LoadConfig(), genie::HEDISGenerator::LoadConfig(), genie::HEDISPXSec::LoadConfig(), genie::HENuElPXSec::LoadConfig(), genie::HNIntranuke2018::LoadConfig(), genie::HNIntranuke2025::LoadConfig(), genie::HybridXSecAlgorithm::LoadConfig(), genie::IBDXSecMap::LoadConfig(), genie::IMDAnnihilationPXSec::LoadConfig(), genie::KNOTunedQPMDISPXSec::LoadConfig(), genie::KovalenkoQELCharmPXSec::LoadConfig(), genie::LwlynSmithFF::LoadConfig(), genie::LwlynSmithQELCCPXSec::LoadConfig(), genie::MartiniEricsonChanfrayMarteauMECPXSec2016::LoadConfig(), genie::MECGenerator::LoadConfig(), genie::MKFFEM::LoadConfig(), genie::MKSPPPXSec2020::LoadConfig(), genie::NievesQELCCPXSec::LoadConfig(), genie::NievesSimoVacasMECPXSec2016::LoadConfig(), genie::NNBarOscPrimaryVtxGenerator::LoadConfig(), genie::NuclearModelMap::LoadConfig(), genie::NucleonDecayPrimaryVtxGenerator::LoadConfig(), genie::NuElectronPXSec::LoadConfig(), genie::P33PaschosLalakulichPXSec::LoadConfig(), genie::PaisQELLambdaPXSec::LoadConfig(), genie::PattonCEvNSPXSec::LoadConfig(), genie::PhotonCOHGenerator::LoadConfig(), genie::PhotonCOHPXSec::LoadConfig(), genie::PhotonRESGenerator::LoadConfig(), genie::PhotonRESPXSec::LoadConfig(), genie::QELEventGenerator::LoadConfig(), genie::QELEventGeneratorSM::LoadConfig(), genie::QELEventGeneratorSuSA::LoadConfig(), genie::QPMDISPXSec::LoadConfig(), genie::QPMDISStrucFuncBase::LoadConfig(), genie::QPMDMDISPXSec::LoadConfig(), genie::QPMDMDISStrucFuncBase::LoadConfig(), genie::ReinDFRPXSec::LoadConfig(), genie::ReinSehgalCOHPiPXSec::LoadConfig(), genie::ReinSehgalRESPXSec::LoadConfig(), genie::ReinSehgalSPPPXSec::LoadConfig(), genie::RESHadronicSystemGenerator::LoadConfig(), genie::RosenbluthPXSec::LoadConfig(), genie::SecondNucleonEmissionI::LoadConfig(), genie::SlowRsclCharmDISPXSecLO::LoadConfig(), genie::SmithMonizQELCCPXSec::LoadConfig(), genie::SmithMonizQELCCXSec::LoadConfig(), genie::StrumiaVissaniIBDPXSec::LoadConfig(), genie::SuSAv2MECPXSec::LoadConfig(), genie::SuSAv2QELPXSec::LoadConfig(), genie::UnstableParticleDecayer::LoadConfig(), genie::XSecLinearCombinations::LoadConfig(), genie::XSecScaleMap::LoadConfig(), and genie::EventGeneratorListAssembler::LoadGenerator().

◆ operator<<

ostream & operator<< ( ostream & stream,
const Algorithm & alg )
friend

Definition at line 31 of file Algorithm.cxx.

32 {
33 alg.Print(stream);
34 return stream;
35 }
virtual void Print(ostream &stream) const
Print algorithm info.

References Algorithm(), and Print().

Member Data Documentation

◆ fAllowReconfig

◆ fConfig

Registry* genie::Algorithm::fConfig
private

Summary configuration derived from fConvVect, not necessarily allocated.

Definition at line 217 of file Algorithm.h.

Referenced by AddLowRegistry(), AddTopRegisties(), AddTopRegistry(), AdoptSubstructure(), DeleteConfig(), FindConfig(), GetConfig(), GetOwnedConfig(), Initialize(), and MergeTopRegistry().

◆ fConfVect

vector<Registry*> genie::Algorithm::fConfVect
protected

ideally these members should go private Registry will be access only through the GetParam method configurations registries from various sources the order of the vector is the precedence in case of repeated parameters position 0 -> Highest precedence

Definition at line 170 of file Algorithm.h.

Referenced by AddLowRegistry(), AddTopRegisties(), AddTopRegistry(), DeleteConfig(), FindConfig(), GetConfig(), and MergeTopRegistry().

◆ fID

AlgId genie::Algorithm::fID
protected

algorithm name and configuration set

Definition at line 165 of file Algorithm.h.

Referenced by Algorithm(), Algorithm(), Configure(), Configure(), FindConfig(), GetConfig(), Id(), Print(), SetId(), and SetId().

◆ fOwnedSubAlgMp

AlgMap* genie::Algorithm::fOwnedSubAlgMp
protected

local pool for owned sub-algs (taken out of the factory pool)

Definition at line 176 of file Algorithm.h.

Referenced by AdoptSubstructure(), Configure(), DeleteSubstructure(), GetConfig(), Initialize(), Print(), and SubAlg().

◆ fOwnerships

vector<bool> genie::Algorithm::fOwnerships
protected

ownership for every registry in fConfVect

Definition at line 173 of file Algorithm.h.

Referenced by AddLowRegistry(), AddTopRegisties(), AddTopRegistry(), DeleteConfig(), and MergeTopRegistry().

◆ fOwnsSubstruc

bool genie::Algorithm::fOwnsSubstruc
protected

true if it owns its substructure (sub-algs,...)

Definition at line 164 of file Algorithm.h.

Referenced by AdoptSubstructure(), Configure(), DeleteSubstructure(), GetConfig(), Initialize(), Print(), and SubAlg().

◆ fStatus

AlgStatus_t genie::Algorithm::fStatus
protected

algorithm execution status

Definition at line 175 of file Algorithm.h.

Referenced by GetStatus().


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