8 void run_sim(Int_t nEvents = 100, TString mcEngine =
"TGeant3")
15 TString dir = getenv(
"VMCWORKDIR");
16 TString tutdir = dir +
"/";
18 TString tut_geomdir = tutdir +
"/common/geometry";
19 gSystem->Setenv(
"GEOMPATH", tut_geomdir.Data());
21 TString tut_configdir = tutdir +
"/common/gconfig";
22 gSystem->Setenv(
"CONFIG_DIR", tut_configdir.Data());
31 fRun->SetName(mcEngine);
33 TString outFile =
"data/testrun_";
34 outFile = outFile + mcEngine +
".root";
36 TString geoFile =
"data/geofile_";
37 geoFile = geoFile + mcEngine +
"_full.root";
39 TString parFile =
"data/testparams_";
40 parFile = parFile + mcEngine +
".root";
110 output->
open(parFile);
126 cout << endl << endl;
132 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
134 cout <<
"</DartMeasurement>" << endl;
137 Double_t rtime = timer.RealTime();
138 Double_t ctime = timer.CpuTime();
140 Float_t cpuUsage = ctime / rtime;
141 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
143 cout <<
"</DartMeasurement>" << endl;
145 cout << endl << endl;
146 cout <<
"Output file is " << outFile << endl;
147 cout <<
"Parameter file is " << parFile << endl;
148 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
149 cout <<
"Macro finished successfully." << endl;
virtual void SetGeometryFileName(TString fname, TString geoVer="0")
void CreateGeometryFile(const char *geofile)
list of container factories
void SetField(FairField *field)
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void AddGenerator(FairGenerator *generator)
void SetField(Double_t bX, Double_t bY, Double_t bZ)
void SetGenerator(FairPrimaryGenerator *Gen)
void SetGenerateRunInfo(Bool_t write)
void SetSink(FairSink *tempSink)
void SetUseFairLinks(Bool_t val)
void SetFieldRegion(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
void run_sim(Int_t nEvents=100, TString mcEngine="TGeant3")
FairRuntimeDb * GetRuntimeDb(void)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
void SetMaterials(const char *MatFileName)
Bool_t setOutput(FairParIo *)
Bool_t open(const Text_t *fname, Option_t *option="READ", const Text_t *ftitle="", Int_t compress=1)
virtual void Run(Int_t NEvents=0, Int_t NotUsed=0)
void AddModule(FairModule *Mod)
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
void SetStoreTraj(Bool_t storeTraj=kTRUE)