]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/shuttle/AliHLTPreprocessor.h
fixed reading from OADB (M. Verweij)
[u/mrichter/AliRoot.git] / HLT / shuttle / AliHLTPreprocessor.h
CommitLineData
12ec5482 1//-*- Mode: C++ -*-
8a6d545f 2// $Id: AliHLTPreprocessor.h 23318 2008-01-14 12:43:28Z hristov $
12ec5482 3
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 *
9
10/**
11 * @file AliHLTPreprocessor.h
12 * @author Matthias Richter
13 * @date 2008-01-22
14 * @brief Container for HLT module preprocessors, acts to the outside as
15 * HLT preprocessor used by the Offline Shuttle
16 */
17
18#include "TList.h"
19#include "AliPreprocessor.h"
310c7637 20#include "AliHLTShuttleInterface.h"
12ec5482 21
22/**
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.
28 *
29 * The base class for HLT module preprocessors is provided by the
30 * AliHLTModulePreprocessor class, which implements the same interface as
31 * the AliPreprocessor.
32 *
33 * The main purpose of the container class is to loop over all module
34 * preprocessors and to make the AliPreprocessor interface methods
35 * publicly available.
36 */
310c7637 37class AliHLTPreprocessor : public AliPreprocessor , public AliHLTShuttleInterface
12ec5482 38{
39 public:
40 /**
41 * Constructor for AliHLTPreprocessor
42 *
43 * @param shuttle pointer to the hosting shuttle
44 */
45 AliHLTPreprocessor(AliShuttleInterface* shuttle);
46 /** Destructor */
47 virtual ~AliHLTPreprocessor();
48
49 /**
50 * Initialize the Preprocessor.
51 *
52 * @param run run number
53 * @param startTime start time of data
54 * @param endTime end time of data
55 */
56 virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
57
58 /**
59 * Function to process data. Inside the preparation and storing to OCDB
60 * should be handled.
61 *
62 * @param dcsAliasMap the map containing aliases and corresponding DCS
63 * values and timestamps
64 *
65 * @return 0 on success; a value greater than 0 refers to an error
66 */
67 virtual UInt_t Process(TMap* dcsAliasMap);
68
69 /**
70 * Indicates if DCS data can be processed.
71 *
72 * @return true if DCS data can be processed, else false.
73 */
74 virtual Bool_t ProcessDCS();
75
76 /** Define for name of the HLT Preproc */
77 static const char* fgkHLTPreproc; // see above
78
79 /** Get the run no which has been previously initialized */
310c7637 80 Int_t PreprocessorGetRun() {return fRun;}
12ec5482 81
82 /** Get the start time no which has been previously initialized */
310c7637 83 UInt_t PreprocessorGetStartTime() {return fStartTime;}
12ec5482 84
85 /** Get the end time no which has been previously initialized */
310c7637 86 UInt_t PreprocessorGetEndTime() {return fEndTime;}
12ec5482 87
12ec5482 88 // AliPreprocessor methods made publicly available
8a6d545f 89 // the subsequent functions map the AliPreprocessor interface functions in order
90 // to be used by the module proprocessors.
310c7637 91 Bool_t PreprocessorStore(const char* pathLevel2, const char* pathLevel3, TObject* object,
12ec5482 92 AliCDBMetaData* metaData, Int_t validityStart = 0, Bool_t validityInfinite = kFALSE) {
93 return AliPreprocessor::Store(pathLevel2, pathLevel3, object, metaData, validityStart, validityInfinite);
94 }
95
310c7637 96 Bool_t PreprocessorStoreReferenceData(const char* pathLevel2, const char* pathLevel3, TObject* object,
12ec5482 97 AliCDBMetaData* metaData) {
98 return AliPreprocessor::StoreReferenceData(pathLevel2, pathLevel3, object, metaData);
99 }
100
310c7637 101 Bool_t PreprocessorStoreReferenceFile(const char* localFile, const char* gridFileName) {
12ec5482 102 return AliPreprocessor::StoreReferenceFile(localFile, gridFileName);
103 }
104
310c7637 105 Bool_t PreprocessorStoreRunMetadataFile(const char* localFile, const char* gridFileName) {
12ec5482 106 return AliPreprocessor::StoreRunMetadataFile(localFile, gridFileName);
107 }
108
310c7637 109 const char* PreprocessorGetFile(Int_t system, const char* id, const char* source) {
12ec5482 110 return AliPreprocessor::GetFile(system, id, source);
111 }
112
310c7637 113 TList* PreprocessorGetFileSources(Int_t system, const char* id = 0) {
12ec5482 114 return AliPreprocessor::GetFileSources(system, id);
115 }
116
310c7637 117 TList* PreprocessorGetFileIDs(Int_t system, const char* source) {
12ec5482 118 return AliPreprocessor::GetFileIDs(system, source);
119 }
120
310c7637 121 const char* PreprocessorGetRunParameter(const char* param) {
12ec5482 122 return AliPreprocessor::GetRunParameter(param);
123 }
124
310c7637 125 AliCDBEntry* PreprocessorGetFromOCDB(const char* pathLevel2, const char* pathLevel3) {
12ec5482 126 return AliPreprocessor::GetFromOCDB(pathLevel2, pathLevel3);
127 }
128
310c7637 129 const char* PreprocessorGetRunType() {
12ec5482 130 return AliPreprocessor::GetRunType();
131 }
132
310c7637 133 void PreprocessorLog(const char* message) {
12ec5482 134 AliPreprocessor::Log(message);
135 }
136
137 protected:
138
139 private:
140 /** copy constructor prohibited */
141 AliHLTPreprocessor(const AliHLTPreprocessor& preproc);
142 /** assignment operator prohibited */
143 AliHLTPreprocessor& operator=(const AliHLTPreprocessor& rhs);
144
145 /** list of HLT module processors */
146 TList fProcessors; //!transient
147
d83b59c6 148 /** determine which which detectors were active */
149 Int_t fActiveDetectors; // bit array of active detectors
150
12ec5482 151 /** array of default libraries */
152 static const char* fgkHLTDefaultShuttleLibs[]; //!transient
153
d83b59c6 154 ClassDef(AliHLTPreprocessor, 1);
12ec5482 155};
156#endif
157
158