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