.so cleanup: removed from gSystem->Load()
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / extra / AliAnalysisTaskSigma1385.C
CommitLineData
7356f978 1void AliAnalysisTaskSigma1385()
2{
3 TStopwatch timer;
4 timer.Start();
5
6 printf("*** Connect to AliEn ***\n");
7 TGrid::Connect("alien://");
8
4070f709 9 gSystem->Load("libTree");
10 gSystem->Load("libGeom");
11 gSystem->Load("libVMC");
12 gSystem->Load("libPhysics");
7356f978 13 //____________________________________________________//
14 //_____________Setting up required packages___________//
15 //____________________________________________________//
4070f709 16 gSystem->Load("libSTEERBase");
17 gSystem->Load("libSTEER");
18 gSystem->Load("libESD");
19 gSystem->Load("libAOD");
20 gSystem->Load("libANALYSIS");
21 gSystem->Load("libANALYSISalice");
7356f978 22 gROOT->ProcessLine(".include $ALICE_ROOT/include");
23 gROOT->ProcessLine(".include $ALICE_ROOT/TOF");
24 //ANALYSIS PART
25 gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
26 gROOT->LoadMacro("AliAnalysisTaskSigma1385.cxx+g");
27
28 const char *collectionfile = "sigmaLHC10d1.xml";
29
30
31 TAlienCollection * myCollection = TAlienCollection::Open(collectionfile);
32
33 if (!myCollection) {
34 Error("AliAnalysisTaskSigma1385", Form("Cannot create an AliEn collection from %s", collectionfile)) ;
35 return kFALSE ;
36 }
37
38 Info("AliAnalysisTaskSigma1385", Form("Creating the analysis chain %s", "esdTree")) ;
39 TChain* chain = new TChain("esdTree");
40
41 Info("AliAnalysisTaskSigma1385", "Preparing the file list") ;
42 myCollection->Reset() ;
43 while (myCollection->Next()) {
44 char esdFile[255] ;
45 sprintf(esdFile, "%s", myCollection->GetTURL("")) ;
46 Info("AliAnalysisTaskSigma1385", Form("Adding %s", esdFile)) ;
47 chain->Add(esdFile) ;
48 }
49
50
51 //____________________________________________//
52 // Make the analysis manager
53 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
54 AliVEventHandler* esdH = new AliESDInputHandler;
55 mgr->SetInputEventHandler(esdH);
56
57
58 //____________________________________________//
59 // 1st Pt task
60 //AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
61 AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kTRUE);
62 AliAnalysisTaskSigma1385 *task1 = new AliAnalysisTaskSigma1385("TaskSigma1385");
63
64
65 mgr->AddTask(task1);
35e49ca5 66
67 task1->SetDataType("SIM");
68 task1->SelectCollisionCandidates();
35e49ca5 69
7356f978 70 if (!(strcmp(task1->GetDataType(), "SIM"))) {
71
72 AliMCEventHandler *mc = new AliMCEventHandler();
73 mc->SetReadTR(kFALSE);
74 mgr->SetMCtruthEventHandler(mc);
35e49ca5 75 }
76 mgr->SetDebugLevel(10);
7356f978 77
78
79
80 //------ input data ------
81 AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
82
83 // ----- output data -----
84
85 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist1", TList::Class(), AliAnalysisManager::kOutputContainer, "Sigma.ESD.root");
86
87 //____________________________________________//
88
89 mgr->ConnectInput(task1, 0, cinput0);
90 mgr->ConnectOutput(task1, 1, coutput1);
91 if (!mgr->InitAnalysis()) return;
92 mgr->PrintStatus();
93 mgr->StartAnalysis("local", chain);
94
95 timer.Stop();
96 timer.Print();
35e49ca5 97}