Fixing based on suggestions
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Mar 2010 15:28:42 +0000 (15:28 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Mar 2010 15:28:42 +0000 (15:28 +0000)
PWG2/SPECTRA/AliAnalysisTaskProtons.cxx
PWG2/SPECTRA/AliAnalysisTaskProtons.h
PWG2/SPECTRA/macros/AddTaskProtons.C
PWG2/SPECTRA/macros/configProtonAnalysis.C
PWG2/SPECTRA/macros/runProtonAnalysis.C

index 297bbff..8d9284f 100644 (file)
@@ -37,7 +37,7 @@ ClassImp(AliAnalysisTaskProtons)
 AliAnalysisTaskProtons::AliAnalysisTaskProtons()
   : AliAnalysisTask(), fESD(0), fAOD(0), fMC(0),
     fListAnalysis(0), fListQA(0), fHistEventStats(0), 
-    fProtonAnalysis(0), fCutCanvas(0) {
+  fProtonAnalysis(0) {//, fCutCanvas(0) {
   //Dummy constructor
   
 }
@@ -46,7 +46,7 @@ AliAnalysisTaskProtons::AliAnalysisTaskProtons()
 AliAnalysisTaskProtons::AliAnalysisTaskProtons(const char *name) 
   : AliAnalysisTask(name, ""), fESD(0), fAOD(0), fMC(0),
     fListAnalysis(0), fListQA(0), fHistEventStats(0), 
-    fProtonAnalysis(0), fCutCanvas(0) {
+  fProtonAnalysis(0) {//, fCutCanvas(0) {
   // Constructor
   
   // Define input and output slots here
@@ -122,7 +122,7 @@ void AliAnalysisTaskProtons::CreateOutputObjects() {
   fListQA->Add(fProtonAnalysis->GetQAList());
   fListQA->Add(dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVertexQAList());
 
-  fCutCanvas = dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetListOfCuts();
+  //fCutCanvas = dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetListOfCuts();
 }
 
 //________________________________________________________________________
@@ -238,7 +238,7 @@ void AliAnalysisTaskProtons::Exec(Option_t *) {
   // Post output data.
   PostData(0, fListAnalysis);
   PostData(1, fListQA);
-  PostData(2, fCutCanvas);
+  //PostData(2, fCutCanvas);
 }      
 
 //________________________________________________________________________
index 93df763..4ed23f5 100644 (file)
@@ -9,7 +9,7 @@
 //-------------------------------------------------------------------------
 
 class TList;
-class TCanvas;
+//class TCanvas;
 
 class AliESDEvent;
 class AliAODEvent;
@@ -43,7 +43,7 @@ class AliAnalysisTaskProtons : public AliAnalysisTask {
   TH1F   *fHistEventStats; //event statistics
 
   AliProtonAnalysis *fProtonAnalysis; //analysis object 
-  TCanvas *fCutCanvas; //Tcanvas with the analysis parameters (book-keeping)
+  //TCanvas *fCutCanvas; //Tcanvas with the analysis parameters (book-keeping)
   
   AliAnalysisTaskProtons(const AliAnalysisTaskProtons&); // not implemented
   AliAnalysisTaskProtons& operator=(const AliAnalysisTaskProtons&); // not implemented
index 547e70d..2db1831 100644 (file)
@@ -38,9 +38,12 @@ AliAnalysisTaskProtons *AddTaskProtons(Bool_t kAnalyzeMC = kFALSE,
   //==============================================================================
   TString outputFileName = AliAnalysisManager::GetCommonFileName();
   outputFileName += ":PWG2BaryonRatioAnalysis";
-  AliAnalysisDataContainer *cout_proton = mgr->CreateContainer("protonhist", TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
+  AliAnalysisDataContainer *cout_proton = mgr->CreateContainer("outputList", TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
+  AliAnalysisDataContainer *cout_proton_QA = mgr->CreateContainer("outputQAList", TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName.Data());
+
   mgr->ConnectInput(taskproton, 0, mgr->GetCommonInputContainer());
   mgr->ConnectOutput(taskproton, 0, cout_proton);
+  mgr->ConnectOutput(taskproton, 1, cout_proton_QA);
   
   // Return task pointer at the end
   return taskproton;
index 43e6252..ffd99fe 100644 (file)
@@ -5,7 +5,7 @@ AliProtonAnalysis *GetProtonAnalysisObject(const char* analysisLevel = "ESD",
                                           const char* pidMode = "Bayesian",
                                           Bool_t kUseOnlineTrigger = kFALSE,
                                           Bool_t kUseOfflineTrigger = kFALSE) {
-  gROOT->LoadMacro("configProtonAnalysisBaseObject.C");  
+  gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonAnalysisBaseObject.C");  
   //Function to setup the AliProtonAnalysis object and return it
   AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(analysisLevel,kAnalyzeMC,esdAnalysisType,pidMode,kUseOnlineTrigger,kUseOfflineTrigger);
 
index 3ae8580..2c7301a 100644 (file)
@@ -135,16 +135,16 @@ void runLocal(const char* mode = "ESD",
                                                             TList::Class(),
                                                            AliAnalysisManager::kOutputContainer,
                                                             outputFilename.Data());
-  AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cutCanvas",
+  /*AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cutCanvas",
                                                             TCanvas::Class(),
                                                            AliAnalysisManager::kOutputContainer,
-                                                            outputFilename.Data());
+                                                            outputFilename.Data());*/
 
   //____________________________________________//
   mgr->ConnectInput(taskProtons,0,cinput1);
   mgr->ConnectOutput(taskProtons,0,coutput1);
   mgr->ConnectOutput(taskProtons,1,coutput2);
-  mgr->ConnectOutput(taskProtons,2,coutput3);
+  //mgr->ConnectOutput(taskProtons,2,coutput3);
   if (!mgr->InitAnalysis()) return;
   mgr->PrintStatus();
   mgr->StartAnalysis("local",chain);
@@ -247,16 +247,16 @@ void runInteractive(const char* mode = "ESD",
                                                             TList::Class(),
                                                            AliAnalysisManager::kOutputContainer,
                                                             outputFilename.Data());
-  AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cutCanvas",
+  /*AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cutCanvas",
                                                             TCanvas::Class(),
                                                            AliAnalysisManager::kOutputContainer,
-                                                            outputFilename.Data());
+                                                            outputFilename.Data());*/
 
   //____________________________________________//
   mgr->ConnectInput(taskProtons,0,cinput1);
   mgr->ConnectOutput(taskProtons,0,coutput1);
   mgr->ConnectOutput(taskProtons,1,coutput2);
-  mgr->ConnectOutput(taskProtons,2,coutput3);
+  //mgr->ConnectOutput(taskProtons,2,coutput3);
   if (!mgr->InitAnalysis()) return;
   mgr->PrintStatus();
   mgr->StartAnalysis("local",chain);
@@ -349,16 +349,16 @@ void runBatch(const char* mode = "ESD",
                                                             TList::Class(),
                                                            AliAnalysisManager::kOutputContainer,
                                                             outputFilename.Data());
-  AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cutCanvas",
+  /*AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cutCanvas",
                                                             TCanvas::Class(),
                                                            AliAnalysisManager::kOutputContainer,
-                                                            outputFilename.Data());
+                                                            outputFilename.Data());*/
   
   //____________________________________________//
   mgr->ConnectInput(taskProtons,0,cinput1);
   mgr->ConnectOutput(taskProtons,0,coutput1);
   mgr->ConnectOutput(taskProtons,1,coutput2);
-  mgr->ConnectOutput(taskProtons,2,coutput3);
+  //mgr->ConnectOutput(taskProtons,2,coutput3);
   if (!mgr->InitAnalysis()) return;
   mgr->PrintStatus();
   mgr->StartAnalysis("grid",chain);
@@ -442,16 +442,16 @@ void runProof(const char* mode = "ESD",
                                                             TList::Class(),
                                                            AliAnalysisManager::kOutputContainer,
                                                             outputFilename.Data());
-  AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cutCanvas",
+  /*AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cutCanvas",
                                                             TCanvas::Class(),
                                                            AliAnalysisManager::kOutputContainer,
-                                                            outputFilename.Data());
+                                                            outputFilename.Data());*/
 
   //____________________________________________//
   mgr->ConnectInput(taskProtons,0,cinput1);
   mgr->ConnectOutput(taskProtons,0,coutput1);
   mgr->ConnectOutput(taskProtons,1,coutput2);
-  mgr->ConnectOutput(taskProtons,3,coutput3);
+  //mgr->ConnectOutput(taskProtons,3,coutput3);
   if (!mgr->InitAnalysis()) return;
   mgr->PrintStatus();