]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/Pass1.C
98c68e1354ec7b36a431aa63a74e6017811cebfe
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / Pass1.C
1 /**
2  * @file 
3  * 
4  * @ingroup pwg2_forward_scripts
5  */
6 /** 
7  * Run first pass of the analysis - that is read in ESD and produce AOD
8  * 
9  * @param esddir    ESD input directory. Any file matching the pattern 
10  *                  *AliESDs*.root are added to the chain 
11  * @param nEvents   Number of events to process.  If 0 or less, then 
12  *                  all events are analysed
13  * @param flags     Job flags. A bit mask of 
14  *  - 0x01 (MC)        Monte-Carlo truth handler installed 
15  *  - 0x02 (PROOF)     Proof mode 
16  *  - 0x04 (FULL)      Run full analysis - including terminate 
17  *  - 0x08 (ANALYSE)   Run only analysis - not terminate 
18  *  - 0x10 (TERMINATE) Run no analysis - just terminate.  
19  * 
20  * of these, PROOF, FULL, ANALYSE, and TERMINATE are mutually exclusive. 
21  *
22  * If PROOF mode is selected, then Terminate will be run on the master node 
23  * in any case. 
24  * 
25  * If FULL is selected, then the full analysis is done.  Note that
26  * this can be combined with PROOF but with no effect.
27  *
28  * ANALYSE cannot be combined with FULL, PROOF, or TERMINATE.  In a
29  * local job, the output AnalysisResults.root will still be made, but
30  * terminate is not called.
31  *
32  * In TERMINATE, the file AnalysisResults.root is opened and all
33  * containers found are connected to the tasks.  The terminate member
34  * function is then called
35  * 
36  *
37  * @ingroup pwg2_forward_scripts
38  */
39 void
40 Pass1(const char* esddir=".", 
41       Int_t       nEvents=1000,
42       UShort_t    flags=0x4)
43 {
44   Printf("Flags: 0x%04x", flags);
45   Printf("  MC:            %s", flags & 0x01 ? "yes" : "no");
46   Printf("  Proof mode     %s", flags & 0x02 ? "yes" : "no");
47   Printf("  Full analysis  %s", flags & 0x04 ? "yes" : "no");
48   Printf("  Analyse only   %s", flags & 0x08 ? "yes" : "no");
49   Printf("  Terminate only %s", flags & 0x10 ? "yes" : "no");
50
51   gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/RunManager.C"); 
52
53   RunManager(esddir, nEvents, flags);
54 }
55 //
56 // EOF
57 //