This commit was generated by cvs2svn to compensate for changes in r12269,
[u/mrichter/AliRoot.git] / SHUTTLE / test / TestITSPreProcessor.cxx
1 #include "TestITSPreProcessor.h"
2
3 #include "AliCDBMetaData.h"
4 #include "AliDCSValue.h"
5 #include "AliLog.h"
6
7 #include <TList.h>
8 #include <TTimeStamp.h>
9
10 ClassImp(TestITSPreProcessor)
11
12 TestITSPreProcessor::TestITSPreProcessor():
13         AliCDBPreProcessor("ITS")
14 {
15
16 }
17
18 void TestITSPreProcessor::Initialize(Int_t run, UInt_t startTime, 
19         UInt_t endTime) 
20 {
21
22         AliInfo(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run, 
23                 TTimeStamp(startTime).AsString(),
24                 TTimeStamp(endTime).AsString()));
25 }
26
27 void TestITSPreProcessor::Finalize() {
28         AliInfo("Finalizing...");
29 }
30
31 void TestITSPreProcessor::Process(const char* alias, TList& valueSet, 
32         Bool_t hasError)
33 {
34         AliInfo(Form("Alias %s, hasError: %d", alias, hasError));       
35
36         TString output;
37         
38         TIter iter(&valueSet);
39         AliDCSValue* aValue;
40         while ((aValue = (AliDCSValue*) iter.Next())) {
41                 output += aValue->ToString();
42                 output += '\n';
43         }       
44         output += '\n';
45
46         AliInfo(output);
47
48         AliCDBMetaData metaData;
49         metaData.SetComment("This is a test!");
50         
51         Store(alias, &valueSet, &metaData);     
52 }
53