10 string hd_msg =
gemcOpt.
optMap[
"LOG_MSG"].args +
" TEXT Factory: >> ";
13 map<string, detector> dets;
24 string dname = it->first;
25 string fname = dname +
"__geometry";
29 cout << hd_msg <<
" Importing Detector: " << dname <<
" with " <<
factoryType <<
" factory, variation " << variation << endl;
31 fname +=
"_" + variation +
".txt";
32 ifstream IN(fname.c_str());
37 if(getenv(
"GEMC_DATA_DIR") != NULL)
39 string maybeHere = (string) getenv(
"GEMC_DATA_DIR") +
"/" + fname;
41 IN.open(maybeHere.c_str());
45 cout << hd_msg <<
" Failed to open geometry file " << maybeHere <<
" for system: " << dname
46 <<
". Maybe the filename doesn't exist? Exiting." << endl;
54 cout << hd_msg <<
" Failed to open geometry file " << fname <<
" for system: " << dname
55 <<
". Maybe the filename doesn't exist? Exiting." << endl;
72 if( gt.
data.size() != 18)
73 cout <<
"ERROR: Incorrect number of geometry items (" << gt.
data.size() <<
") for " << gt.
data[0] << endl;
81 if(dets.find(gt.
data[0]) != dets.end())
83 cout << endl <<
" *** WARNING! A detector >" << gt.
data[0]
84 <<
" exists already. Keeping original, not loading this instance. " << endl << endl;
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 add_data(QVariant input)
map< string, detectorCondition > detectorConditionsMap
map< string, aopt > optMap
Options map.
detector get_detector(gtable gt, goptions go, runConditions RC)
map< string, detector > loadDetectors()