]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFhits2sdigits.C
Code Optimization, Review on SDigitization, Test macro to run SDigitization, QA macro...
[u/mrichter/AliRoot.git] / TOF / AliTOFhits2sdigits.C
1 void AliTOFhits2sdigits(TString fileNameHits, Int_t firstEvent=0,Int_t nEvents=1) 
2 {
3
4   /////////////////////////////////////////////////////////////////////////
5   //
6   // Creates TOF summable digits from the hit information. 
7   //
8   // Report problems to pierella@bo.infn.it
9   //
10   // Use case:
11   // start root
12   // // load the macro
13   // root[0] .L AliTOFhits2sdigits.C
14   // root[1] AliTOFhits2sdigits("galice.root",0,1)
15   /////////////////////////////////////////////////////////////////////////
16
17   // Dynamically link some shared libs
18   if (gClassTable->GetID("AliRun") < 0) {
19     gROOT->LoadMacro("loadlibs.C");
20     loadlibs();
21     cout << "Loaded shared libraries" << endl;
22   }
23
24
25   // Create the TOF sdigitzer and sdigitize by default the first event
26   // (in fact by default Int_t firstEvent=0,Int_t nEvents=1)
27   AliTOFSDigitizer *sdigitizer = new AliTOFSDigitizer(fileNameHits.Data(),fileNameHits.Data(),firstEvent,nEvents); // it is the same nevents numbering
28   // scheme used by STEER/AliHits2SDigits.C
29
30   // Activate this line if you want to print the parameters
31   // used in sdigitization
32   // sdigitizer->PrintParameters();
33
34   // performs sdigitization of the above events with "all" verbose option
35   // "tim" option is also available for benchmarking only
36   sdigitizer->Exec("all");  
37
38   // N.B.: in order to maintain the functionality to sdigitize 
39   // all events in current file add a second option
40   // sdigitizer->Exec("all","all");
41   // the second "all" option overrides the previous settings for 
42   // lower and upper  bounds for event to sdigitize and allow
43   // the sdigitization for ALL events in fileNameHits
44 }