]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/pendolino/MUON/AliHLTPredictionProcessorMTR.h
Including "-y" option in find for OCDB queries. Including new tag values
[u/mrichter/AliRoot.git] / HLT / pendolino / MUON / AliHLTPredictionProcessorMTR.h
1 #ifndef ALIHLTPREDICTIONPROCESSORMTR_H
2 #define ALIHLTPREDICTIONPROCESSORMTR_H
3 /* This file is property of and copyright by the ALICE HLT Project        *
4  * ALICE Experiment at CERN, All rights reserved.                         *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 ///
10 /// @file   AliHLTPredictionProcessorMTR.h
11 /// @author Artur Szostak <artursz@iafrica.com>
12 /// @date   2007-11-24
13 /// @brief  Declaration of the muon trigger prediction processor.
14 ///
15
16 #include "AliHLTPredictionProcessorInterface.h"
17
18 /**
19  * This is the prediction processor for the muon trigger detector.
20  * It is required as part of the Pendolino interface so that data fetched from
21  * DCS can be transformed and extrapolated into a format suitable for the HCDB.
22  *
23  * At the moment this class does not really do anything, but will fill the
24  * HCDB with data in the future.
25  *
26  * Refer to:
27  * http://wiki.kip.uni-heidelberg.de/ti/HLT/index.php/Pendolino-PredictionProcessor-Interface
28  * for more details about the Pendolino and preprocessor interfaces.
29  */
30 class AliHLTPredictionProcessorMTR : public AliHLTPredictionProcessorInterface
31 {
32 public:
33
34         /**
35          * The class constructor for the preprocessor.
36          * @param detector  The detector name, which must be "MTR".
37          * @param pendolino A valid pointer to the pendolino instance.
38          */
39         AliHLTPredictionProcessorMTR(const char* detector, AliHLTPendolino* pendolino);
40         
41         virtual ~AliHLTPredictionProcessorMTR();
42         
43         // The following methods are inherited from AliHLTPredictionProcessorInterface.
44         
45         /**
46          * This function is called by the Pendolino before the fetched DCS data
47          * is handed in for (prediction) processing.
48          *
49          * @param doPrediction If true then preprocessed data will be extrapolated
50          *           to the current time. Otherwise no extrapolation will be
51          *           performed if false. The default is to perform extrapolations.
52          *
53          * @return Currently always returns 0 for success.
54          */
55         virtual UInt_t makePrediction(Bool_t doPrediction = true);
56
57         /**
58          * Performs initialisation of the preprocessor.
59          * At the moment just basic sanity checks are performed.
60          *
61          * @param run The current run number.
62          * @param startTime The start time (earliest timestamp) of the data.
63          * @param endTime The end time (latest timestamp) of the data.
64          */
65         virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
66
67         /**
68          * Process the DCS values.
69          * At the moment nothing is done here.
70          *
71          * @param dcsAliasMap The map containing aliases and corresponding DCS
72          *                    values and timestamps
73          *
74          * @return At the moment 0 is always returned for success.
75          */
76         virtual UInt_t Process(TMap* dcsAliasMap);
77
78         /**
79          * Indicates that the DCS data shall be processed.
80          * NOTE: should always return true, since it is used as prediction
81          * processor, which will only process DCS data
82          *
83          * @return Always returns the value kTRUE.
84          */
85         virtual Bool_t ProcessDCS() { return kTRUE; };
86
87         /**
88          * Function to let the PredictionProcessor produce dummy input data,
89          * that can be used in Pendolino tests, where no DCS Archieve DB is
90          * contacted. This function is called by the Pendolino, the result is
91          * given back to the PredictionProcessor via the Process(...) call.
92          * Since the DCSMaps requested from DCS are detector specific, the
93          * PredictionProcessor should know, how the maps look like, that it
94          * expects.
95          * NOTE: The clean - up (delete) of the TMap will be performed by the
96          * Pendolino after the usage. The PredictionProcessor has never to
97          * call delete on the returned TMap pointer.
98          *
99          * @param aliasName optional parameter, that can be given in order to
100          *          create a DCSMap for dedicated aliases. For a general test
101          *          this paramter should be empty. If more than one alias name
102          *          shall be specified, they are separated by blanks " ".
103          *
104          * @return DCSMap containing dummy data for testing the Pendolino.
105          */
106         virtual TMap* produceTestData(TString aliasName = "");
107         
108 private:
109
110         // Do not allow copying of this class.
111         AliHLTPredictionProcessorMTR(const AliHLTPredictionProcessorMTR& /*obj*/);
112         AliHLTPredictionProcessorMTR& operator = (const AliHLTPredictionProcessorMTR& /*obj*/);
113
114         Bool_t fPredict;  //! Flag indicating if the processed values should be extrapolated to current time.
115         
116         ClassDef(AliHLTPredictionProcessorMTR, 0);  // The prediction processor for the muon trigger detector.
117 };
118
119 #endif // ALIHLTPREDICTIONPROCESSORMTR_H