]>
Commit | Line | Data |
---|---|---|
0b950655 | 1 | /************************************************************************** |
2 | * This file is property of and copyright by the ALICE HLT Project * | |
3 | * All rights reserved. * | |
4 | * * | |
5 | * Primary Authors: * | |
6 | * Artur Szostak <artursz@iafrica.com> * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
17 | /* $Id$ */ | |
18 | ||
19 | /// | |
20 | /// @file AliHLTPredictionProcessorMCH.cxx | |
21 | /// @author Artur Szostak <artursz@iafrica.com> | |
22 | /// @date | |
23 | /// @brief Implementation of the AliHLTPredictionProcessorMCH class. | |
24 | /// | |
25 | ||
26 | #include "AliHLTPredictionProcessorMCH.h" | |
27 | #include "AliCDBMetaData.h" | |
28 | #include "AliCDBEntry.h" | |
29 | #include <cstdlib> | |
30 | ||
31 | ClassImp(AliHLTPredictionProcessorMCH); | |
32 | ||
33 | ||
34 | AliHLTPredictionProcessorMCH::AliHLTPredictionProcessorMCH( | |
35 | const char* detector, AliHLTPendolino* pendolino | |
36 | ) : | |
37 | AliHLTPredictionProcessorInterface(detector, pendolino), | |
38 | fPredict(kTRUE) | |
39 | { | |
40 | /// The class constructor for the preprocessor. | |
41 | /// @param detector The detector name, which must be "MCH". | |
42 | /// @param pendolino A valid pointer to the pendolino instance. | |
43 | ||
44 | if (strcmp(detector, "MCH") != 0) | |
45 | { | |
46 | Log(Form("Warning: Setting the detector name to an incorrect value = '%s'." | |
47 | " It must be set to 'MCH'.", detector) | |
48 | ); | |
49 | } | |
50 | } | |
51 | ||
52 | ||
53 | AliHLTPredictionProcessorMCH::~AliHLTPredictionProcessorMCH() | |
54 | { | |
55 | /// Default destructor. | |
56 | } | |
57 | ||
58 | ||
59 | UInt_t AliHLTPredictionProcessorMCH::makePrediction(Bool_t doPrediction) | |
60 | { | |
61 | /// This function is called by the Pendolino before the fetched DCS data | |
62 | /// is handed in for (prediction) processing. | |
63 | /// | |
64 | /// @param doPrediction If true then preprocessed data will be extrapolated | |
65 | /// to the current time. Otherwise no extrapolation will be | |
66 | /// performed if false. The default is to perform extrapolations. | |
67 | /// | |
68 | /// @return Currently always returns 0 for success. | |
69 | ||
70 | fPredict = doPrediction; | |
71 | return 0; | |
72 | } | |
73 | ||
74 | ||
75 | void AliHLTPredictionProcessorMCH::Initialize( | |
76 | Int_t run, UInt_t startTime, UInt_t endTime | |
77 | ) | |
78 | { | |
79 | /// Performs initialisation of the preprocessor. | |
80 | /// At the moment just basic sanity checks are performed. | |
81 | /// | |
82 | /// @param run The current run number. | |
83 | /// @param startTime The start time (earliest timestamp) of the data. | |
84 | /// @param endTime The end time (latest timestamp) of the data. | |
85 | ||
86 | if (startTime > endTime) | |
87 | Log("Error: start time is greater than end time."); | |
88 | ||
89 | AliPreprocessor::Initialize(run, startTime, endTime); | |
90 | ||
91 | if (fPredict) | |
92 | Log("Prediction is switched ON."); | |
93 | else | |
94 | Log("Prediction is switched OFF."); | |
95 | } | |
96 | ||
97 | ||
98 | UInt_t AliHLTPredictionProcessorMCH::Process(TMap* dcsAliasMap) | |
99 | { | |
100 | /// Process the DCS values. | |
101 | /// At the moment nothing is done here. | |
102 | /// | |
103 | /// @param dcsAliasMap The map containing aliases and corresponding DCS | |
104 | /// values and timestamps | |
105 | /// | |
106 | /// @return At the moment 0 is always returned for success. | |
107 | ||
108 | Log("Processing MCH"); | |
109 | return 0; | |
110 | } |