]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/TPC/AliTaskConfigOCDB.h
Correcly handle centrality bins (Diego)
[u/mrichter/AliRoot.git] / PWGPP / TPC / AliTaskConfigOCDB.h
1 #ifndef ALITASKCONFIGOCDB_H
2 #define ALITASKCONFIGOCDB_H
3
4 //==============================================================================
5 // TaskCDBconnect - task just allowing connection to CDB (no lock)
6 //==============================================================================
7
8 #ifndef ALIANALYSISTASK_H
9 #include "AliAnalysisTask.h"
10 #endif
11
12 class AliCDBManager;
13 class AliGRPManager;
14 class AliESDEvent;
15 class AliESDInputHandler;
16
17 class AliTaskConfigOCDB : public AliAnalysisTask {
18 private:
19   Int_t                     fRun;            // Current run
20   TString                   fOCDBstorage;    // ocdbStorage
21   Bool_t                    fRunChanged;     //! Flag for run change.
22   AliESDInputHandler       *fESDhandler;     //! Pointer to ESD input handler
23   AliESDEvent              *fESD;            //! Pointer to current ESD event
24   AliGRPManager            *fGRPManager;     //! Pointer to GRP manager
25
26   AliTaskConfigOCDB(const AliTaskConfigOCDB &other);
27   AliTaskConfigOCDB& operator=(const AliTaskConfigOCDB &other);
28
29 public:
30   AliTaskConfigOCDB();
31   AliTaskConfigOCDB(const char *name, const char *storage="raw://", Int_t run=0);
32   virtual ~AliTaskConfigOCDB();
33   AliESDInputHandler       *GetESDhandler() const {return fESDhandler;}
34   AliESDEvent              *GetEvent() const {return fESD;}
35   Int_t                     GetRun() const {return fRun;}
36   void                      InitGRP();
37   Bool_t                    RunChanged() const {return fRunChanged;}
38   void                      SetRunNumber(Int_t run) {fRun = run;}
39   // Run control
40   virtual void              ConnectInputData(Option_t *option = "");
41   virtual void              CreateOutputObjects();
42   virtual void              LocalInit();
43   virtual Bool_t            Notify();
44   virtual void              Exec(Option_t *option);
45   virtual void              Terminate(Option_t *option);
46   Int_t guessRunNumber(TString path);
47     
48   ClassDef(AliTaskConfigOCDB,1)  // Class giving CDB connectivity
49 };
50 #endif