]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/pendolino/PredictionProcessor/HLT/AliHLTPredictionProcessorHLT.cxx
adding prediction processor for the GRP, moving some functions to the PredictionProce...
[u/mrichter/AliRoot.git] / HLT / pendolino / PredictionProcessor / HLT / AliHLTPredictionProcessorHLT.cxx
1 // $Id$
2
3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //*                                                                        *
7 //* Primary Authors: Gaute Ovrebekk                                        *
8 //*                  for The ALICE HLT Project.                            *
9 //*                                                                        *
10 //* Permission to use, copy, modify and distribute this software and its   *
11 //* documentation strictly for non-commercial purposes is hereby granted   *
12 //* without fee, provided that the above copyright notice appears in all   *
13 //* copies and that both the copyright notice and this permission notice   *
14 //* appear in the supporting documentation. The authors make no claims     *
15 //* about the suitability of this software for any purpose. It is          *
16 //* provided "as is" without express or implied warranty.                  *
17 //**************************************************************************
18
19 /** @file   AliHLTPredictionProcessorHLT.cxx
20     @author Gaute Ovrebekk
21     @date   
22     @brief  
23 */
24
25 #include "AliHLTPredictionProcessorHLT.h"
26
27 #include <AliCDBMetaData.h>
28 #include <AliCDBEntry.h>
29
30 // new
31 #include <TObjArray.h>
32 #include <AliDCSValue.h>
33
34
35 ClassImp(AliHLTPredictionProcessorHLT)
36
37 AliHLTPredictionProcessorHLT::AliHLTPredictionProcessorHLT(
38                         const char* detector, AliHLTPendolino* pendolino) :
39                                 AliHLTPredictionProcessorInterface(detector, pendolino),
40                                 fPredict(true), fRun(0), fStartTime(0), fEndTime(0) {
41         // C-tor for AliHLTPredictionProcessorHLT
42 //      fPredict = false;
43 //      fRun = 0;
44 //      fStartTime = 0;
45 //      fEndTime = 0;
46 }
47
48
49 AliHLTPredictionProcessorHLT::~AliHLTPredictionProcessorHLT() {
50         // D-tor for AliHLTPredictionProcessorHLT
51 }
52
53
54 UInt_t AliHLTPredictionProcessorHLT::makePrediction(Bool_t doPrediction) {
55         // switch for prediction making
56         Log("Prediction switched on");
57         fPredict = doPrediction;
58         return 0;
59 }
60
61
62 void AliHLTPredictionProcessorHLT::Initialize(Int_t run, UInt_t startTime, 
63                         UInt_t endTime) {
64         // initializes AliHLTPredictionProcessorHLT
65         fRun = run;
66         fStartTime = startTime;
67         fEndTime = endTime;
68
69         TString msg("Initialized HLT PredictProc. Run: ");
70         msg += fRun;
71         msg += ", start time: ";
72         msg += fStartTime;
73         msg += ", end time: ";
74         msg += fEndTime;
75         msg += ".";     
76         Log(msg.Data());
77
78         if (fPredict) {
79                 Log("HLT PredictProc has prediction switched ON.");
80         } else {
81                 Log("Prediction is switched OFF.");
82         }
83 }
84
85
86 UInt_t AliHLTPredictionProcessorHLT::Process(TMap* dcsAliasMap) {
87         // processes the DCS value map
88   
89   if (!dcsAliasMap) return 9;
90   if (dcsAliasMap->GetEntries() == 0 ) return 9;
91
92   UInt_t retVal = 0;
93   // there is currently no object to create
94   
95   return retVal;
96 }
97
98 TMap* AliHLTPredictionProcessorHLT::produceTestData(TString /*aliasName*/) {
99         // produces test data for AliHLTPredictionProcessorHLT
100     TMap* resultMap = 0;
101
102     // here has to come real dummy data :-)
103     resultMap = new TMap();
104
105     return resultMap;
106 }
107
108