1. Re-organization of function calls in TestPreprocessor to make it more meaningful.
[u/mrichter/AliRoot.git] / SHUTTLE / test / TestITSPreprocessorSPD.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//
17// Example of a Shuttle Preprocessor
18//
19
eba76848 20#include "TestITSPreprocessorSPD.h"
4b4eb769 21
22#include "AliCDBMetaData.h"
23#include "AliDCSValue.h"
24#include "AliLog.h"
25
26#include <TTimeStamp.h>
27
eba76848 28ClassImp(TestITSPreprocessorSPD)
4b4eb769 29
30//________________________________________________________________________________________
eba76848 31TestITSPreprocessorSPD::TestITSPreprocessorSPD():
32 AliPreprocessor("SPD",0)
4b4eb769 33{
34// default constructor - Don't use this!
35
36}
37
38//________________________________________________________________________________________
be48e3ea 39TestITSPreprocessorSPD::TestITSPreprocessorSPD(AliShuttleInterface* shuttle):
40 AliPreprocessor("SPD", shuttle)
4b4eb769 41{
42// constructor - shuttle must be instantiated!
43
44}
45
46//________________________________________________________________________________________
eba76848 47void TestITSPreprocessorSPD::Initialize(Int_t run, UInt_t startTime,
48 UInt_t endTime)
4b4eb769 49{
50// Initialize preprocessor
51
52 AliInfo(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
53 TTimeStamp(startTime).AsString(),
54 TTimeStamp(endTime).AsString()));
55}
56
57//________________________________________________________________________________________
eba76848 58UInt_t TestITSPreprocessorSPD::Process(TMap* valueMap)
4b4eb769 59{
60// process data retrieved by the Shuttle
61
62 AliInfo(Form("You're in AliITSPreprocessor::Process!"));
63
64 TIter iter(valueMap);
65 TPair* aPair;
66 while ((aPair = (TPair*) iter.Next())) {
67 aPair->Print();
68 }
69 AliCDBMetaData metaData;
70 metaData.SetComment("This is a test!");
71
be48e3ea 72 return Store("Calib", "ITSDataSPD", valueMap, &metaData, 0, kTRUE);
4b4eb769 73}
74