4 #ifndef ALI_HLT_PREDICTION_PROCESSOR_HLT_H
5 #define ALI_HLT_PREDICTION_PROCESSOR_HLT_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 AliHLTPredictionProcessorHLT.h
11 @author Gaute Ovrebekk
16 #include "AliHLTPredictionProcessorInterface.h"
19 #include <TObjString.h>
23 * Predition Processor for prepering b-field values for general HLT components.
25 * @author Sebastian Bablok, Gaute Ovrebekk
29 class AliHLTPredictionProcessorHLT : public AliHLTPredictionProcessorInterface {
33 * Constructor for AliHLTPredictionProcessorHLT
35 * @param detector string defining the detector to which the
36 * PredictionProcessor belongs to
37 * @param pendolino pointer to the hosting pendolino (derived from
38 * AliShuttleInterface)
40 AliHLTPredictionProcessorHLT(const char* detector,
41 AliHLTPendolino* pendolino);
44 * Destructor for AliHLTPredictionProcessorHLT
46 virtual ~AliHLTPredictionProcessorHLT();
49 * Virtual function to force the Prediction Processor to implement
50 * a function to flag that prediction making is required.
51 * This function is called by the Pendolino before the fetched DCS data
52 * is handed in for (prediction) processing.
54 * @param doPrediction if true, prediction making shall be switched on,
55 * if false, switched off.
57 * @return 0 on success; a value greater than 0 refers to an error
59 virtual UInt_t makePrediction(Bool_t doPrediction = true);
62 * Virtual function, implemented in the detector specific
63 * PredictionProcessors to initialize them.
65 * @param run run number
66 * @param startTime start time of data
67 * @param endTime end time of data
69 virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
72 * Function called by the Pendolino for each participating subdetector
73 * producing the required condition settings. This includes the
74 * encoding of a prediction to the values due to the fact, that only
75 * data up to now can be fetched from DCS (the latest data can also be
76 * up to 2 min old until it is received on HLT side). To write the data
77 * to the HCDB, the detector specific implementation of this class has
78 * to call the appropriated storing function provided by the interface.
80 * @param dcsAliasMap the map containing aliases and corresponding DCS
81 * values and timestamps
83 * @return 0 on success; a value greater than 0 refers to an error
85 virtual UInt_t Process(TMap* dcsAliasMap);
88 * Indicates if DCS data shall be processed.
89 * NOTE: should always return true, since it is used as prediction
90 * processor, which will only process DCS data
92 * @return true if DCS data can be processed, else false. Note: if false
93 * the Pendolino would stop, so make sure that it is true.
95 virtual Bool_t ProcessDCS();
98 * Function to let the PredictionProcessor produce dummy input data,
99 * that can be used in Pendolino tests, where no DCS Archieve DB is
100 * contacted. This function is called by the Pendolino, the result is
101 * given back to the PredictionProcessor via the Process(...) call.
102 * Since the DCSMaps requested from DCS are detector specific, the
103 * PredictionProcessor should know, how the maps look like, that it
105 * NOTE: The clean - up (delete) of the TMap will be performed by the
106 * Pendolino after the usage. The PredictionProcessor has never to
107 * call delete on the returned TMap pointer.
109 * @param aliasName optional parameter, that can be given in order to
110 * create a DCSMap for dedicated aliases. For a general test
111 * this paramter should be empty. If more than one alias name
112 * shall be specified, they are separated by blanks " ".
114 * @return DCSMap containing dummy data for testing the Pendolino.
116 virtual TMap* produceTestData(TString aliasName = "");
123 * Disabled Copy constructor
124 * (parent class is disabled so derived class does the same)
126 AliHLTPredictionProcessorHLT(
127 const AliHLTPredictionProcessorHLT& predictPro);
130 * Disabled Assignment operator
131 * (parent class is disabled so derived class does the same)
133 AliHLTPredictionProcessorHLT& operator=(
134 const AliHLTPredictionProcessorHLT& rhs);
137 * Stores if prediction shall be made
139 Bool_t fPredict; // flag for prediction making
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
156 ClassDef(AliHLTPredictionProcessorHLT, 2);
161 inline Bool_t AliHLTPredictionProcessorHLT::ProcessDCS() {
162 // indicates if DCS values are processed; always true