Shuttle getters and setters for main OCDB/Reference, local OCDB/Reference, temp
[u/mrichter/AliRoot.git] / STEER / AliShuttleInterface.h
CommitLineData
57459306 1#ifndef ALI_SHUTTLE_INTERFACE_H
2#define ALI_SHUTTLE_INTERFACE_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// abstract interface class to AliShuttle
11//
12
13#include <TObject.h>
3fe92ec0 14#include <TString.h>
57459306 15
16class TList;
17class AliCDBMetaData;
b88146b7 18class AliPreprocessor;
84090f85 19class AliCDBPath;
57459306 20
21class AliShuttleInterface : public TObject
22{
23 public:
1b82b32d 24 enum System { kDAQ = 0, kDCS, kHLT };
a4e34333 25 enum { kNDetectors = 18 }; // number of subdetectors in ALICE
57459306 26
84090f85 27 virtual UInt_t Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData,
28 Int_t validityStart = 0, Bool_t validityInfinite = kFALSE) = 0;
3c78eaa5 29 virtual UInt_t StoreReferenceData(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData) = 0;
57459306 30 virtual const char* GetFile(Int_t system, const char* detector, const char* id, const char* source) = 0;
31 virtual TList* GetFileSources(Int_t system, const char* detector, const char* id) = 0;
1b82b32d 32 virtual const char* GetRunParameter(const char* lbEntry) = 0;
57459306 33 virtual void Log(const char* detector, const char* message) = 0;
34
b88146b7 35 virtual void RegisterPreprocessor(AliPreprocessor* preprocessor) = 0;
36
1b82b32d 37 static const char* GetSystemName(UInt_t system) {return (system < 3) ? fkSystemNames[system] : 0;}
38
39 static const char* GetOfflineDetName(const char* detName);
40 static const char* GetDetName(UInt_t detPos);
41 static const Int_t GetDetPos(const char* detName);
42 static const UInt_t NDetectors() {return kNDetectors;}
43
3fe92ec0 44 static TString GetMainCDB () {return fgkMainCDB;}
45 static void SetMainCDB (TString mainCDB) {fgkMainCDB = mainCDB;}
46 static TString GetLocalCDB () {return fgkLocalCDB;}
47 static void SetLocalCDB (TString localCDB) {fgkLocalCDB = localCDB;}
48
49 static TString GetMainRefStorage() {return fgkMainRefStorage;}
50 static void SetMainRefStorage (TString mainRefStorage) {fgkMainRefStorage = mainRefStorage;}
51 static TString GetLocalRefStorage() {return fgkLocalRefStorage;}
52 static void SetLocalRefStorage (TString localRefStorage) {fgkLocalRefStorage = localRefStorage;}
53
54 static void SetShuttleTempDir (const char* tmpDir);
55 static const char* GetShuttleTempDir() {return fgkShuttleTempDir.Data();}
56 static void SetShuttleLogDir (const char* logDir);
57 static const char* GetShuttleLogDir() {return fgkShuttleLogDir.Data();}
58
1b82b32d 59 protected:
60 static const char* fkSystemNames[3]; // names of the systems providing data to the shuttle
3fe92ec0 61 static const char* fgkDetName[kNDetectors]; // names of detectors' preprocessors (3-letter code convention)
62 static const char* fgkOfflineDetName[kNDetectors]; // names of detectors in OCDB (AliRoot naming convention)
63
64 static TString fgkMainCDB; // URI of the main (Grid) CDB storage
65 static TString fgkLocalCDB; // URI of the local backup CDB storage
66 static TString fgkMainRefStorage; // URI of the main (Grid) REFERENCE storage
67 static TString fgkLocalRefStorage; // URI of the local REFERENCE storage
68
69 static TString fgkShuttleTempDir; // path of SHUTTLE temp folder
70 static TString fgkShuttleLogDir; // path of SHUTTLE log folder
1b82b32d 71
57459306 72 private:
73 ClassDef(AliShuttleInterface, 0);
74};
75
76#endif