]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/test/TestITSPreprocessorSPD.cxx
RICH becomes HMPID
[u/mrichter/AliRoot.git] / SHUTTLE / test / TestITSPreprocessorSPD.cxx
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
20 #include "TestITSPreprocessorSPD.h"
21
22 #include "AliCDBMetaData.h"
23 #include "AliDCSValue.h"
24 #include "AliLog.h"
25
26 #include <TTimeStamp.h>
27
28 ClassImp(TestITSPreprocessorSPD)
29
30 //________________________________________________________________________________________
31 TestITSPreprocessorSPD::TestITSPreprocessorSPD():
32         AliPreprocessor("SPD",0)
33 {
34 // default constructor - Don't use this!
35
36 }
37
38 //________________________________________________________________________________________
39 TestITSPreprocessorSPD::TestITSPreprocessorSPD(AliShuttleInterface* shuttle):
40         AliPreprocessor("SPD", shuttle)
41 {
42 // constructor - shuttle must be instantiated!
43
44 }
45
46 //________________________________________________________________________________________
47 void TestITSPreprocessorSPD::Initialize(Int_t run, UInt_t startTime,
48         UInt_t endTime)
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 //________________________________________________________________________________________
58 UInt_t TestITSPreprocessorSPD::Process(TMap* valueMap)
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
72         return Store("Calib", "ITSDataSPD", valueMap, &metaData, 0, kTRUE);
73 }
74