21 using namespace genie;
80 XSecAlgorithmMap::const_iterator iter;
82 for(iter = xsmap.begin(); iter != xsmap.end(); ++iter) {
83 string code = iter->first;
86 this->insert(map<string, const XSecAlgorithmI *>::value_type(code,alg));
98 <<
"Building 'interaction' -> 'xsec algorithm' associations";
100 <<
"Using all simulated interactions for init-state: "
104 <<
"No EventGeneratorList was loaded. Will not build XSecAlgorithmMap";
110 EventGeneratorList::const_iterator evgliter;
111 InteractionList::iterator intliter;
123 <<
"Querying [" << evgen->
Id().
Key() <<
"] for its InteractionList";
139 for(intliter = ilst->begin(); intliter != ilst->end(); ++intliter)
143 string code = interaction->
AsString();
147 <<
"\nLinking: " << code
148 <<
"\n --> with xsec algorithm: " << xsec_alg->
Id().
Key();
150 map<string, const XSecAlgorithmI *>::value_type(code,xsec_alg));
162 LOG(
"XSecAlgMap",
pWARN) <<
"Null interaction!!";
166 string code = interaction->
AsString();
168 XSecAlgorithmMap::const_iterator xsec_alg_iter = this->find(code);
169 if(xsec_alg_iter == this->end()) {
171 <<
"No XSecAlgorithmI was found for interaction: \n" << code;
186 XSecAlgorithmMap::const_iterator iter;
188 stream<<
"Printing 'interaction' -> 'xsec algorithm' associations" << endl;
190 for(iter = this->begin(); iter != this->end(); ++iter) {
191 string code = iter->first;
194 stream << code <<
" -> " << alg->
Id().
Key() << endl;
196 stream << code <<
" -> **** NULL XSEC ALGORITHM ****" << endl;
Cross Section Calculation Interface.
XSecAlgorithmMap & operator=(const XSecAlgorithmMap &xsmap)
const InteractionList & GetInteractionList(void) const
Defines the InteractionListGeneratorI interface. Concrete implementations of this interface generate ...
const EventGeneratorList * fEventGeneratorList
Defines the EventGeneratorI interface.
virtual InteractionList * CreateInteractionList(const InitialState &init) const =0
string AsString(void) const
void Copy(const XSecAlgorithmMap &xsmap)
void BuildMap(const InitialState &init_state)
Summary information for an interaction.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
An Interaction -> XSecAlgorithmI associative container. The container is being built for the loaded E...
const XSecAlgorithmI * FindXSecAlgorithm(const Interaction *in) const
void Copy(const InitialState &init_state)
void UseGeneratorList(const EventGeneratorList *list)
string AsString(void) const
void Print(ostream &stream) const
virtual const AlgId & Id(void) const
Get algorithm ID.
void Append(const InteractionList &intl)
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
InitialState * fInitState
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
InteractionList * fInteractionList
A vector of Interaction objects.
A vector of EventGeneratorI objects.
vector< vector< double > > clear
virtual const InteractionListGeneratorI * IntListGenerator(void) const =0
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Initial State information.