2 // @(#) $Id: AliHLTPreprocessor.h 23318 2008-01-14 12:43:28Z hristov $
4 #ifndef ALIHLTPREPROCESSOR_H
5 #define ALIHLTPREPROCESSOR_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 *
11 * @file AliHLTPreprocessor.h
12 * @author Matthias Richter
14 * @brief Container for HLT module preprocessors, acts to the outside as
15 * HLT preprocessor used by the Offline Shuttle
19 #include "AliPreprocessor.h"
20 #include "AliHLTShuttleInterface.h"
23 * @class AliHLTPreprocessor
24 * Implementation of the HLT version for the Shuttle Preprocessor.
25 * Since HLT requires a more modular concept of the pre-processors, this
26 * class acts as HLT pre-processor to the outside and container class for
27 * the specific HLT module pre-processors to the inside.
29 * The base class for HLT module preprocessors is provided by the
30 * AliHLTModulePreprocessor class, which implements the same interface as
31 * the AliPreprocessor.
33 * The main purpose of the container class is to loop over all module
34 * preprocessors and to make the AliPreprocessor interface methods
37 class AliHLTPreprocessor : public AliPreprocessor , public AliHLTShuttleInterface
41 * Constructor for AliHLTPreprocessor
43 * @param shuttle pointer to the hosting shuttle
45 AliHLTPreprocessor(AliShuttleInterface* shuttle);
47 virtual ~AliHLTPreprocessor();
50 * Initialize the Preprocessor.
52 * @param run run number
53 * @param startTime start time of data
54 * @param endTime end time of data
56 virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
59 * Function to process data. Inside the preparation and storing to OCDB
62 * @param dcsAliasMap the map containing aliases and corresponding DCS
63 * values and timestamps
65 * @return 0 on success; a value greater than 0 refers to an error
67 virtual UInt_t Process(TMap* dcsAliasMap);
70 * Indicates if DCS data can be processed.
72 * @return true if DCS data can be processed, else false.
74 virtual Bool_t ProcessDCS();
76 /** Define for name of the HLT Preproc */
77 static const char* fgkHLTPreproc; // see above
79 /** Get the run no which has been previously initialized */
80 Int_t PreprocessorGetRun() {return fRun;}
82 /** Get the start time no which has been previously initialized */
83 UInt_t PreprocessorGetStartTime() {return fStartTime;}
85 /** Get the end time no which has been previously initialized */
86 UInt_t PreprocessorGetEndTime() {return fEndTime;}
88 // AliPreprocessor methods made publicly available
90 Bool_t PreprocessorStore(const char* pathLevel2, const char* pathLevel3, TObject* object,
91 AliCDBMetaData* metaData, Int_t validityStart = 0, Bool_t validityInfinite = kFALSE) {
92 return AliPreprocessor::Store(pathLevel2, pathLevel3, object, metaData, validityStart, validityInfinite);
95 Bool_t PreprocessorStoreReferenceData(const char* pathLevel2, const char* pathLevel3, TObject* object,
96 AliCDBMetaData* metaData) {
97 return AliPreprocessor::StoreReferenceData(pathLevel2, pathLevel3, object, metaData);
100 Bool_t PreprocessorStoreReferenceFile(const char* localFile, const char* gridFileName) {
101 return AliPreprocessor::StoreReferenceFile(localFile, gridFileName);
104 Bool_t PreprocessorStoreRunMetadataFile(const char* localFile, const char* gridFileName) {
105 return AliPreprocessor::StoreRunMetadataFile(localFile, gridFileName);
108 const char* PreprocessorGetFile(Int_t system, const char* id, const char* source) {
109 return AliPreprocessor::GetFile(system, id, source);
112 TList* PreprocessorGetFileSources(Int_t system, const char* id = 0) {
113 return AliPreprocessor::GetFileSources(system, id);
116 TList* PreprocessorGetFileIDs(Int_t system, const char* source) {
117 return AliPreprocessor::GetFileIDs(system, source);
120 const char* PreprocessorGetRunParameter(const char* param) {
121 return AliPreprocessor::GetRunParameter(param);
124 AliCDBEntry* PreprocessorGetFromOCDB(const char* pathLevel2, const char* pathLevel3) {
125 return AliPreprocessor::GetFromOCDB(pathLevel2, pathLevel3);
128 const char* PreprocessorGetRunType() {
129 return AliPreprocessor::GetRunType();
132 void PreprocessorLog(const char* message) {
133 AliPreprocessor::Log(message);
139 /** copy constructor prohibited */
140 AliHLTPreprocessor(const AliHLTPreprocessor& preproc);
141 /** assignment operator prohibited */
142 AliHLTPreprocessor& operator=(const AliHLTPreprocessor& rhs);
144 /** list of HLT module processors */
145 TList fProcessors; //!transient
147 /** determine which which detectors were active */
148 Int_t fActiveDetectors; // bit array of active detectors
150 /** array of default libraries */
151 static const char* fgkHLTDefaultShuttleLibs[]; //!transient
153 ClassDef(AliHLTPreprocessor, 1);