11 string hd_msg = opts.
optMap[
"LOG_MSG"].args +
" TEXT Mirrors Factory: >> ";
14 map<string, mirror*> mymirs;
25 if(it->second.get_factory() !=
"TEXT")
29 cout << hd_msg <<
" Initializing " << it->second.get_factory() <<
" for detector " << it->first << endl;
32 string dname = it->first ;
34 string filename = dname +
"__mirrors_" + variation +
".txt";
36 ifstream IN(filename.c_str());
40 if(getenv(
"GEMC_DATA_DIR") != NULL)
43 string maybeHere = (string) getenv(
"GEMC_DATA_DIR") +
"/" + filename;
45 IN.open(maybeHere.c_str());
49 cout << hd_msg <<
"Warning: The system >" << dname
50 <<
"< does not have a mirror file associated with it. " << endl;
58 cout << hd_msg <<
"Warning: The system >" << dname
59 <<
"< does not have a mirror file associated with it. " << endl;
74 if( gt.
data.size() != 14)
75 cout <<
"ERROR: Incorrect number of mirror items (" << gt.
data.size() <<
") for " << gt.
data[0]
76 <<
". We should have 14 but we have " << gt.
data.size() <<
" instead." << endl;
94 mymirs[thisMir->
name] = thisMir;
vector< string > get_strings(string input)
returns a vector of strings from a stringstream, space is delimiter
int check_if_factory_is_needed(map< string, detectorCondition > dcon, string factory)
string get_variation(string var)
parse variation name from string
void opticalsFromString(string, string)
Overloaded "<<" for mirror class. Dumps infos on screen.
map< string, detectorCondition > detectorConditionsMap
map< string, aopt > optMap
Options map.
map< string, mirror * > initMirrors(runConditions, goptions)
void printMirrors(map< string, mirror * > mirMap)
string TrimSpaces(string in)
Removes leading and trailing spaces.