]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/pendolino/AliHLTPredictionProcessorInterface.h
Include cstdlib to declare getenv (gcc 4.3.0)
[u/mrichter/AliRoot.git] / HLT / pendolino / AliHLTPredictionProcessorInterface.h
CommitLineData
e58fb035 1//-*- Mode: C++ -*-
2// $Id$
3
4#ifndef ALI_HLT_PREDICTION_PROCESSOR_INTERFACE_H
5#define ALI_HLT_PREDICTION_PROCESSOR_INTERFACE_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/** @file AliHLTPredictionProcessorInterface.h
11 @author Sebastian Bablok
12 @date
13 @brief
14*/
15
16#include <AliPreprocessor.h>
17
18class AliHLTPendolino;
19
20
21/**
22 * The Class defines the interface HLT Preprocessor.
23 * It inherits from the AliPreprocessorInterface and adds the features for
24 * the prediction procession required by the HLT Pendolino.
25 *
26 * @author Sebastian Bablok
27 *
28 * @date 2007-10-22
29 */
30class AliHLTPredictionProcessorInterface : public AliPreprocessor {
31 public:
32
33 /**
34 * Constructor for AliHLTPredictionProcessorInterface
35 *
36 * @param detector string defining the detector to which the
37 * PredictionProcessor belongs to
38 * @param pendolino pointer to the hosting pendolino (derived from
39 * AliShuttleInterface)
40 */
41 AliHLTPredictionProcessorInterface(const char* detector,
42 AliHLTPendolino* pendolino);
43
44 /**
45 * Destructor for AliHLTPredictionProcessorInterface
46 */
47 virtual ~AliHLTPredictionProcessorInterface();
48
49 /**
50 * Pure virtual function to force the Prediction Processor to implement
51 * a function to flag that prediction making is required.
52 * This function is called by the Pendolino before the fetched DCS data
53 * is handed in for (prediction) processing.
54 *
55 * @param doPrediction if true, prediction making shall be switched on,
56 * if false, switched off.
57 *
58 * @return 0 on success; a value greater than 0 refers to an error
59 */
60 virtual UInt_t makePrediction(Bool_t doPrediction = true) = 0;
61
62 /**
63 * Function to let the PredictionProcessor produce dummy input data,
64 * that can be used in Pendolino tests, where no DCS Archieve DB is
65 * contacted. This function is called by the Pendolino, the result is
66 * given back to the PredictionProcessor via the Process(...) call.
67 * Since the DCSMaps requested from DCS are detector specific, the
68 * PredictionProcessor should know, how the maps look like, that it
69 * expects. This function is pure virtual, because it has to be
70 * implemented by the real PredictionProcessors.
71 * NOTE: the clean - up (delete) of the TMap will be performed by the
72 * Pendolino after the usage. The PredictionProcessor has never to
73 * call delete on the returned TMap pointer.
74 *
75 * @param aliasName optional parameter, that can be given in order to
76 * create a DCSMap for dedicated aliases. For a general test
77 * this parameter should be empty. If more than one alias name
78 * shall be specified, they are separated by blanks " ".
79 *
80 * @return DCSMap containing dummy data for testing the Pendolino.
81 */
82 virtual TMap* produceTestData(TString aliasName = "") = 0;
83
84 /**
85 * Virtual function, implemented in the detector specific
86 * PredictionProcessors to initialize them.
87 *
88 * @param run run number
89 * @param startTime start time of data
90 * @param endTime end time of data
91 */
92// virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
93
94 /**
95 * Function called by the Pendolino for each participating subdetector
96 * producing the required condition settings. This includes the
97 * encoding of a prediction to the values due to the fact, that only
98 * data up to now can be fetched from DCS (the latest data can also be
99 * up to 2 min old until it is received on HLT side). To write the data
100 * to the HCDB, the detector specific implementation of this class has
101 * to call the appropriated storing function provided by the interface.
102 *
103 * @param dcsAliasMap the map containing aliases and corresponding DCS
104 * values and timestamps
105 *
106 * @return 0 on success; a value greater than 0 refers to an error
107 */
108// virtual UInt_t Process(TMap* dcsAliasMap) = 0;
109
110 /**
111 * Indicates if DCS data shall be processed.
112 * NOTE: should always return true, since it is used as prediction
113 * processor, which will only process DCS data
114 *
115 * @return true if DCS data can be processed, else false. Note: if false
116 * the Pendolino would stop, so make sure that it is true.
117 */
118// virtual Bool_t ProcessDCS();
119
120 protected:
121 /**
122 * Helper function to receive the current run number
123 *
124 * @return the current run number
125 */
126 virtual Int_t GetRunNumber();
127
128 /**
129 * Function to let the Penolino add an request for an AliCDBEntry to the
130 * according Taxi list. This corresponding object will be request then
131 * with the next run of the Taxi. The entry is added to the Pendolino
132 * specific list for the Taxi configuration. Note: the name has to
133 * include the detector name as well; e.g.: "TPC/Calib/LocalVdrift" .
134 *
135 * @param entryPath the full path name of the entry, that shall be
136 * included
137 *
138 * @return true, when successful included or entry already existing in
139 * list; else false.
140 */
141 virtual Bool_t includeAliCDBEntryInList(const TString& entryPath);
142
143
144 private:
145 /**
146 * Disabled Standart Constructor
147 */
148 AliHLTPredictionProcessorInterface();
149
150 /**
151 * Disabled Copy constructor
152 * (parent class is disabled so derived class does the same)
153 */
154 AliHLTPredictionProcessorInterface(
155 const AliHLTPredictionProcessorInterface& predictPro);
156
157 /**
158 * Disabled Assignment operator
159 * (parent class is disabled so derived class does the same)
160 */
161 AliHLTPredictionProcessorInterface& operator=(
162 const AliHLTPredictionProcessorInterface& rhs);
163
164 /**
165 * Stores pointer to Pendolino
166 */
167 AliHLTPendolino* mPend; // Stores pointer to Pendolino
168
169
170 ClassDef(AliHLTPredictionProcessorInterface, 5);
171
172};
173
174
175
176#endif
177
178