]> git.uio.no Git - u/mrichter/AliRoot.git/blame - SHUTTLE/AliShuttle.h
removing dynamic types
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttle.h
CommitLineData
73abe331 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
a7160fe9 14// AliPreprocessor.
73abe331 15//
16
73abe331 17#include <TMap.h>
b948db8d 18#include <TString.h>
57f50b3c 19#include <TList.h>
b948db8d 20
21#include "AliShuttleInterface.h"
73abe331 22
58bc3020 23class TObject;
73abe331 24class AliShuttleConfig;
b948db8d 25class AliPreprocessor;
73abe331 26class AliCDBMetaData;
57f50b3c 27class TSQLServer;
73abe331 28
b948db8d 29class AliShuttle: public AliShuttleInterface {
73abe331 30public:
b948db8d 31 AliShuttle(const AliShuttleConfig* config, UInt_t timeout = 5000, Int_t retries = 5);
73abe331 32 virtual ~AliShuttle();
33
b948db8d 34 virtual void RegisterPreprocessor(AliPreprocessor* preprocessor);
35
d477ad88 36 Bool_t Process(Int_t run, UInt_t startTime, UInt_t endTime);
37 Bool_t Process(Int_t run, UInt_t startTime, UInt_t endTime,
73abe331 38 const char* detector);
39
40 Int_t GetCurrentRun() const {return fCurrentRun;};
41 UInt_t GetCurrentStartTime() const {return fCurrentStartTime;};
42 UInt_t GetCurrentEndTime() const {return fCurrentEndTime;};
43
17111222 44 virtual UInt_t Store(const char* detector, TObject* object, AliCDBMetaData* metaData, Int_t validityStart = 0, Bool_t validityInfinite = kFALSE);
b948db8d 45 virtual const char* GetFile(Int_t system, const char* detector,
46 const char* id, const char* source);
47 virtual TList* GetFileSources(Int_t system, const char* detector, const char* id);
48 virtual void Log(const char* detector, const char* message);
49
50 static TString GetLocalURI () {return fgkLocalUri;}
51 static void SetLocalURI (TString localUri) {fgkLocalUri = localUri;}
73abe331 52
57f50b3c 53 // TODO Test only, remove later!
54 void SetCurrentRun(int run) {fCurrentRun=run;}
55
56 static const char* GetDetCode(const char* detector);
57 static const char* GetShuttleTempDir() {return fgkShuttleTempDir;}
58
59 Bool_t Connect(Int_t system);
60
61
73abe331 62private:
b948db8d 63
58bc3020 64
57f50b3c 65 AliShuttle(const AliShuttle& other);
66 AliShuttle& operator= (const AliShuttle& other);
67
68 Bool_t GetValueSet(const char* host, Int_t port, const char* alias,
69 TObjArray& result);
70
71 const char* GetDAQFileName(const char* detector, const char* id, const char* source);
72 Bool_t RetrieveDAQFile(const char* daqFileName, const char* localFileName);
73 TList* GetDAQFileSources(const char* detector, const char* id);
74 Bool_t UpdateDAQTable(const char* detector);
75
76 const char* GetDCSFileName(const char* detector, const char* id, const char* source);
77// Bool_t RetrieveDCSFile(const char* daqFileName const char* localFileName);
78 TList* GetDCSFileSources(const char* detector, const char* id);
79
80 const char* GetHLTFileName(const char* detector, const char* id, const char* source);
81// Bool_t RetrieveHLTFile(const char* daqFileName, const char* localFileName;
82 TList* GetHLTFileSources(const char* detector, const char* id);
83
b948db8d 84
85 void ClearLog() {fLog = "";}
86 void StoreLog(Int_t run);
b948db8d 87
57f50b3c 88 const AliShuttleConfig* fConfig; //! pointer to configuration object
b948db8d 89
57f50b3c 90 static const Int_t fgkNDetectors = 17; //! number of detectors
91 static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors
92 static const char* fgkDetectorCode[fgkNDetectors]; //! codes of detectors
93 static TString fgkLocalUri; //! URI of the local backup storage location
94 static const char* fgkShuttleTempDir; //! base path of SHUTTLE temp folder
b948db8d 95
57f50b3c 96 UInt_t fTimeout; //! DCS server connection timeout parameter
97 Int_t fRetries; //! Number of DCS server connection retries
73abe331 98
57f50b3c 99 TMap fPreprocessorMap; //! list of detector Preprocessors ("DET", "Preprocessor")
73abe331 100
57f50b3c 101 Int_t fCurrentRun; //! run currenty processed
102 UInt_t fCurrentStartTime; //! Run Start time
103 UInt_t fCurrentEndTime; //! Run end time
104
105 TSQLServer *fServer[3]; //! pointer to the three FS logbook servers
106
107 Bool_t fFESCalled[3]; //! FES call status
108 TList fFESlist[3]; //! List of files retrieved from each FES
109
110 TString fLog; //! log message
b948db8d 111
73abe331 112 ClassDef(AliShuttle, 0);
113};
114
115#endif