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 *
10 /** @file AliHLTPredictionProcessorDummy.h
11 @author Sebastian Bablok
16 #include "AliHLTPredictionProcessorInterface.h"
21 * Dummy implementation of the AliHLTPredictionProcessorInterface.
22 * This class is just for testing purpose of the PredictionProcessor interface.
24 * @author Sebastian Bablok
28 class AliHLTPredictionProcessorDummy : public AliHLTPredictionProcessorInterface {
32 * Constructor for AliHLTPredictionProcessorDummy
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)
39 AliHLTPredictionProcessorDummy(const char* detector,
40 AliHLTPendolino* pendolino);
43 * Destructor for AliHLTPredictionProcessorDummy
45 virtual ~AliHLTPredictionProcessorDummy();
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.
53 * @param doPrediction if true, prediction making shall be switched on,
54 * if false, switched off.
56 * @return 0 on success; a value greater than 0 refers to an error
58 virtual UInt_t makePrediction(Bool_t doPrediction = true);
61 * Pure Virtual function, implemented in the detector specific
62 * PredictionProcessors to initialize them.
64 * @param run run number
65 * @param startTime start time of data
66 * @param endTime end time of data
68 virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
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.
79 * @param dcsAliasMap the map containing aliases and corresponding DCS
80 * values and timestamps
82 * @return 0 on success; a value greater than 0 refers to an error
84 virtual UInt_t Process(TMap* dcsAliasMap);
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
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.
94 virtual Bool_t ProcessDCS();
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
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.
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 " ".
113 * @return DCSMap containing dummy data for testing the Pendolino.
115 virtual TMap* produceTestData(TString aliasName = "");
122 * Disabled Copy constructor
123 * (parent class is disabled so derived class does the same)
125 AliHLTPredictionProcessorDummy(
126 const AliHLTPredictionProcessorDummy& predictPro);
129 * Disabled Assignment operator
130 * (parent class is disabled so derived class does the same)
132 AliHLTPredictionProcessorDummy& operator=(
133 const AliHLTPredictionProcessorDummy& rhs);
137 * Stores if prediction shall be made
139 Bool_t fPredict; // Stores if prediction shall be made
142 * Stores the run number
144 Int_t fRun; // Stores the run number
147 * Stores the start time of the to process DCS data
149 UInt_t fStartTime; // Stores the start time of the to process DCS data
152 * Stores the end time of the to process DCS data
154 UInt_t fEndTime; // Stores the end time of the to process DCS data
157 ClassDef(AliHLTPredictionProcessorDummy, 1);
162 inline Bool_t AliHLTPredictionProcessorDummy::ProcessDCS() {
163 // getter for flag indicating if DCS values are processed; always true