A modification was recently introduced in ANALYSIS trunk that automatically creates...
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Feb 2009 11:24:35 +0000 (11:24 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Feb 2009 11:24:35 +0000 (11:24 +0000)
cin = mgr->CreateContainer("cInput", TChain::Class(), AliAnalysisManager::kInputContainer);
mgr->ConnectInput(myTask, 0, cin);

But rather:

mgr->ConnectInput(myTask, 0, mgr->GetCommonInputContainer());

The same applies for the common output AOD container. The reason for this is that user tasks will be able to connect to an analysis manager and data containers created in a different steering macro (train).

16 files changed:
FMD/analysis/RunAliEnFMDAnalysisSE.C
FMD/analysis/RunLocalFMDAnalysisSE.C
HMPID/AliHMPIDAnalysisTask.C
JETAN/JetAnalysisManagerCAF.C
JETAN/JetAnalysisManagerLoc.C
PWG0/dNdEta/run.C
PWG0/esdTrackCuts/run.C
PWG0/multiplicity/run.C
PWG1/Macros/taskComp.C
PWG1/comparison/runProofCheckESD.C
PWG1/comparison/runProofITSComparison.C
PWG1/comparison/runProofTOFComparison.C
PWG1/comparison/runProofTPCComparison.C
PWG1/comparison/runProofTRDComparison.C
TPC/macros/CalibrateTPC.C
TPC/macros/TestV0.C

index c749bac853cbb1808ba185281c4d40621e8b66c4..aac3a528150a695407b79ec2e03e6ba81207789b 100644 (file)
@@ -24,12 +24,10 @@ void RunAliEnFMDAnalysisSE(const Char_t* collectionName="collection.xml", const
   aodHandler->SetOutputFileName("AliAODs.root");
   
   
-  AliAnalysisDataContainer *cin_esd = mgr->CreateContainer("cESD",TChain::Class(), 
-                                                          AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer *cin_esd = mgr->GetCommonInputContainer();
   // Output AOD container. Pointer to AOD put here only by filter task.
   // This container is managed by the AOD handler
-  AliAnalysisDataContainer *cout_aod = mgr->CreateContainer("cAOD", TTree::Class(),
-                                                           AliAnalysisManager::kOutputContainer, "default");
+  AliAnalysisDataContainer *cout_aod = mgr->GetCommonOutputContainer();
   
   AliFMDAnalysisTaskSE *fmdana = new AliFMDAnalysisTaskSE("FMDAnalysis");
   mgr->AddTask(fmdana);
index b60f7f248d1bc9c47dfe24c0d83407042fbb81bb..ca88bc4d251fd9a53b818d720627a52ee9de4082 100644 (file)
@@ -26,12 +26,10 @@ void RunLocalFMDAnalysisSE(const Char_t* filename= "AliESDs.root", const Char_t*
   aodHandler->SetOutputFileName("AliAODs.root");
   
   
-  AliAnalysisDataContainer *cin_esd = mgr->CreateContainer("cESD",TChain::Class(), 
-                                                          AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer *cin_esd = mgr->GetCommonInputContainer();
   // Output AOD container. Pointer to AOD put here only by filter task.
   // This container is managed by the AOD handler
-  AliAnalysisDataContainer *cout_aod = mgr->CreateContainer("cAOD", TTree::Class(),
-                                                           AliAnalysisManager::kOutputContainer, "default");
+  AliAnalysisDataContainer *cout_aod = mgr->GetCommonOutputContainer();
   
   AliFMDAnalysisTaskSE *fmdana = new AliFMDAnalysisTaskSE("FMDAnalysis");
   mgr->AddTask(fmdana);
index 1d5b2c050659be7137777e0f1a3778af03d0f432..f6bbc476f097e11df1401a468b5e05f290e18759 100644 (file)
@@ -31,12 +31,12 @@ Bool_t AliHMPIDAnalysisTask()
   // Create and connect containers for input/output
 
   //------ input data ------
-  AliAnalysisDataContainer *cinput0  = mgr->CreateContainer("cchain0",TChain::Class(),AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer *cinput0  = mgr->GetCommonInputContainer();
 
   // ----- output data -----
   
   //slot 0 : default output tree (by default handled by AliAnalysisTaskSE)
-  AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("ctree0", TTree::Class(),AliAnalysisManager::kOutputContainer,"Houtput.root");
+//  AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("ctree0", TTree::Class(),AliAnalysisManager::kOutputContainer,"Houtput.root");
 
   //now comes user's output objects :
   
@@ -49,7 +49,7 @@ Bool_t AliHMPIDAnalysisTask()
 
   mgr->AddTask(task);
   mgr->ConnectInput(task,0,cinput0);
-  mgr->ConnectOutput(task,0,coutput0);
+//  mgr->ConnectOutput(task,0,coutput0);
   mgr->ConnectOutput(task,1,coutput1);
   mgr->ConnectOutput(task,2,coutput2);
  
index 85b75dd0be067e4825d7e1a3aa78d35f420a7c43..130987b323b5bfc72fd9bf42f713a71028aede3b 100644 (file)
@@ -94,11 +94,9 @@ void JetAnalysisManagerCAF()
     mgr->AddTask(jetana);
     //
     // Create containers for input/output
-    AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(), 
-                                                            AliAnalysisManager::kInputContainer);
+    AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
 
-    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
-                                                             AliAnalysisManager::kOutputContainer, "default");
+    AliAnalysisDataContainer *coutput1 = mgr->GetCommonOutputContainer();
     coutput1->SetSpecialOutput();
     
     AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
index a8328c40944e29e66e5fc012146e13eaa30b1ef7..cf2fc7289cb2bcf224b1e1c8cc8a3a800e7df9b9 100644 (file)
@@ -85,11 +85,8 @@ void JetAnalysisManagerLoc()
 
     //
     // Create containers for input/output
-    AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(), 
-                                                            AliAnalysisManager::kInputContainer);
-
-    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
-                                                             AliAnalysisManager::kOutputContainer, "default");
+    AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
+    AliAnalysisDataContainer *coutput1 = mgr->GetCommonOutputContainer();
     AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
                                                              AliAnalysisManager::kOutputContainer, "histos.root");
 
index 46059b5e7bd708a43d4f4bf2c1cdad7775065602..fbf579a9132f77cd3c23ddb7e2bad075896aec0c 100644 (file)
@@ -90,6 +90,12 @@ void run(Int_t runWhat, const Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool
   // Create the analysis manager
   mgr = new AliAnalysisManager;
 
+  // Add ESD handler
+  AliESDInputHandler* esdH = new AliESDInputHandler;
+  esdH->SetInactiveBranches("AliESDACORDE FMD ALIESDTZERO ALIESDVZERO ALIESDZDC AliRawDataErrorLogs CaloClusters Cascades EMCALCells EMCALTrigger ESDfriend Kinks Kinks Cascades AliESDTZERO ALIESDACORDE MuonTracks TrdTracks CaloClusters");
+  mgr->SetInputEventHandler(esdH);
+
+
   AliPWG0Helper::AnalysisMode analysisMode = AliPWG0Helper::kSPD;
   AliPWG0Helper::Trigger      trigger      = AliPWG0Helper::kMB1;
 
@@ -109,7 +115,7 @@ void run(Int_t runWhat, const Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool
     esdTrackCuts->SetHistogramsOn(kTRUE);
   }
 
-  cInput  = mgr->CreateContainer("cInput", TChain::Class(), AliAnalysisManager::kInputContainer);
+  cInput  = mgr->GetCommonInputContainer();
 
   // Create, add task
   if (runWhat == 0 || runWhat == 2)
@@ -167,11 +173,6 @@ void run(Int_t runWhat, const Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool
     mgr->SetMCtruthEventHandler(handler);
   }
 
-  // Add ESD handler
-  AliESDInputHandler* esdH = new AliESDInputHandler;
-  esdH->SetInactiveBranches("AliESDACORDE FMD ALIESDTZERO ALIESDVZERO ALIESDZDC AliRawDataErrorLogs CaloClusters Cascades EMCALCells EMCALTrigger ESDfriend Kinks Kinks Cascades AliESDTZERO ALIESDACORDE MuonTracks TrdTracks CaloClusters");
-  mgr->SetInputEventHandler(esdH);
-
   // Enable debug printouts
   if (aDebug)
     mgr->SetDebugLevel(2);
index 70cef463ae9f47e1529559fcd5079ff15c19bfea..0729e767622835b4c2845832548504650ed01118 100644 (file)
@@ -78,7 +78,7 @@ void run(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aDebug = kFALSE, B
   }
 
   // Attach input
-  cInput  = mgr->CreateContainer("cInput", TChain::Class(), AliAnalysisManager::kInputContainer);
+  cInput  = mgr->GetCommonInputContainer();
   mgr->ConnectInput(task, 0, cInput);
 
   // Attach output
index 55f9d9ddba9b1f4b0139ad29dee626fbd9faf682..e040e893caf212a9e95087e5e49ab96db0026b3b 100644 (file)
@@ -133,7 +133,7 @@ void run(Char_t* data, Long64_t nRuns = -1, Long64_t offset = 0, Bool_t aDebug =
   mgr->SetInputEventHandler(esdH);
 
   // Attach input
-  cInput  = mgr->CreateContainer("cInput", TChain::Class(), AliAnalysisManager::kInputContainer);
+  cInput  = mgr->GetCommonInputContainer();
   mgr->ConnectInput(task, 0, cInput);
 
   // Attach output
index f44d92634314cd0a1fd25244b9dffc1f3a2b4050..6474cb00e0cb2a700aa26524c7ddb0eed2ecd0bc 100644 (file)
@@ -94,8 +94,7 @@ AliAnalysisManager *  MakeManager(){
   mgr->AddTask(genTask);
   //
   //
-  AliAnalysisDataContainer *cinput1 =
-    mgr->CreateContainer("cchain1",TChain::Class(),                                              AliAnalysisManager::kInputContainer);  
+  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
   mgr->ConnectInput(genTask,0,cinput1);
   //
   AliAnalysisDataContainer *coutput1
index 4ec7e45858bcc24635086bcf469b97ccd7507499..5d0bb653be838dabfab5cfb264e212774173776e 100644 (file)
@@ -25,8 +25,7 @@ void runProofCheckESD(const char * dataset = "/PWG0/COMMON/run30000X_10TeV_0.5T"
   mgr->AddTask(task);
 
   // Create containers for input/output
-  AliAnalysisDataContainer *cinput = 
-    mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
   AliAnalysisDataContainer *coutput = 
     mgr->CreateContainer("coutput", TList::Class(), 
     AliAnalysisManager::kOutputContainer, "Hist.root");
index 757c4cfb7efe6fd4c8d36c253fec0eaa2b2915cc..13dd275c7067fcb3475722bed38f73a63c0ba7b9 100644 (file)
@@ -26,8 +26,7 @@ void runProofITSComparison(const char * dataset ="/PWG0/COMMON/run30000X_10TeV_0
   mgr->AddTask(task);
 
   // Create containers for input/output
-  AliAnalysisDataContainer* cinput = 
-    mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer* cinput = mgr->GetCommonInputContainer();
   AliAnalysisDataContainer* coutput = 
     mgr->CreateContainer("coutput", TList::Class(), 
     AliAnalysisManager::kOutputContainer, "AliITSComparisonHist.root");
index ac2f506ca935a370bd7e854738b50bb986088079..510b58e7df430e6be705af8855a9653b483a64f5 100644 (file)
@@ -26,8 +26,7 @@ void runProofTOFComparison(const char * dataset="/PWG0/COMMON/run30000X_10TeV_0.
   mgr->AddTask(task);
 
   // Create containers for input/output
-  AliAnalysisDataContainer* cinput = 
-    mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer* cinput = mgr->GetCommonInputContainer();
   AliAnalysisDataContainer* coutput = 
     mgr->CreateContainer("coutput", TList::Class(), 
     AliAnalysisManager::kOutputContainer, "AliTOFComparisonHist.root");
index 5ce09862f220cfecbcb66204df5dc4c51fcc642f..fe53575668ed34a1e9ef392447e563985b694c01 100644 (file)
@@ -26,8 +26,7 @@ void runProofTPCComparison(const char * dataset = "/PWG0/COMMON/run30000X_10TeV_
   mgr->AddTask(task);
 
   // Create containers for input/output
-  AliAnalysisDataContainer *cinput = 
-    mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
   AliAnalysisDataContainer *coutput = 
     mgr->CreateContainer("coutput", TList::Class(), 
     AliAnalysisManager::kOutputContainer, "AliTPCComparisonHist.root");
index 47f6f44562d0a4e6fcfc09479c022d4d8db9c2fa..6c4ecdbf1dfe6856fbf41f21069613310e3383d4 100644 (file)
@@ -26,8 +26,7 @@ void runProofTRDComparison(const char *dataset="/PWG0/COMMON/run30000X_10TeV_0.5
   mgr->AddTask(task);
 
   // Create containers for input/output
-  AliAnalysisDataContainer* cinput = 
-    mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer* cinput = mgr->GetCommonInputContainer();
   AliAnalysisDataContainer* coutput = 
     mgr->CreateContainer("coutput", TList::Class(), 
     AliAnalysisManager::kOutputContainer, "AliTRDComparisonHist.root");
index 4d573fc77d5a9431668294ba1820abc56fe844b2..f6b9d58f40b8dfb5c57b2997dd5786b88ff2ab50 100644 (file)
@@ -142,8 +142,7 @@ TObject  * SetupCalibTask(char * prefix ="/V12/") {
   mgr->AddTask(task1);
 
   AliAnalysisDataContainer *cinput1
-    =mgr->CreateContainer("cchain1",TChain::Class(),
-                         AliAnalysisManager::kInputContainer);
+    =mgr->GetCommonInputContainer();
   AliAnalysisDataContainer *coutput1
     =mgr->CreateContainer("TPCCalib",TObjArray::Class(),
                          AliAnalysisManager::kOutputContainer,
index 7e58ee18e547ebf956406aefe3d83cab8e3844e9..3b996172ac1f953b3f131d7269ba50e7ee56f505 100644 (file)
@@ -86,8 +86,7 @@ AliAnalysisManager * SetupV0Task() {
   mgr->AddTask(task1);
 
   AliAnalysisDataContainer *cinput1
-    =mgr->CreateContainer("cchain1",TChain::Class(),
-                         AliAnalysisManager::kInputContainer);
+    =mgr->GetCommonInputContainer();
   AliAnalysisDataContainer *coutput1
     =mgr->CreateContainer("TPCCalib",TObjArray::Class(),
                          AliAnalysisManager::kOutputContainer,