]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/MakeFlow.C
Changes for Root6: removing obsolete TH1 functions, corrected EINCLUDE, additional...
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / MakeFlow.C
1 /**
2  * @file   MakeFlow.C
3  * @author Alexander Hansen 
4  * @date   Wed Mar 23 12:11:33 2011
5  * 
6  * @brief  
7  * 
8  * @ingroup pwg2_forward_scripts_makers
9  * 
10  */
11 //====================================================================
12 /**
13  * Script to analyse AOD input for flow
14  * 
15  * Takes either a single (AOD) .root file as input or a .txt
16  * The .txt file is expected to contain the path to the files 
17  * from the current directory or the absolute path.
18  * 
19  * @par Inputs: 
20  *  
21  * 
22  * @par Outputs: 
23  * - 
24  *
25  * @param name     Name of train 
26  * @param options  Options @see RunTrain 
27  * @param mode     Which execution environment 
28  * @param datadir  Data directory 
29  * @param urlOpts  URL options 
30  *
31  * @ingroup pwglf_forward_flow
32  */
33 void MakeFlow(TString name    = "flow", 
34               TString options = "help",
35               TString mode    = "lite",
36               TString datadir = "/mnt/Disk2/LHC10h_pass2_flowNoSecCorr/",
37               TString urlOpts = "workers=10&recursive") 
38 {
39   if (name.IsNull()) Fatal("MakeFlow", "Must specify a name");
40   gROOT->SetMacroPath(Form("%s:$ALICE_ROOT/PWGLF/FORWARD/analysis2/trains",
41                            gROOT->GetMacroPath()));
42   
43   gROOT->LoadMacro("$ALICE_ROOT/PWGLF/FORWARD/trains/RunTrain.C");
44
45   if (!datadir.EndsWith("/")) datadir.Append("/");
46   
47   TUrl url(datadir.Data());
48   url.SetProtocol(mode.Data());
49   url.SetAnchor("aodTree");
50   url.SetOptions(urlOpts.Data());
51
52   RunTrain(name, "MakeFlowTrain", url, options);
53 }
54 //--------------------------------------------------------------------
55 //
56 // EOF
57 //