8 typedef map<string, map<string,string> >
volmap_t;
12 string hd_msg =
gemcOpt.
optMap[
"LOG_MSG"].args +
" CLARA Factory: >> ";
15 map<string, detector> dets;
21 if(getenv (
"GEMC_PLUGINS") == NULL)
23 cout <<
" !!! Warning: the GEMC_PLUGINS env variable, needed for the CLARA plugin, is not set. " << endl;
24 cout <<
" !!! Warning: for CLAS12, this is typically /group/clas12/lib " << endl;
25 cout <<
" !!! Warning: CLARA detectors won't be loaded. " << endl << endl;
29 string clasraPlugin = (string) getenv(
"GEMC_PLUGINS") +
"/libclas12_geometry_gemc.so";
31 cout <<
" > Opening geometry plugin..." << endl;
32 void* handle = dlopen(clasraPlugin.c_str(), RTLD_NOW);
36 cerr <<
" !!! Error: Cannot open library: " << dlerror() <<
'\n';
44 typedef volmap_t (*get_volume_maps_t)(
const map<string,string>&);
45 get_volume_maps_t get_volume_maps = (get_volume_maps_t) dlsym(handle,
"get_volume_maps");
47 const char *dlsym_error = dlerror();
50 cerr <<
" !!! Error: Cannot load symbol 'get_volume_maps': " << dlerror() << endl;
65 map<string,string> request;
66 request[
"request"] = it->first +
"/volumes";
68 map<string, map<string,string> > volumes = get_volume_maps(request);
70 cout <<
" >>>> Loading: " << it->first << endl;
72 for(map<
string, map<string,string> >::iterator idet = volumes.begin(); idet != volumes.end(); idet++)
78 gt.
add_data(idet->second[
"description"]);
80 gt.
add_data(idet->second[
"rotation"]);
83 gt.
add_data(idet->second[
"dimensions"]);
84 gt.
add_data(idet->second[
"material"]);
89 gt.
add_data(idet->second[
"visible"]);
91 gt.
add_data(idet->second[
"sensitivity"]);
92 gt.
add_data(idet->second[
"hit_type"]);
93 gt.
add_data(idet->second[
"identifiers"]);
96 gt.
add_data(idet->second[
"variation"]);
int check_if_factory_is_needed(map< string, detectorCondition > dcon, string factory)
map< string, detector > loadDetectors()
void add_data(QVariant input)
map< string, detectorCondition > detectorConditionsMap
map< string, map< string, string > > volmap_t
map< string, aopt > optMap
Options map.
detector get_detector(gtable gt, goptions go, runConditions RC)