coding conventions (Alberto)
[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
14// AliCDBPreProcessor.
15//
16
73abe331 17#include <TMap.h>
b948db8d 18#include <TString.h>
19
20#include "AliShuttleInterface.h"
73abe331 21
58bc3020 22class TObject;
73abe331 23class AliShuttleConfig;
b948db8d 24class AliPreprocessor;
73abe331 25class AliCDBMetaData;
73abe331 26
b948db8d 27class AliShuttle: public AliShuttleInterface {
73abe331 28public:
b948db8d 29 AliShuttle(const AliShuttleConfig* config, UInt_t timeout = 5000, Int_t retries = 5);
73abe331 30 virtual ~AliShuttle();
31
b948db8d 32 virtual void RegisterPreprocessor(AliPreprocessor* preprocessor);
33
d477ad88 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,
73abe331 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
b948db8d 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;}
73abe331 50
51private:
b948db8d 52
58bc3020 53 AliShuttle(const AliShuttle& other);
54 AliShuttle& operator= (const AliShuttle& other);
55
56 static TString fgkLocalUri; // URI of the local backup storage location
b948db8d 57
58 void ClearLog() {fLog = "";}
59 void StoreLog(Int_t run);
60 const AliShuttleConfig* fConfig;
61
62// AliCDBStorage* fLocalStorage;
63
58bc3020 64 UInt_t fTimeout; // DCS server connection timeout parameter
65 Int_t fRetries; // Number of DCS server connection retries
b948db8d 66
58bc3020 67 TMap fPreprocessorMap; // list of detector Preprocessors ("DET", "Preprocessor")
73abe331 68
58bc3020 69 Int_t fCurrentRun; // run currenty processed
70 UInt_t fCurrentStartTime; // Run Start time
71 UInt_t fCurrentEndTime; // Run end time
73abe331 72
58bc3020 73 TString fLog; // log message
b948db8d 74
73abe331 75 Bool_t GetValueSet(const char* host, Int_t port, const char* alias,
d477ad88 76 TObjArray& result);
73abe331 77
78 ClassDef(AliShuttle, 0);
79};
80
81#endif