]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/AliShuttle.h
o) removed files that were moved to STEER
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttle.h
1 #ifndef ALI_SHUTTLE_H
2 #define ALI_SHUTTLE_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
10 //
11 // This class is the main manager for 
12 // AliShuttle. It organizes the data retrieval
13 // from DCS and call the interface methods of
14 // AliCDBPreProcessor.
15 //
16
17 #include <TObject.h>
18 #include <TMap.h>
19 #include <TString.h>
20
21 #include "AliShuttleInterface.h"
22
23 class AliShuttleConfig;
24 class AliPreprocessor;
25 class AliCDBMetaData;
26
27 class AliShuttle: public AliShuttleInterface {
28 public:
29         AliShuttle(const AliShuttleConfig* config, UInt_t timeout = 5000, Int_t retries = 5);
30         virtual ~AliShuttle();
31
32         virtual void RegisterPreprocessor(AliPreprocessor* preprocessor);
33
34         Bool_t Process(Int_t run, UInt_t startTime, UInt_t endTime);
35         Bool_t Process(Int_t run, UInt_t startTime, UInt_t endTime,
36                 const char* detector);
37
38         Int_t GetCurrentRun() const {return fCurrentRun;};
39         UInt_t GetCurrentStartTime() const {return fCurrentStartTime;};
40         UInt_t GetCurrentEndTime() const {return fCurrentEndTime;};
41
42         virtual UInt_t Store(const char* detector, TObject* object, AliCDBMetaData* metaData);
43         virtual const char* GetFile(Int_t system, const char* detector,
44                 const char* id, const char* source);
45         virtual TList* GetFileSources(Int_t system, const char* detector, const char* id);
46         virtual void Log(const char* detector, const char* message);
47
48         static TString GetLocalURI () {return fgkLocalUri;}
49         static void SetLocalURI (TString localUri) {fgkLocalUri = localUri;}
50
51 private:
52
53         static TString fgkLocalUri;
54
55         void ClearLog() {fLog = "";}
56         void StoreLog(Int_t run);
57         const AliShuttleConfig* fConfig;
58
59 //      AliCDBStorage* fLocalStorage;
60
61         UInt_t fTimeout;
62         Int_t fRetries;
63
64         TMap fPreprocessorMap;
65
66         Int_t fCurrentRun;
67         UInt_t fCurrentStartTime;
68         UInt_t fCurrentEndTime;
69
70         TString fLog;
71
72         Bool_t GetValueSet(const char* host, Int_t port, const char* alias,
73                         TObjArray& result);
74         
75         ClassDef(AliShuttle, 0);
76 };
77
78 #endif