Running with parameters

Finally, with can run our analysis on some data. The relevant parameters can be added inline, or within a configuration file. The inline commands are as follows:

-h, -help
print this text and exit
-v, -verbose
increase verbose level can repeat several times
-D, -debug
increase debug level can repeat several times
-s NNN , -skip
skip NNN events out of NNN+1
-n NNN , -nevents
number of events to process
-f NNN , -from
read from this event number
-r NNN , -run
run number , do not guess from file name
-e NNN , -event
number to show
-c FILE, -config
config file name
-o FILE, -output
output root file name for full data
-b FILE, -hbook
output root histograms file name
-d mask, -dets
(default 0x3) active detectors mask
-d det, -dets
detector id for reader type 'det'
-T type, -type
(default 1) 0: read a single detector 1: read real data, 2: generate simulated data, 3: read ROOT file
-det
equivalent of -T 0 (single detector)
-raw
equivalent of -T 1 (read real data)
-sim
equivalent of -T 2 (generate simulated data)
-root
equivalent of -T 3 (read root file)
-X type, -xdcc
x dcc reader type 0: T2k , 1: MINOS
-Y type, -ydcc
y dcc reader type 0: T2k , 1: MINOS
-P type, -pmm2
pmm2 reader type 0: TEXT , 1: WIN, 2: Linux, 3: WIN modified

For example, to process 100 events on data with kit DCC X and Y only:

./example -n 100 -d 0x3 -X 0 -Y 0 fileX.dat fileY.dat

To run on data with Feminos X and Y and PMm2 (last windows version):

./example -d 0x7 -X 1 -Y 1 -P 3 fileX.aqs fileY.aqs filePmm2.dat

If you need extra configuration, you can add it in a configuration file config.cfg:

./example -c config.cfg -d 0x7 -X 1 -Y 1 -P 3 fileX.aqs fileY.aqs filePmm2.dat

Where the configuration file can look like this:

Pmm2:
{
  nResets = 1; # number of timestamp resets before TPC data
               # All time stamps before the last reset are set to zero
};
Reader:
{
  latency = 1328; # default 1268, 1328 for cosmic+veto mesh
  ppm2Sync  = 3;  # Synchronisation margin between PMM2 and Feminos
};
ana1:
{
  cut1 = 0.;
  cut2 = 500;
};

You can access these parameters in you analysis with the following lines:

Double_t cut1 = 0;
if ( ! gHConfig->Lookup("ana1.cut1",cut1) )
  Info("InitCfg","Use default fCut1 %g",fCut1);
else
  fCut1 = cut1;

Long64_t cut2 = 0;
if ( ! gHConfig->Lookup("ana1.cut2",cut2) )
  Info("InitCfg","Use default fCut2 %g",fCut2);
else
  fCut2 = cut2;

Be careful, the parameters have to be read in 64 bits (Double_t, Long64_t).

Philippe Gros 2015-06-19