]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
work on aod
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 May 2012 08:40:09 +0000 (08:40 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 May 2012 08:40:09 +0000 (08:40 +0000)
PWGGA/EMCALTasks/AliEmcalPhysicsSelectionTask.cxx

index 1cbca9b311263c9bae40e85b246463a3ed7f224f..b5f3ed6402f6d219e3181319af8b443eea031960 100644 (file)
@@ -4,7 +4,6 @@
 //
 //
 
-
 #include <TFile.h>
 #include <TH1F.h>
 #include <TH2F.h>
@@ -70,16 +69,16 @@ void AliEmcalPhysicsSelectionTask::UserCreateOutputObjects()
   fHAcc = new TH1D("hEvCount",";0=rej/1=acc;#",2,-0.5,1.5);
   fOutput->Add(fHAcc);
   fHEvtTypes = new TH1D("hEvtTypes",";#",10,-0.5,9.5);
-  fHEvtTypes->GetXaxis()->SetBinLabel(1,"All");
-  fHEvtTypes->GetXaxis()->SetBinLabel(2,"MB");
-  fHEvtTypes->GetXaxis()->SetBinLabel(3,"FO");
-  fHEvtTypes->GetXaxis()->SetBinLabel(4,"EMC");
-  fHEvtTypes->GetXaxis()->SetBinLabel(5,"EJE");
-  fHEvtTypes->GetXaxis()->SetBinLabel(6,"EGA");
-  fHEvtTypes->GetXaxis()->SetBinLabel(7,"Good");
-  fHEvtTypes->GetXaxis()->SetBinLabel(8,"HC");
-  fHEvtTypes->GetXaxis()->SetBinLabel(9,"HT");
-  fHEvtTypes->GetXaxis()->SetBinLabel(10,"LED");
+  fHEvtTypes->GetXaxis()->SetBinLabel(1,  "All");
+  fHEvtTypes->GetXaxis()->SetBinLabel(2,  "MB");
+  fHEvtTypes->GetXaxis()->SetBinLabel(3,  "FO");
+  fHEvtTypes->GetXaxis()->SetBinLabel(4,  "EMC");
+  fHEvtTypes->GetXaxis()->SetBinLabel(5,  "EJE");
+  fHEvtTypes->GetXaxis()->SetBinLabel(6,  "EGA");
+  fHEvtTypes->GetXaxis()->SetBinLabel(7,  "Good");
+  fHEvtTypes->GetXaxis()->SetBinLabel(8,  "HC");
+  fHEvtTypes->GetXaxis()->SetBinLabel(9,  "HT");
+  fHEvtTypes->GetXaxis()->SetBinLabel(10, "LED");
   fOutput->Add(fHEvtTypes);
   if (!fDoWriteHistos) {
     fOutput->Remove(fPhysicsSelection);
@@ -91,12 +90,6 @@ void AliEmcalPhysicsSelectionTask::UserExec(const Option_t *opt)
 {
   // User exec.
 
-  AliESDEvent *esdEv = dynamic_cast<AliESDEvent*>(InputEvent());
-  if (!esdEv) {
-    AliError("Task works only on ESD events, returning");
-    return;
-  }
-
   AliPhysicsSelectionTask::UserExec(opt);
 
   ++fNCalled;
@@ -111,7 +104,7 @@ void AliEmcalPhysicsSelectionTask::UserExec(const Option_t *opt)
 
   AliAnalysisManager *am = AliAnalysisManager::GetAnalysisManager();
   am->LoadBranch("AliESDHeader.");
-  AliESDHeader *header = esdEv->GetHeader();
+  AliVHeader *header = InputEvent()->GetHeader();
   TString title(header->GetTitle());
   if (title.Length()>0) {
     UInt_t offline = header->GetUniqueID();