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