fix for bug #66294
[u/mrichter/AliRoot.git] / SHUTTLE / test / TestZDCPreprocessor.cxx
CommitLineData
4b4eb769 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16//
eba76848 17// Prototype of ZDC Preprocessor
4b4eb769 18//
19
eba76848 20#include "TestZDCPreprocessor.h"
4b4eb769 21
22#include "AliCDBMetaData.h"
23#include "AliDCSValue.h"
24#include "AliLog.h"
eba76848 25#include "AliShuttleInterface.h"
4b4eb769 26
27#include <TTimeStamp.h>
eba76848 28#include <TObjString.h>
29#include <TSystem.h>
886d60e6 30#include <TList.h>
4b4eb769 31
eba76848 32ClassImp(TestZDCPreprocessor)
4b4eb769 33
34//________________________________________________________________________________________
eba76848 35TestZDCPreprocessor::TestZDCPreprocessor():
36 AliPreprocessor("ZDC",0)
4b4eb769 37{
38// default constructor - Don't use this!
39
40}
41
42//________________________________________________________________________________________
be48e3ea 43TestZDCPreprocessor::TestZDCPreprocessor(AliShuttleInterface* shuttle):
44 AliPreprocessor("ZDC",shuttle)
4b4eb769 45{
46// constructor - shuttle must be instantiated!
47
48}
49
50//________________________________________________________________________________________
eba76848 51void TestZDCPreprocessor::Initialize(Int_t run, UInt_t startTime,
52 UInt_t endTime)
4b4eb769 53{
54// Initialize preprocessor
55
eba76848 56 AliInfo(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
4b4eb769 57 TTimeStamp(startTime).AsString(),
58 TTimeStamp(endTime).AsString()));
eba76848 59
60 fRun = run;
61 fStartTime = startTime;
62 fEndTime = endTime;
63 AliInfo("This preprocessor is to test the GetRunParameter function.");
4b4eb769 64}
65
66//________________________________________________________________________________________
eba76848 67UInt_t TestZDCPreprocessor::Process(TMap* /*valueMap*/)
4b4eb769 68{
69// process data retrieved by the Shuttle
70
eba76848 71 Int_t result=0;
4b4eb769 72
eba76848 73 const char* dataRate = GetRunParameter("averageDataRate");
74 if (dataRate) {
75 Log(Form("Average data rate for run %d: %s",fRun, dataRate));
76 } else {
77 Log(Form("Average data rate not put in logbook!"));
4b4eb769 78 }
4b4eb769 79
eba76848 80 return dataRate !=0;
4b4eb769 81}
82