]>
Commit | Line | Data |
---|---|---|
12ec5482 | 1 | //-*- Mode: C++ -*- |
2 | // @(#) $Id: AliHLTModulePreprocessor.h 23318 2008-01-14 12:43:28Z hristov $ | |
3 | ||
4 | #ifndef ALIHLTMODULEPREPROCESSOR_H | |
5 | #define ALIHLTMODULEPREPROCESSOR_H | |
6 | //* This file is property of and copyright by the ALICE HLT Project * | |
7 | //* ALICE Experiment at CERN, All rights reserved. * | |
8 | //* See cxx source for full Copyright notice * | |
9 | ||
10 | /** | |
11 | * @file AliHLTModulePreprocessor.h | |
12 | * @author Matthias Richter | |
13 | * @date 2008-01-22 | |
14 | * @brief Base class for HLT module preprocessors | |
15 | */ | |
16 | ||
17 | // see below for class documentation | |
18 | // or | |
19 | // refer to README to build package | |
20 | // or | |
21 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
22 | ||
23 | #include "TObject.h" | |
24 | ||
25 | class AliHLTPreprocessor; | |
26 | class TMap; | |
27 | class AliCDBMetaData; | |
28 | class AliCDBEntry; | |
29 | ||
30 | /** | |
31 | * @class AliHLTModulePreprocessor | |
32 | * Implementation of the HLT version for the Shuttle Preprocessor. | |
33 | * This class implements the same interface as the AliPreprocessor and | |
34 | * allows multiple preprocessors for the HLT. All methods are redirected | |
35 | * to the AliHLTPreprocessor, which acts as the HLT preprocessor | |
36 | * to the outside, and a container for all module preprocessors to the | |
37 | * inside. | |
38 | * | |
39 | * @author Matthias Richter | |
40 | */ | |
41 | class AliHLTModulePreprocessor : public TObject | |
42 | { | |
43 | public: | |
44 | /** Constructor*/ | |
45 | AliHLTModulePreprocessor(); | |
46 | /** Destructor */ | |
47 | virtual ~AliHLTModulePreprocessor(); | |
48 | ||
49 | /** | |
50 | * Set the container class which is the gateway to the shuttle. | |
51 | */ | |
52 | void SetContainer(AliHLTPreprocessor* pContainer); | |
53 | ||
54 | /** | |
55 | * Initialize the Preprocessor. | |
56 | * | |
57 | * @param run run number | |
58 | * @param startTime start time of data | |
59 | * @param endTime end time of data | |
60 | */ | |
61 | virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime) = 0; | |
62 | ||
63 | /** | |
64 | * Function to process data. Inside the preparation and storing to OCDB | |
65 | * should be handled. | |
66 | * | |
67 | * @param dcsAliasMap the map containing aliases and corresponding DCS | |
68 | * values and timestamps | |
69 | * | |
70 | * @return 0 on success; error code otherwise | |
71 | */ | |
72 | virtual UInt_t Process(TMap* dcsAliasMap) = 0; | |
73 | ||
74 | /** Get the run no */ | |
75 | Int_t GetRun(); | |
76 | ||
77 | /** Get the start time */ | |
78 | UInt_t GetStartTime(); | |
79 | ||
80 | /** Get the end time */ | |
81 | UInt_t GetEndTime(); | |
82 | ||
83 | protected: | |
84 | // the AliPreprocessor interface, all functions redirected via the | |
85 | // AliHLTPreprocessor | |
86 | Bool_t Store(const char* pathLevel2, const char* pathLevel3, TObject* object, | |
87 | AliCDBMetaData* metaData, Int_t validityStart = 0, Bool_t validityInfinite = kFALSE); | |
88 | Bool_t StoreReferenceData(const char* pathLevel2, const char* pathLevel3, TObject* object, | |
89 | AliCDBMetaData* metaData); | |
90 | Bool_t StoreReferenceFile(const char* localFile, const char* gridFileName); | |
91 | ||
92 | Bool_t StoreRunMetadataFile(const char* localFile, const char* gridFileName); | |
93 | ||
94 | const char* GetFile(Int_t system, const char* id, const char* source); | |
95 | ||
96 | TList* GetFileSources(Int_t system, const char* id = 0); | |
97 | ||
98 | TList* GetFileIDs(Int_t system, const char* source); | |
99 | ||
100 | const char* GetRunParameter(const char* param); | |
101 | ||
102 | AliCDBEntry* GetFromOCDB(const char* pathLevel2, const char* pathLevel3); | |
103 | ||
104 | const char* GetRunType(); | |
105 | ||
106 | void Log(const char* message); | |
107 | ||
108 | private: | |
109 | /** copy constructor prohibited */ | |
110 | AliHLTModulePreprocessor(const AliHLTModulePreprocessor& preproc); | |
111 | /** assignment operator prohibited */ | |
112 | AliHLTModulePreprocessor& operator=(const AliHLTModulePreprocessor& rhs); | |
113 | ||
114 | /** the contaner class which is the gateway to the shuttle */ | |
115 | AliHLTPreprocessor* fpContainer; //! transient | |
116 | ||
117 | ClassDef(AliHLTModulePreprocessor, 0); | |
118 | }; | |
119 | ||
120 | ||
121 | #endif | |
122 | ||
123 |