]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALI_TEST_SHUTTLE_H | |
2 | #define ALI_TEST_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 | // test implementation of the AliShuttleInterface, to be used for local tests of preprocessors | |
11 | // | |
12 | ||
13 | #include <AliShuttleInterface.h> | |
14 | #include <TString.h> | |
15 | ||
16 | class TMap; | |
17 | class TList; | |
18 | class AliCDBMetaData; | |
19 | class AliCDBPath; | |
20 | class AliCDBPath; | |
21 | ||
22 | class AliTestShuttle : public AliShuttleInterface | |
23 | { | |
24 | public: | |
25 | AliTestShuttle(Int_t run, UInt_t startTime, UInt_t endTime); | |
26 | virtual ~AliTestShuttle(); | |
27 | ||
28 | void AddInputFile(Int_t system, const char* detector, const char* id, const char* source, const char* fileName); | |
29 | void SetDCSInput(TMap* dcsAliasMap) { fDcsAliasMap = dcsAliasMap; } | |
30 | void AddInputRunParameter(const char* key, const char* value); | |
31 | void SetInputRunType(const char* runType) { fRunType = runType; } | |
32 | void SetInputHLTStatus(Bool_t status) { fHLTStatus = status; } | |
33 | Bool_t AddInputCDBEntry(AliCDBEntry* entry); | |
34 | ||
35 | void Process(); | |
36 | ||
37 | // AliShuttleInterface functions | |
38 | virtual Bool_t Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData, | |
39 | Int_t validityStart = 0, Bool_t validityInfinite = kFALSE); | |
40 | virtual Bool_t StoreReferenceData(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData); | |
41 | virtual Bool_t StoreReferenceFile(const char* detector, const char* localFile, const char* gridFileName); | |
42 | virtual const char* GetFile(Int_t system, const char* detector, const char* id, const char* source); | |
43 | virtual TList* GetFileSources(Int_t system, const char* detector, const char* id = 0); | |
44 | virtual TList* GetFileIDs(Int_t system, const char* detector, const char* source); | |
45 | virtual const char* GetRunParameter(const char* key); | |
46 | virtual AliCDBEntry* GetFromOCDB(const char* detector, const AliCDBPath& path); | |
47 | virtual const char* GetRunType(); | |
48 | virtual Bool_t GetHLTStatus() {return fHLTStatus;} | |
49 | virtual void Log(const char* detector, const char* message); | |
50 | ||
51 | virtual void RegisterPreprocessor(AliPreprocessor* preprocessor); | |
52 | ||
53 | static void SetMainCDB (TString mainCDB) {fgkMainCDB = mainCDB;} | |
54 | static void SetLocalCDB (TString localCDB) {fgkLocalCDB = localCDB;} | |
55 | ||
56 | static void SetMainRefStorage (TString mainRefStorage) {fgkMainRefStorage = mainRefStorage;} | |
57 | static void SetLocalRefStorage (TString localRefStorage) {fgkLocalRefStorage = localRefStorage;} | |
58 | ||
59 | static void SetShuttleTempDir (const char* tmpDir); | |
60 | static void SetShuttleLogDir (const char* logDir); | |
61 | ||
62 | protected: | |
63 | ||
64 | Int_t fRun; // run that is simulated with the AliTestShuttle | |
65 | UInt_t fStartTime; // starttime that is simulated with the AliTestShuttle | |
66 | UInt_t fEndTime; // endtime that is simulated with the AliTestShuttle | |
67 | ||
68 | TMap* fInputFiles; // files for GetFile, GetFileSources | |
69 | TMap* fRunParameters; // run parameters | |
70 | TString fRunType; // run type | |
71 | Bool_t fHLTStatus; // HLT status for current run (on=1/off=0) | |
72 | TObjArray* fPreprocessors; // list of preprocessors that are to be tested | |
73 | TMap* fDcsAliasMap; // DCS data for testing | |
74 | ||
75 | private: | |
76 | ClassDef(AliTestShuttle, 0); | |
77 | }; | |
78 | ||
79 | #endif |