1 #ifndef ALI_TEST_SHUTTLE_H
2 #define ALI_TEST_SHUTTLE_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 // test implementation of the AliShuttleInterface, to be used for local tests of preprocessors
13 #include <AliShuttleInterface.h>
22 class AliTestShuttle : public AliShuttleInterface
25 AliTestShuttle(Int_t run, UInt_t startTime, UInt_t endTime);
26 virtual ~AliTestShuttle();
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 void SetInputTriggerConfiguration(const char* configuration) { fTriggerConfiguration = configuration; }
34 void SetInputCTPTimeParams(const char* ctptiming) { fCTPtiming = ctptiming; }
35 void SetInputTriggerDetectorMask(const char* triggerDetectorMask) { fTriggerDetectorMask = triggerDetectorMask; }
36 Bool_t AddInputCDBEntry(AliCDBEntry* entry);
37 void SetTimeCreated(UInt_t timeCreated) { fTimeCreated = timeCreated;}
38 void SetDCSQueryOffset(UInt_t dcsQueryOffset) { fDCSQueryOffset = dcsQueryOffset;}
40 void SetLTUConfig(TString* ltuConfig, const char* det);
42 // AliShuttleInterface functions
43 virtual Bool_t Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData,
44 Int_t validityStart = 0, Bool_t validityInfinite = kFALSE);
45 virtual Bool_t StoreReferenceData(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData);
46 virtual Bool_t StoreReferenceFile(const char* detector, const char* localFile, const char* gridFileName);
47 virtual Bool_t StoreRunMetadataFile(const char* localFile, const char* gridFileName);
48 virtual const char* GetFile(Int_t system, const char* detector, const char* id, const char* source);
49 virtual TList* GetFileSources(Int_t system, const char* detector, const char* id = 0);
50 virtual TList* GetFileIDs(Int_t system, const char* detector, const char* source);
51 virtual const char* GetRunParameter(const char* key);
52 virtual UInt_t GetStartTimeDCSQuery();
53 virtual UInt_t GetEndTimeDCSQuery();
54 virtual AliCDBEntry* GetFromOCDB(const char* detector, const AliCDBPath& path);
55 virtual const char* GetRunType();
56 virtual Bool_t GetHLTStatus() {return fHLTStatus;}
57 virtual const char* GetTriggerConfiguration();
58 virtual const char* GetCTPTimeParams();
59 virtual const char* GetTriggerDetectorMask();
60 virtual void Log(const char* detector, const char* message, UInt_t level=3);
62 virtual void RegisterPreprocessor(AliPreprocessor* preprocessor);
64 static void SetMainCDB (TString mainCDB) {fgkMainCDB = mainCDB;}
65 static void SetLocalCDB (TString localCDB) {fgkLocalCDB = localCDB;}
67 static void SetMainRefStorage (TString mainRefStorage) {fgkMainRefStorage = mainRefStorage;}
68 static void SetLocalRefStorage (TString localRefStorage) {fgkLocalRefStorage = localRefStorage;}
70 static void SetShuttleTempDir (const char* tmpDir);
71 static void SetShuttleLogDir (const char* logDir);
73 virtual void SendMLFromDet(const char* value);
74 virtual TString* GetLTUConfig(const char* det);
78 Int_t fRun; // run that is simulated with the AliTestShuttle
79 UInt_t fStartTime; // starttime that is simulated with the AliTestShuttle
80 UInt_t fEndTime; // endtime that is simulated with the AliTestShuttle
81 UInt_t fTimeCreated; // timecreated that is simulated with the AliTestShuttle
82 UInt_t fDCSQueryOffset; // DCS query offset
84 TMap* fInputFiles; // files for GetFile, GetFileSources
85 TMap* fRunParameters; // run parameters
86 TString fRunType; // run type
87 Bool_t fHLTStatus; // HLT status for current run (on=1/off=0)
88 TObjArray* fPreprocessors; // list of preprocessors that are to be tested
89 TMap* fDcsAliasMap; // DCS data for testing
90 TString fTriggerConfiguration; // trigger configuration for testing
91 TString fTriggerDetectorMask; // trigger detector mask for testing
92 TString fCTPtiming; // CTP time paramters for testing
93 TObjArray *fltuConfig; // LTU config TObjArray
96 Bool_t CopyFileLocally(TString& targetDir, const char* localFile, const char* gridFileName);
97 const char* GetRefFilePrefix(const char* base, const char* detector);
99 ClassDef(AliTestShuttle, 0);