]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TENDER/Tender/AliTender.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / TENDER / Tender / AliTender.h
1 #ifndef ALITENDER_H
2 #define ALITENDER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7 // Author: Andrei Gheata, 31/08/2009
8
9 //==============================================================================
10 //   AliTender - Tender wagon providing access to ESD event and CDB.
11 //      The tender calls an arbitrary number of user algorithms that add or
12 //      correct information in ESD based on CDB info that was not available
13 //      during pass1 reconstruction.
14 //==============================================================================
15
16 #ifndef ALIANALYSISTASKSE_H
17 #include "AliAnalysisTaskSE.h"
18 #endif
19
20 // #ifndef ALIESDINPUTHANDLER_H
21 // #include "AliESDInputHandler.h"
22 // #endif
23 class AliCDBManager;
24 class AliESDEvent;
25 class AliESDInputHandler;
26 class AliTenderSupply;
27
28 class AliTender : public AliAnalysisTaskSE {
29
30 public:
31 enum ETenderFlags {
32    kCheckEventSelection = BIT(18) // up to 18 used by AliAnalysisTask
33 };
34    
35 private:
36   Int_t                     fRun;            //! Current run
37   Bool_t                    fRunChanged;     //! Flag for run change.
38   ULong64_t                 fCDBkey;         //! Key to unlock CDB manager
39   TString                   fDefaultStorage; // Default CDB storage
40   AliCDBManager            *fCDB;            //! Pointer to CDB manager
41   AliESDInputHandler       *fESDhandler;     //! Pointer to ESD input handler
42   AliESDEvent              *fESD;            //! Pointer to current ESD event
43   TObjArray                *fSupplies;       // Array of tender supplies
44   TObjArray                *fCDBSettings;    // Array with CDB configuration
45   
46   AliTender(const AliTender &other);
47   AliTender& operator=(const AliTender &other);
48
49 public:  
50   AliTender();
51   AliTender(const char *name);
52   virtual ~AliTender();
53
54   void                      AddSupply(AliTenderSupply *supply);
55   Int_t                     GetRun() const {return fRun;}
56   AliCDBManager            *GetCDBManager() const {return fCDB;}
57   AliESDInputHandler       *GetESDhandler() const {return fESDhandler;}
58   AliESDEvent              *GetEvent() const {return fESD;}
59   TObjArray                *GetSupplies() const {return fSupplies;}
60   void                      SetCheckEventSelection(Bool_t flag=kTRUE) {TObject::SetBit(kCheckEventSelection,flag);}
61   Bool_t                    RunChanged() const {return fRunChanged;}
62   // Configuration
63   void                      SetDefaultCDBStorage(const char *dbString="local://$ALICE_ROOT/OCDB");
64   void SetESDhandler(AliESDInputHandler*esdH) {fESDhandler = esdH;}
65
66   // Run control
67   virtual void              ConnectInputData(Option_t *option = "");
68   virtual void              UserCreateOutputObjects();
69 //  virtual Bool_t            Notify() {return kTRUE;}
70   virtual void              UserExec(Option_t *option);
71     
72   ClassDef(AliTender,4)  // Class describing the tender car for ESD analysis
73 };
74 #endif