FairRoot/PandaRoot
Functions
SimCompleteMain.cxx File Reference
#include "SimComplete.h"
#include <TRint.h>
#include <TROOT.h>
#include <iostream>
#include <sstream>

Go to the source code of this file.

Functions

template<typename Type >
Type StrTo (char const *str)
 
int main (int argc, char *argv[])
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 23 of file SimCompleteMain.cxx.

References Bool_t, Double_t, nEvents, outFile, SimComplete(), and TString.

24 {
25  // Start application.
26  gROOT->SetBatch();
27  TApplication app("SimComplete", &argc, argv, 0, -1);
28 
29  // Read the command line options or provide default values.
30  Int_t nEvents = argc > 1 ? StrTo<Int_t>(argv[1]) : 10;
31  TString trackDetector = argc > 2 ? argv[2] : "stt";
32  TString const &simEngine = argc > 3 ? argv[3] : "TGeant3";
33  Double_t momentum = argc > 4 ? StrTo<Double_t>(argv[4]) : 7.24;
34  Bool_t useEvtGen = argc > 5 ? StrTo<Bool_t>(argv[5]) : kTRUE;
35  Bool_t useDpm = argc > 6 ? StrTo<Bool_t>(argv[6]) : kFALSE;
36  Bool_t useBoxGenerator = argc > 7 ? StrTo<Bool_t>(argv[7]) : kFALSE;
37  Double_t beamMomentum = argc > 8 ? StrTo<Double_t>(argv[8]) : 15.0;
38  TString outFile= argc > 9 ? argv[9] : "sim_complete.root";
39  TString outParamsFile= argc > 10 ? argv[10] : "simparams.root";
40  TString inDigiParamsFile = argc > 11 ? argv[11] : "all.par";
41 
42  cout << boolalpha;
43 
44  cout << endl << "Starting full simulation with:" << endl
45  << " # events : " << nEvents << endl
46  << " tracking detector : " << trackDetector << endl
47  << " sim engine : " << simEngine << endl
48  << " momentum : " << momentum << "GeV/c" << endl
49  << " using EvtGen : " << useEvtGen << endl
50  << " using Dpm : " << useDpm << endl
51  << " using BoxGenerator : " << useBoxGenerator << endl
52  << " beam momentum : " << beamMomentum << "GeV/c" << endl
53  << " output file : " << outFile << endl
54  << " output params file : " << outParamsFile << endl
55  << " input digi params file : " << inDigiParamsFile << endl << endl;
56 
57  // Start the simulation.
58 
59  SimComplete(nEvents, simEngine, momentum, useEvtGen, useDpm,
60  useBoxGenerator, beamMomentum, outFile, outParamsFile,
61  inDigiParamsFile,trackDetector);
62 
63  return 0;
64 }
TString outFile
Definition: hit_dirc.C:17
Double_t
Int_t nEvents
Definition: hit_dirc.C:11
void SimComplete(Int_t nEvents, TString const &simEngine, Double_t momentum, Bool_t useEvtGen, Bool_t useDpm, Bool_t useBoxGenerator, Double_t beamMomentum, TString const &outFile, TString const &outParamsFile, TString const &inDigiParamsFile, TString const &trackDetector)
Definition: SimComplete.cxx:40
template<typename Type >
Type StrTo ( char const *  str)