Public Member Functions | Private Attributes | List of all members
genie::InteractionListAssembler Class Reference

Assembles a list of all interactions that can be generated during a neutrino event generation job by querying each EventGeneratorI subclass employed in that job for its interaction list. More...

#include <InteractionListAssembler.h>

Inheritance diagram for genie::InteractionListAssembler:
genie::Algorithm

Public Member Functions

 InteractionListAssembler ()
 
 InteractionListAssembler (string config)
 
 ~InteractionListAssembler ()
 
void SetGeneratorList (EventGeneratorList *evglist)
 
InteractionListAssembleInteractionList (const InitialState &init) const
 
- Public Member Functions inherited from genie::Algorithm
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. More...
 
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status. More...
 
virtual bool AllowReconfig (void) const
 
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm. More...
 
virtual void SetId (const AlgId &id)
 Set algorithm ID. More...
 
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. More...
 

Private Attributes

EventGeneratorListfEventGeneratorList
 

Additional Inherited Members

- Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
 
static string BuildParamVectSizeKey (const std::string &comm_name)
 
- Protected Member Functions inherited from genie::Algorithm
 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. More...
 
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. More...
 
int GetParamVectKeys (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 More...
 
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership More...
 
int MergeTopRegistry (const Registry &r)
 
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships. More...
 
- Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
 
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...) More...
 
AlgId fID
 algorithm name and configuration set More...
 
vector< Registry * > fConfVect
 
vector< boolfOwnerships
 ownership for every registry in fConfVect More...
 
AlgStatus_t fStatus
 algorithm execution status More...
 
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool) More...
 

Detailed Description

Assembles a list of all interactions that can be generated during a neutrino event generation job by querying each EventGeneratorI subclass employed in that job for its interaction list.

Author
Costas Andreopoulos <constantinos.andreopoulos cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory

May 16, 2005

Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 31 of file InteractionListAssembler.h.

Constructor & Destructor Documentation

InteractionListAssembler::InteractionListAssembler ( )

Definition at line 22 of file InteractionListAssembler.cxx.

22  :
23 Algorithm("genie::InteractionListAssembler")
24 {
26 }
InteractionListAssembler::InteractionListAssembler ( string  config)

Definition at line 28 of file InteractionListAssembler.cxx.

28  :
29 Algorithm("genie::InteractionListAssembler", config)
30 {
32 }
static Config * config
Definition: config.cpp:1054
InteractionListAssembler::~InteractionListAssembler ( )

Definition at line 34 of file InteractionListAssembler.cxx.

35 {
36 
37 }

Member Function Documentation

InteractionList * InteractionListAssembler::AssembleInteractionList ( const InitialState init) const

Definition at line 44 of file InteractionListAssembler.cxx.

46 {
47  if(!fEventGeneratorList) {
48  LOG("IntLst", pERROR)
49  << "\n*** NULL Generator List! "
50  << "Can not assemble the Interaction List for \n" << init_state;
51  return 0;
52  }
53 
54  InteractionList * total_intlist = new InteractionList;
55 
56  EventGeneratorList::const_iterator evgliter; // event generator list iter
57  InteractionList::iterator intliter; // interaction list iter
58 
59  for(evgliter = fEventGeneratorList->begin();
60  evgliter != fEventGeneratorList->end(); ++evgliter) {
61 
62  const EventGeneratorI * evgen = *evgliter;
63 
64  LOG("IntLst", pINFO)
65  << "\nQuerying EventGenerator: " << evgen->Id().Key()
66  << " for its Interaction List";
67 
68  // ask the event generator to produce a list of all interaction it can
69  // generate for the input initial state
70 
71  const InteractionListGeneratorI * intlistgen = evgen->IntListGenerator();
72 
73  InteractionList * intlist = intlistgen->CreateInteractionList(init_state); // should delete ?
74 
75  LOG("IntLst", pINFO) << "\nGot list:\n" << *intlist;
76 
77  // add them to the combined interaction list
78  for(intliter = intlist->begin();
79  intliter != intlist->end(); ++intliter) {
80  Interaction * interaction = *intliter;
81  total_intlist->push_back(interaction);
82 
83  } // loop over interaction that can be generated
84  } // loop over event generators
85 
86  return total_intlist;
87 }
intermediate_table::iterator iterator
#define pERROR
Definition: Messenger.h:59
Defines the InteractionListGeneratorI interface. Concrete implementations of this interface generate ...
virtual const InteractionListGeneratorI * IntListGenerator(void) const =0
Defines the EventGeneratorI interface.
intermediate_table::const_iterator const_iterator
Summary information for an interaction.
Definition: Interaction.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pINFO
Definition: Messenger.h:62
virtual InteractionList * CreateInteractionList(const InitialState &init) const =0
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:97
A vector of Interaction objects.
Event Generation using GENIE, cosmics or single particles.
string Key(void) const
Definition: AlgId.h:46
void InteractionListAssembler::SetGeneratorList ( EventGeneratorList evglist)

Definition at line 39 of file InteractionListAssembler.cxx.

40 {
41  fEventGeneratorList = evglist;
42 }

Member Data Documentation

EventGeneratorList* genie::InteractionListAssembler::fEventGeneratorList
private

Definition at line 44 of file InteractionListAssembler.h.


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