29 if (input.length() == 00)
return "";
31 if(wordexp(input.c_str(), &exp_result, 0) != 0)
33 std::cout <<
"ExpandEnvironmentals - ERROR - Your string '" << input <<
"' cannot be understood!" << std::endl;
36 const std::string output(exp_result.we_wordv[0]);
65 set_CharFlag(
"AlignmentMille",
"$E1039_RESOURCE/alignment/run6/align_mille.txt");
66 set_CharFlag(
"AlignmentHodo",
"$E1039_RESOURCE/alignment/run6/alignment_hodo.txt");
67 set_CharFlag(
"AlignmentProp",
"$E1039_RESOURCE/alignment/run6/alignment_prop.txt");
68 set_CharFlag(
"Calibration",
"$E1039_RESOURCE/alignment/run6/calibration.txt");
76 set_CharFlag(
"fMagFile",
"$GEOMETRY_ROOT/magnetic_fields/Fmag.root");
77 set_CharFlag(
"kMagFile",
"$GEOMETRY_ROOT/magnetic_fields/Kmag.root");
194 if(setname ==
"cosmic")
virtual void PrintIntFlags() const
virtual void set_IntFlag(const std::string &name, const int flag)
virtual void set_BoolFlag(const std::string &name, const bool flag)
virtual void PrintBoolFlags() const
virtual void set_DoubleFlag(const std::string &name, const double flag)
virtual void PrintCharFlags() const
virtual void ReadFromFile(const std::string &name, bool verbose=false)
std::map< std::string, std::string > charflag
virtual void PrintDoubleFlags() const
virtual void PrintFloatFlags() const
void Print() const
print all the parameters
static recoConsts * __instance
void initfile(const std::string &filename, bool verbose=false)
initialize by reading a file
void init(int runNo=0, bool verbose=false)
initialize the constants by the runNo - not implemented yet
void set_defaults()
set the default value for all the constants needed - user is supposed to add a default value here to ...
std::string ExpandEnvironmentals(const std::string &input)
static recoConsts * instance()
virtual void set_CharFlag(const std::string &name, const std::string &flag)
overide the virtual function to expand the environmental variables