some more updates
[u/mrichter/AliRoot.git] / PWGPP / macros / AddTaskPerformanceITS.C
CommitLineData
2308c814 1AliAnalysisTaskITSTrackingCheck *AddTaskPerformanceITS(Bool_t readMC=kFALSE,
2 Bool_t readRP=kFALSE,
5ac4a99f 3 Bool_t fillNtuples=kFALSE,
4 Int_t minmult=0,
31a96e36 5 Int_t maxmult=1000000,
6 Int_t checkSDDIsIn=1)
8d63376d 7{
8 //
9 // Task for check of ITS tracking
10 //
11 // andrea.dainese@pd.infn.it
12 //
13
14
15 // Get the pointer to the existing analysis manager via the static access method.
16 //==============================================================================
17 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
18 if (!mgr) {
19 ::Error("AddTask", "No analysis manager to connect to.");
20 return NULL;
21 }
22
23 // Create the task
24 AliAnalysisTaskITSTrackingCheck *taskITS = new AliAnalysisTaskITSTrackingCheck("ITStracking");
edb8204b 25 taskITS->SetMultiplicityRange(minmult,maxmult);
8d63376d 26 taskITS->SetReadMC(readMC);
ab846928 27 taskITS->SetReadRPLabels(readRP);
2308c814 28 taskITS->SetFillNtuples(fillNtuples);
dbf573fb 29 taskITS->SetUseITSSAforNtuples(kFALSE);
31a96e36 30 taskITS->SetCheckSDDIsIn(checkSDDIsIn);
31 //taskITS->SetOCDBPath("alien://folder=/alice/data/2011/OCDB"); // to be commented for the QAtrain
8d63376d 32 AliLog::SetClassDebugLevel("AliAnalysisTaskITSTrackingCheck",10);
33 // Add to the manager
34 mgr->AddTask(taskITS);
35
36 //
37 // Create containers for input/output
5ac4a99f 38 TString cname="cOutputITS";
39 if(maxmult<1000000) {
40 cname.Append("_"); cname+=minmult;
41 cname.Append("_"); cname+=maxmult;
42 }
31a96e36 43
44
5ac4a99f 45 AliAnalysisDataContainer *cOutputITS = mgr->CreateContainer(cname.Data(),TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:ITS_Performance",mgr->GetCommonFileName()));
8d63376d 46
47
48 // Attach input
49 mgr->ConnectInput(taskITS,0,mgr->GetCommonInputContainer());
50 // Attach output
d98a315a 51 mgr->ConnectOutput(taskITS, 1,cOutputITS);
8d63376d 52
53 return taskITS;
54}