]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/TestShuttle/AliTestShuttle.h
06ba6f700f657a1fbbb9dcdcd7c25e84ad7ad575
[u/mrichter/AliRoot.git] / SHUTTLE / TestShuttle / AliTestShuttle.h
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
21 class AliTestShuttle : public AliShuttleInterface
22 {
23   public:
24     AliTestShuttle(Int_t run, UInt_t startTime, UInt_t endTime);
25     virtual ~AliTestShuttle();
26
27     void AddInputFile(Int_t system, const char* detector, const char* id, const char* source, const char* fileName);
28     void SetDCSInput(TMap* dcsAliasMap) { fDcsAliasMap = dcsAliasMap; }
29     void AddInputRunParameter(const char* key, const char* value);
30
31     void Process();
32
33     // AliShuttleInterface functions
34     virtual UInt_t Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData,
35                                         Int_t validityStart = 0, Bool_t validityInfinite = kFALSE);
36     virtual UInt_t StoreReferenceData(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData);
37     virtual const char* GetFile(Int_t system, const char* detector, const char* id, const char* source);
38     virtual TList* GetFileSources(Int_t system, const char* detector, const char* id);
39     virtual const char* GetRunParameter(const char* key);
40     virtual void Log(const char* detector, const char* message);
41
42     static TString GetMainCDB () {return fgkMainCDB;}
43     static void SetMainCDB (TString mainCDB) {fgkMainCDB = mainCDB;}
44     static TString GetMainRefStorage() {return fgkMainRefStorage;}
45     static void SetMainRefStorage (TString mainRefStorage) {fgkMainRefStorage = mainRefStorage;}
46
47     static void SetShuttleTempDir (const char* tmpDir);
48     static const char* GetShuttleTempDir() {return fgkShuttleTempDir.Data();}
49     static void SetShuttleLogDir (const char* logDir);
50     static const char* GetShuttleLogDir() {return fgkShuttleLogDir.Data();}
51
52     virtual void RegisterPreprocessor(AliPreprocessor* preprocessor);
53
54   protected:
55     static TString          fgkMainCDB;         // URI of the main (Grid) CDB storage
56     static TString          fgkMainRefStorage;  // URI of the main (Grid) REFERENCE storage
57     static TString          fgkShuttleTempDir;  // base path of SHUTTLE temp folder
58     static TString          fgkShuttleLogDir;   // path of SHUTTLE log folder
59
60     Int_t fRun;         // run that is simulated with the AliTestShuttle
61     UInt_t fStartTime;  // starttime that is simulated with the AliTestShuttle
62     UInt_t fEndTime;    // endtime that is simulated with the AliTestShuttle
63
64     TMap* fInputFiles;      // files for GetFile, GetFileSources
65     TMap* fRunParameters;    // run parameters
66     TObjArray* fPreprocessors; // list of preprocessors that are to be tested
67     TMap* fDcsAliasMap; // DCS data for testing
68
69   private:
70     ClassDef(AliTestShuttle, 0);
71 };
72
73 #endif