Fix from Salvatore for new framework
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskSE.h
1 #ifndef ALIANALYSISTASKSE_H
2 #define ALIANALYSISTASKSE_H
3  
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 #include "AliAnalysisTask.h"
10 #include "AliVEvent.h"
11
12 class AliAODEvent;
13 class AliAODHeader;
14 class AliTOFHeader;
15 class AliAODVZERO;
16 class AliAODTracklets;
17 class AliAODCaloCells;
18 class AliAODCaloTrigger;
19 class AliMCEvent;
20 class AliMCEventHandler;
21 class AliInputEventHandler;
22 class AliMultiInputEventHandler;
23 class AliAnalysisCuts;
24 class AliESDfriend;
25 class AliEventTag;
26
27 class TTree;
28 class TList;
29
30
31 class AliAnalysisTaskSE : public AliAnalysisTask
32 {
33  public:
34     AliAnalysisTaskSE();
35     AliAnalysisTaskSE(const char* name);
36     AliAnalysisTaskSE(const AliAnalysisTaskSE& obj);
37     AliAnalysisTaskSE& operator=(const AliAnalysisTaskSE& other);
38     virtual ~AliAnalysisTaskSE() {;}
39     // Implementation of interface methods
40     virtual void   ConnectInputData(Option_t *option = "");
41     virtual void   CreateOutputObjects();
42     virtual void   Exec(Option_t* option);
43     virtual void   SetDebugLevel(Int_t level) {fDebug = level;}
44     virtual void   Init() {;}
45     virtual Bool_t Notify();
46     // To be implemented by user
47     virtual void   UserCreateOutputObjects()  {;}
48     virtual void   UserExec(Option_t* /*option*/) {;}
49     virtual void   UserExecMix(Option_t */*option*/) {;}
50     virtual Bool_t UserNotify() {return kTRUE;}
51     virtual void   NotifyRun()  {;}
52     
53     // Helpers for adding branches to the AOD
54     virtual void   AddAODBranch(const char* cname, void* addobj, const char *fname="");
55     // Event Selection
56     virtual void   SelectCollisionCandidates(UInt_t offlineTriggerMask = AliVEvent::kMB) {fOfflineTriggerMask = offlineTriggerMask;}
57     // Loading the declared input branches
58     void           LoadBranches() const;
59  // Getters
60     virtual Int_t         DebugLevel() const  {return fDebug;     }
61     virtual AliVEvent*    InputEvent() const  {return fInputEvent;}
62     virtual AliESDfriend* ESDfriend()  const  {return fESDfriend; }
63     virtual AliAODEvent*  AODEvent()   const  {return fOutputAOD; }
64     virtual TTree*        OutputTree() const  {return fTreeA;     }
65     virtual AliMCEvent*   MCEvent()    const  {return fMCEvent;   }
66     virtual Long64_t      Entry()      const  {return fEntry;     }
67     virtual const AliEventTag *EventTag() const;
68     virtual const char*   CurrentFileName();
69     virtual Bool_t        IsStandardAOD() const;
70     virtual TList*        GetQAHistos()   const {return fHistosQA;}
71     virtual Bool_t        IsEventInBinZero() { return kFALSE;}
72     virtual UInt_t        GetCollisionCandidates() const { return fOfflineTriggerMask;}
73  protected:
74     void ConnectMultiHandler();
75     void DisconnectMultiHandler();
76
77   protected:
78     Int_t                 fDebug;           //  Debug flag
79     // IO
80     Int_t                 fEntry;           //  Current entry in the chain
81     AliVEvent*            fInputEvent;      //! VEvent Input
82     AliESDfriend*         fESDfriend;       //! ESD friend
83     AliInputEventHandler* fInputHandler;    //! Input Handler
84     AliAODEvent*          fOutputAOD;       //! AOD out 
85     AliMCEvent*           fMCEvent;         //! MC
86     TTree*                fTreeA;           //  AOD output Tree
87     Int_t                 fCurrentRunNumber;//! Current run number
88     // Output histos for QA
89     TList*                fHistosQA;        //! Output histos for QA
90     // Provisions for replication
91     static AliAODHeader*    fgAODHeader;        //! Header for replication
92     static AliTOFHeader*    fgTOFHeader;        //! TOFHeader for replication
93     static AliAODVZERO*     fgAODVZERO;         //! VZERO for replication
94     static TClonesArray*    fgAODTracks;        //! Tracks for replication
95     static TClonesArray*    fgAODVertices;      //! Vertices for replication
96     static TClonesArray*    fgAODV0s;           //! V0s for replication
97     static TClonesArray*    fgAODPMDClusters;   //! PMDClusters for replication
98     static TClonesArray*    fgAODJets;          //! Jets for replication
99     static TClonesArray*    fgAODFMDClusters;   //! FMDClusters for replication
100     static TClonesArray*    fgAODCaloClusters;  //! CaloClusters for replication
101     static AliAODCaloTrigger* fgAODEMCALTrigger; //! Emcal Trigger for replication
102     static AliAODCaloTrigger* fgAODPHOSTrigger;  //! Phos Trigger for replication
103     static TClonesArray*    fgAODMCParticles;   //! MC Particles for replicatio
104     static AliAODTracklets* fgAODTracklets;     //! Tracklets for replication
105     static AliAODCaloCells* fgAODEmcalCells;    //! Emcal Cell replication
106     static AliAODCaloCells* fgAODPhosCells;     //! Phos  Cell replication
107     static TClonesArray*    fgAODDimuons;       //! Dimuons replication
108     static TClonesArray*    fgAODHmpidRings;    //! HMPID replication
109     // Event Selection
110     UInt_t fOfflineTriggerMask;   //  Task processes collision candidates only
111     // Event Mixing
112     AliMultiInputEventHandler *fMultiInputHandler;  //! pointer to multihandler
113     AliMCEventHandler         *fMCEventHandler;     //! pointer to MCEventHandler
114     ClassDef(AliAnalysisTaskSE, 4); // Analysis task for standard jet analysis
115 };
116  
117 #endif