Added task for CDB connection, loading magnetic field and geometry.
[u/mrichter/AliRoot.git] / PWG1 / AliTaskCDBconnect.h
CommitLineData
f902e6f2 1#ifndef ALITASKCDBCONNECT_H
2#define ALITASKCDBCONNECT_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
12class AliCDBManager;
13class AliGRPManager;
14class AliESDEvent;
15class AliESDInputHandler;
16
17class AliTaskCDBconnect : public AliAnalysisTask {
18private:
19 Int_t fRun; //! Current run
20 Bool_t fRunChanged; //! Flag for run change.
21 AliESDInputHandler *fESDhandler; //! Pointer to ESD input handler
22 AliESDEvent *fESD; //! Pointer to current ESD event
23 AliGRPManager *fGRPManager; //! Pointer to GRP manager
24
25 AliTaskCDBconnect(const AliTaskCDBconnect &other);
26 AliTaskCDBconnect& operator=(const AliTaskCDBconnect &other);
27
28public:
29 AliTaskCDBconnect();
30 AliTaskCDBconnect(const char *name);
31 virtual ~AliTaskCDBconnect();
32 AliESDInputHandler *GetESDhandler() const {return fESDhandler;}
33 AliESDEvent *GetEvent() const {return fESD;}
34 Int_t GetRun() const {return fRun;}
35 void InitGRP();
36 Bool_t RunChanged() const {return fRunChanged;}
37 void SetRunNumber(Int_t run) {fRun = run;}
38 // Run control
39 virtual void ConnectInputData(Option_t *option = "");
40 virtual void CreateOutputObjects();
41 virtual void LocalInit();
42 virtual Bool_t Notify() {return kTRUE;}
43 virtual void Exec(Option_t *option);
44
45 ClassDef(AliTaskCDBconnect,1) // Class giving CDB connectivity
46};
47#endif