18 #include <TGeoManager.h>
37 , fUserConfig(UserConfig)
41 new TGeoManager(
"Geometry",
"Geane geometry");
43 TGeoManager::Import(name);
50 , fUserConfig(UserConfig)
56 cout <<
"------------------------FairGeane::SetParTask()------------------------------" << endl;
61 cout <<
"------------------------FairGeane::Init ()------------------------------" << endl;
67 if (cuts == TString(
"")) {
71 TString work = getenv(
"VMCWORKDIR");
72 TString work_config = work +
"/gconfig/";
73 work_config.ReplaceAll(
"//",
"/");
74 TString config_dir = getenv(
"CONFIG_DIR");
75 config_dir.ReplaceAll(
"//",
"/");
77 Bool_t AbsPath = kFALSE;
78 if (!config_dir.EndsWith(
"/")) {
82 TString geaneLibMacro =
"g3libs.C";
85 geaneMacro =
"Geane.C";
92 cout <<
"---------------User config is used : " << geaneMacro.Data() <<
"-----------------" << endl;
94 if (TString(gSystem->FindFile(config_dir.Data(), geaneLibMacro)) != TString(
"")) {
95 cout <<
"---User path for Configuration (g3libs.C) is used : " << config_dir.Data() << endl;
97 geaneLibMacro = work_config +
"g3libs.C";
99 LibMacro = geaneLibMacro;
100 LibFunction =
"g3libs()";
102 if (!AbsPath && TString(gSystem->FindFile(config_dir.Data(), geaneMacro)) != TString(
"")) {
103 cout <<
"---User path for Configuration (Geane.C) is used : " << config_dir.Data() << endl;
104 ConfigMacro = geaneMacro;
113 if (!AbsPath && TString(gSystem->FindFile(config_dir.Data(), cuts)) != TString(
"")) {
114 cout <<
"---User path for Cuts and Processes (SetCuts.C) is used : " << config_dir.Data() << endl;
116 cuts = work_config +
"SetCuts.C";
119 gROOT->LoadMacro(LibMacro.Data());
120 gROOT->ProcessLine(LibFunction.Data());
122 gROOT->LoadMacro(ConfigMacro.Data());
123 gROOT->ProcessLine(
"Config()");
134 cout <<
"I- FairGeane::FairGeane: Geane is Initialized " << endl;
142 cout <<
"\033[5m\033[31m -W- FairGeane::SetField This method is not used anymore, use FairRunAna::SetField "
void SetField(FairField *field)
void InitMC(const char *setup, const char *cuts)
ClassImp(FairEventBuilder)
static FairRunAna * Instance()
void SetField(FairField *field)
FairGeane(const char *name, TString UserConfig="", TString UserCuts="")
virtual void Print(Option_t *) const
FairGeaneApplication * fApp