From 102f6f856132b6029c5ca745d0ade928e54212d4 Mon Sep 17 00:00:00 2001 From: agheata Date: Thu, 17 Jun 2010 13:35:03 +0000 Subject: [PATCH] Tender now derives from AliAnalysisTaskSE to be able to use the SelectCollisionCandidates functionality. --- ANALYSIS/Tender/AliTender.cxx | 18 ++++++++---------- ANALYSIS/Tender/AliTender.h | 16 +++++++--------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/ANALYSIS/Tender/AliTender.cxx b/ANALYSIS/Tender/AliTender.cxx index 8f025aeeda9..b79ed4018d9 100644 --- a/ANALYSIS/Tender/AliTender.cxx +++ b/ANALYSIS/Tender/AliTender.cxx @@ -31,8 +31,7 @@ ClassImp(AliTender) //______________________________________________________________________________ AliTender::AliTender(): - AliAnalysisTask(), - fDebug(0), + AliAnalysisTaskSE(), fRun(0), fRunChanged(kFALSE), fCDBkey(0), @@ -48,8 +47,7 @@ AliTender::AliTender(): //______________________________________________________________________________ AliTender::AliTender(const char* name): - AliAnalysisTask(name, "ESD analysis tender car"), - fDebug(0), + AliAnalysisTaskSE(name), fRun(0), fRunChanged(kFALSE), fCDBkey(0), @@ -61,8 +59,7 @@ AliTender::AliTender(const char* name): fCDBSettings(NULL) { // Default constructor - DefineInput (0, TChain::Class()); - DefineOutput(0, AliESDEvent::Class()); + DefineOutput(1, AliESDEvent::Class()); } //______________________________________________________________________________ @@ -89,10 +86,11 @@ void AliTender::AddSupply(AliTenderSupply *supply) } //______________________________________________________________________________ -void AliTender::ConnectInputData(Option_t* /*option*/) +void AliTender::ConnectInputData(Option_t* option) { // Connect the input data, create CDB manager. if (fDebug > 1) Printf("AliTender::ConnectInputData()\n"); + AliAnalysisTaskSE::ConnectInputData(option); AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); if (!mgr) AliFatal("No tender without an analysis manager"); fESDhandler = dynamic_cast(mgr->GetInputEventHandler()); @@ -119,14 +117,14 @@ void AliTender::ConnectInputData(Option_t* /*option*/) } //______________________________________________________________________________ -void AliTender::CreateOutputObjects() +void AliTender::UserCreateOutputObjects() { // Nothing for the moment, but we may need ESD event replication here. if (fDebug > 1) Printf("AliTender::CreateOutputObjects()\n"); } //______________________________________________________________________________ -void AliTender::Exec(Option_t* /*option*/) +void AliTender::UserExec(Option_t* /*option*/) { // // Execute all supplied analysis of one event. Notify run change via RunChanged(). @@ -151,7 +149,7 @@ void AliTender::Exec(Option_t* /*option*/) fRunChanged = kFALSE; // Lock CDB fCDBkey = fCDB->SetLock(kTRUE, fCDBkey); - PostData(0, fESD); + PostData(1, fESD); } //______________________________________________________________________________ diff --git a/ANALYSIS/Tender/AliTender.h b/ANALYSIS/Tender/AliTender.h index 7e653946aa2..275b34ce2dd 100644 --- a/ANALYSIS/Tender/AliTender.h +++ b/ANALYSIS/Tender/AliTender.h @@ -13,8 +13,8 @@ // during pass1 reconstruction. //============================================================================== -#ifndef ALIANALYSISTASK_H -#include "AliAnalysisTask.h" +#ifndef ALIANALYSISTASKSE_H +#include "AliAnalysisTaskSE.h" #endif class AliCDBManager; @@ -22,10 +22,9 @@ class AliESDEvent; class AliESDInputHandler; class AliTenderSupply; -class AliTender : public AliAnalysisTask { +class AliTender : public AliAnalysisTaskSE { private: - Int_t fDebug; // Debug level Int_t fRun; //! Current run Bool_t fRunChanged; //! Flag for run change. ULong_t fCDBkey; //! Key to unlock CDB manager @@ -53,14 +52,13 @@ public: Bool_t RunChanged() const {return fRunChanged;} // Configuration void SetDefaultCDBStorage(const char *dbString="local://$ALICE_ROOT/OCDB"); - void SetDebugLevel(Int_t debug) {fDebug = debug;} // Run control virtual void ConnectInputData(Option_t *option = ""); - virtual void CreateOutputObjects(); - virtual Bool_t Notify() {return kTRUE;} - virtual void Exec(Option_t *option); + virtual void UserCreateOutputObjects(); +// virtual Bool_t Notify() {return kTRUE;} + virtual void UserExec(Option_t *option); - ClassDef(AliTender,2) // Class describing the tender car for ESD analysis + ClassDef(AliTender,3) // Class describing the tender car for ESD analysis }; #endif -- 2.39.3