21 using namespace genie;
53 if(vldc.find(
"ENERGY") == string::npos) {
58 LOG(
"VldContext",
pDEBUG) <<
"Validity context: " << vldc;
61 if(fields.size()==0)
return;
63 vector<string>::const_iterator field_iter;
65 for(field_iter = fields.begin(); field_iter != fields.end(); ++field_iter){
67 string curr_field = *field_iter;
68 SLOG(
"VldContext",
pINFO) <<
" ************ " << curr_field;
69 if(curr_field.size()==0)
continue;
72 assert(curr_fieldv.size() == 2);
74 string name = curr_fieldv[0];
75 string values = curr_fieldv[1];
78 if (name.find(
"ENERGY") != string::npos)
DecodeENERGY (values);
81 <<
"**** Unknown field named: " << name <<
" in vld context";
88 SLOG(
"VldContext",
pDEBUG) <<
"Decoding energy range: " << encoded_energy;
91 assert (energy.size() == 2);
92 fEmin = atof( energy[0].c_str() );
93 fEmax = atof( energy[1].c_str() );
104 stream <<
"Energy range:..." <<
"[" <<
fEmin <<
", " <<
fEmax <<
"]";
A singleton class holding all configuration registries built while parsing all loaded XML configurati...
void Print(ostream &stream) const
RgDbl GetDouble(RgKey key) const
Registry * CommonList(const string &file_id, const string &set_name) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void DecodeENERGY(string encoded_values)
vector< string > Split(string input, string delim)
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
A registry. Provides the container for algorithm configuration parameters.
string ToUpper(string input)
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Validity Context for an Event Generator.
static AlgConfigPool * Instance()
void Decode(string encoded_values)