]>
Commit | Line | Data |
---|---|---|
1 | //________________________________________________________________________ | |
2 | void analysisTaskLUTNT() { | |
3 | ||
4 | TChain* chain = new TChain("esdTree"); | |
5 | ||
6 | TAlienCollection* coll = TAlienCollection::Open("wn.xml"); | |
7 | ||
8 | TGridResult* result = coll->GetGridResult("",0,0); | |
9 | Int_t nFiles = 0; | |
10 | for(Int_t i = 0; i < result->GetEntries(); i++) { | |
11 | printf("TURL = %s \n",result->GetKey(i,"turl")); | |
12 | chain->Add(result->GetKey(i,"turl")); | |
13 | nFiles++; | |
14 | //if (nFiles == 10) break; | |
15 | } | |
16 | ||
17 | //____________________________________________// | |
18 | // Make the analysis manager | |
19 | AliAnalysisManager *mgr = new AliAnalysisManager("AnalysisManager"); | |
20 | ||
21 | //____________________________________________// | |
22 | // ntuple task | |
23 | AliAnalysisTaskLUT *task = new AliAnalysisTaskLUT("TaskLUT"); | |
24 | mgr->AddTask(task); | |
25 | ||
26 | // Create containers for input/output | |
27 | ||
28 | // input | |
29 | AliAnalysisDataContainer *cinput = mgr->CreateContainer("cchain",TChain::Class(),AliAnalysisManager::kInputContainer); | |
30 | ||
31 | Char_t text[256]; | |
32 | sprintf(text,"Ntuple.LUT.root"); | |
33 | printf("Analysis output in %s \n",text); | |
34 | ||
35 | // output | |
36 | AliAnalysisDataContainer *coutput = mgr->CreateContainer("cntuple", TNtuple::Class(),AliAnalysisManager::kOutputContainer,text); | |
37 | ||
38 | //____________________________________________// | |
39 | mgr->ConnectInput(task,0,cinput); | |
40 | mgr->ConnectOutput(task,0,coutput); | |
41 | ||
42 | if (mgr->InitAnalysis()) { | |
43 | mgr->PrintStatus(); | |
44 | ||
45 | TStopwatch timer; | |
46 | timer.Start(); | |
47 | ||
48 | mgr->StartAnalysis("local",chain); | |
49 | ||
50 | timer.Stop(); | |
51 | timer.Print(); | |
52 | ||
53 | } | |
54 | } | |
55 |