]>
Commit | Line | Data |
---|---|---|
5c6b40ae | 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> | |
eba76848 | 14 | #include <TString.h> |
5c6b40ae | 15 | |
16 | class TMap; | |
17 | class TList; | |
18 | class AliCDBMetaData; | |
84090f85 | 19 | class AliCDBPath; |
d461a8a7 | 20 | class AliCDBPath; |
5c6b40ae | 21 | |
22 | class AliTestShuttle : public AliShuttleInterface | |
23 | { | |
24 | public: | |
17111222 | 25 | AliTestShuttle(Int_t run, UInt_t startTime, UInt_t endTime); |
5c6b40ae | 26 | virtual ~AliTestShuttle(); |
27 | ||
36137ac1 | 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; } | |
eba76848 | 30 | void AddInputRunParameter(const char* key, const char* value); |
9827400b | 31 | void SetInputRunType(const char* runType) { fRunType = runType; } |
87968cd5 | 32 | void SetInputHLTStatus(Bool_t status) { fHLTStatus = status; } |
ca8ea066 | 33 | void SetInputTriggerConfiguration(const char* configuration) { fTriggerConfiguration = configuration; } |
2c5f9d06 | 34 | void SetInputCTPTimeParams(const char* ctptiming) { fCTPtiming = ctptiming; } |
c986bd09 | 35 | void SetInputTriggerDetectorMask(const char* triggerDetectorMask) { fTriggerDetectorMask = triggerDetectorMask; } |
d461a8a7 | 36 | Bool_t AddInputCDBEntry(AliCDBEntry* entry); |
eff647d5 | 37 | void SetTimeCreated(UInt_t timeCreated) { fTimeCreated = timeCreated;} |
38 | void SetDCSQueryOffset(UInt_t dcsQueryOffset) { fDCSQueryOffset = dcsQueryOffset;} | |
36137ac1 | 39 | void Process(); |
40 | ||
41 | // AliShuttleInterface functions | |
9827400b | 42 | virtual Bool_t Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData, |
84090f85 | 43 | Int_t validityStart = 0, Bool_t validityInfinite = kFALSE); |
9827400b | 44 | virtual Bool_t StoreReferenceData(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData); |
45 | virtual Bool_t StoreReferenceFile(const char* detector, const char* localFile, const char* gridFileName); | |
77dc0223 | 46 | virtual Bool_t StoreRunMetadataFile(const char* localFile, const char* gridFileName); |
5c6b40ae | 47 | virtual const char* GetFile(Int_t system, const char* detector, const char* id, const char* source); |
4a33bdd9 | 48 | virtual TList* GetFileSources(Int_t system, const char* detector, const char* id = 0); |
49 | virtual TList* GetFileIDs(Int_t system, const char* detector, const char* source); | |
eba76848 | 50 | virtual const char* GetRunParameter(const char* key); |
46ad8eef | 51 | virtual UInt_t GetStartTimeDCSQuery(); |
52 | virtual UInt_t GetEndTimeDCSQuery(); | |
9827400b | 53 | virtual AliCDBEntry* GetFromOCDB(const char* detector, const AliCDBPath& path); |
54 | virtual const char* GetRunType(); | |
87968cd5 | 55 | virtual Bool_t GetHLTStatus() {return fHLTStatus;} |
59def2a2 | 56 | virtual const char* GetTriggerConfiguration(); |
2c5f9d06 | 57 | virtual const char* GetCTPTimeParams(); |
c986bd09 | 58 | virtual const char* GetTriggerDetectorMask(); |
6a150f83 | 59 | virtual void Log(const char* detector, const char* message, UInt_t level=3); |
5c6b40ae | 60 | |
36137ac1 | 61 | virtual void RegisterPreprocessor(AliPreprocessor* preprocessor); |
62 | ||
d461a8a7 | 63 | static void SetMainCDB (TString mainCDB) {fgkMainCDB = mainCDB;} |
64 | static void SetLocalCDB (TString localCDB) {fgkLocalCDB = localCDB;} | |
65 | ||
66 | static void SetMainRefStorage (TString mainRefStorage) {fgkMainRefStorage = mainRefStorage;} | |
67 | static void SetLocalRefStorage (TString localRefStorage) {fgkLocalRefStorage = localRefStorage;} | |
68 | ||
69 | static void SetShuttleTempDir (const char* tmpDir); | |
70 | static void SetShuttleLogDir (const char* logDir); | |
71 | ||
1f0f7c2e | 72 | virtual void SendMLFromDet(const char* value); |
73 | ||
5c6b40ae | 74 | protected: |
eba76848 | 75 | |
eff647d5 | 76 | Int_t fRun; // run that is simulated with the AliTestShuttle |
77 | UInt_t fStartTime; // starttime that is simulated with the AliTestShuttle | |
78 | UInt_t fEndTime; // endtime that is simulated with the AliTestShuttle | |
79 | UInt_t fTimeCreated; // timecreated that is simulated with the AliTestShuttle | |
80 | UInt_t fDCSQueryOffset; // DCS query offset | |
17111222 | 81 | |
eba76848 | 82 | TMap* fInputFiles; // files for GetFile, GetFileSources |
441b0e9c | 83 | TMap* fRunParameters; // run parameters |
9827400b | 84 | TString fRunType; // run type |
87968cd5 | 85 | Bool_t fHLTStatus; // HLT status for current run (on=1/off=0) |
36137ac1 | 86 | TObjArray* fPreprocessors; // list of preprocessors that are to be tested |
87 | TMap* fDcsAliasMap; // DCS data for testing | |
ca8ea066 | 88 | TString fTriggerConfiguration; // trigger configuration for testing |
c986bd09 | 89 | TString fTriggerDetectorMask; // trigger detector mask for testing |
2c5f9d06 | 90 | TString fCTPtiming; // CTP time paramters for testing |
5c6b40ae | 91 | |
92 | private: | |
77dc0223 | 93 | Bool_t CopyFileLocally(TString& targetDir, const char* localFile, const char* gridFileName); |
94 | const char* GetRefFilePrefix(const char* base, const char* detector); | |
95 | ||
5c6b40ae | 96 | ClassDef(AliTestShuttle, 0); |
97 | }; | |
98 | ||
99 | #endif |