1 SteerAODAnalysisTaskPIDFluctuation(const Char_t *inputfilename, Int_t maxFiles = kMaxInt, Int_t maxEv = kMaxInt)
4 /* include path for ACLic */
5 gSystem->AddIncludePath("-I$ALICE_ROOT/include");
6 gSystem->AddIncludePath("-I$ALICE_ROOT/TOF");
8 gSystem->Load("libANALYSIS");
9 gSystem->Load("libANALYSISalice");
10 /* build analysis task class */
11 gROOT->LoadMacro("AliAnalysisTaskPIDFluctuation.cxx+g");
13 /* setup input chain */
14 TString str = inputfilename;
15 const Char_t *filename;
16 TChain *chain = new TChain("aodTree");
17 if (str.EndsWith(".xml")) {
18 TGrid::Connect("alien://");
19 Info("", "reading data list from collection:");
20 TAlienCollection coll(inputfilename, maxFiles);
23 filename = coll.GetTURL();
24 Info("", Form("%s", filename));
28 else if (str.EndsWith(".txt")) {
29 Info("", "reading data list from text file:");
30 ifstream is(inputfilename);
33 is.getline(buf, 4096);
36 Info("", Form("%s", buf));
41 Info("", "single file:");
42 filename = inputfilename;
43 Info("", Form("%s", filename));
46 Info("", Form("chain is ready: %d events", chain->GetEntries()));
48 /* create analysis manager */
49 AliAnalysisManager *mgr = new AliAnalysisManager("PIDFluctuation");
51 /* define input event handler */
52 AliAODInputHandler *aodh = new AliAODInputHandler();
53 mgr->SetInputEventHandler(aodh);
55 gROOT->LoadMacro("AddAnalysisTaskPIDFluctuation.C");
56 AddAnalysisTaskPIDFluctuation(AliAODTrack::kTrkGlobal, 0., 10., -0.8, 0.8);
57 AddAnalysisTaskPIDFluctuation(AliAODTrack::kTrkTPCOnly, 0., 10., -0.8, 0.8);
58 AddAnalysisTaskPIDFluctuation(AliAODTrack::kTrkTPCOnly, 0.3, 1.5, -0.8, 0.8);
59 AddAnalysisTaskPIDFluctuation(AliAODTrack::kTrkTPCOnly, 0.3, 1.5, -0.4, 0.4);
62 mgr->SetDebugLevel(0);
63 if (!mgr->InitAnalysis()) return;
65 mgr->StartAnalysis("local", chain, maxEv);
67 /* create dummy file to tell we are done */
68 gSystem->Exec("touch done");