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 *
10 /** @file AliHLTPredictionProcessorInterface.h
11 @author Sebastian Bablok
16 #include <AliPreprocessor.h>
18 class AliHLTPendolino;
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.
26 * @author Sebastian Bablok
30 class AliHLTPredictionProcessorInterface : public AliPreprocessor {
34 * Constructor for AliHLTPredictionProcessorInterface
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)
41 AliHLTPredictionProcessorInterface(const char* detector,
42 AliHLTPendolino* pendolino);
45 * Destructor for AliHLTPredictionProcessorInterface
47 virtual ~AliHLTPredictionProcessorInterface();
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.
55 * @param doPrediction if true, prediction making shall be switched on,
56 * if false, switched off.
58 * @return 0 on success; a value greater than 0 refers to an error
60 virtual UInt_t makePrediction(Bool_t doPrediction = true) = 0;
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.
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 " ".
80 * @return DCSMap containing dummy data for testing the Pendolino.
82 virtual TMap* produceTestData(TString aliasName = "") = 0;
85 * Virtual function, implemented in the detector specific
86 * PredictionProcessors to initialize them.
88 * @param run run number
89 * @param startTime start time of data
90 * @param endTime end time of data
92 // virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
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.
103 * @param dcsAliasMap the map containing aliases and corresponding DCS
104 * values and timestamps
106 * @return 0 on success; a value greater than 0 refers to an error
108 // virtual UInt_t Process(TMap* dcsAliasMap) = 0;
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
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.
118 // virtual Bool_t ProcessDCS();
122 * Helper function to receive the current run number
124 * @return the current run number
126 virtual Int_t GetRunNumber();
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" .
135 * @param entryPath the full path name of the entry, that shall be
138 * @return true, when successful included or entry already existing in
141 virtual Bool_t includeAliCDBEntryInList(const TString& entryPath);
146 * Disabled Standart Constructor
148 AliHLTPredictionProcessorInterface();
151 * Disabled Copy constructor
152 * (parent class is disabled so derived class does the same)
154 AliHLTPredictionProcessorInterface(
155 const AliHLTPredictionProcessorInterface& predictPro);
158 * Disabled Assignment operator
159 * (parent class is disabled so derived class does the same)
161 AliHLTPredictionProcessorInterface& operator=(
162 const AliHLTPredictionProcessorInterface& rhs);
165 * Stores pointer to Pendolino
167 AliHLTPendolino* fpPend; // Stores pointer to Pendolino
170 ClassDef(AliHLTPredictionProcessorInterface, 6);