Minor changes in Calib object
[u/mrichter/AliRoot.git] / VZERO / DBStorageCalib.C
CommitLineData
98fa8bae 1
2void DBStorageCalib(){
3
4AliCDBManager *man = AliCDBManager::Instance();
5
6AliCDBStorage *storLoc;
7man->SetDefaultStorage("local://$ALICE_ROOT");
8
9// Setting gain and pedestal values :
10
11AliVZEROCalibData *calibda = new AliVZEROCalibData("Calib");
12
13Float_t GainFactors[128] =
14{ 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0,
15 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0,
16 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0,
0a6fff5a 17 50.0, 50.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0,
18 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0,
19 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0,
20 10.0, 10.0, 10.0, 10.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0,
98fa8bae 21 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0,
22 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0,
0a6fff5a 23 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 10.0, 10.0, 10.0, 10.0,
24 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0,
25 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0,
26 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0 };
98fa8bae 27
28calibda->SetGain(GainFactors);
29
30Float_t Pedestals[128] =
31{ 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
32 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
33 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
34 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
35 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
36 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
37 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
38 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
39 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
40 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
41 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
42 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0,
43 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0, 16.0 };
44
45calibda->SetPedestal(Pedestals);
46
47Float_t Sigmas[128] =
48{ 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0,
49 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0,
50 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0,
51 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0,
52 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0,
53 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0,
54 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0,
55 3.0, 3.0, 3.0, 3.0, 3.0, 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 1.0 };
83
84calibda->SetTimeGain(TimeGains);
85
86// Creation of the object VZERO Calibration as a MetaData
87
88TObjString str("VZERO Calibration"); // object that will be stored
89
90AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
91
92AliCDBId id("VZERO/Calib/Data",0,9999999);
93
a2181425 94//md->SetObjectClassName("VZERO calibration parameters"); automatically
95//set to AliVZEROCalibData by the CDB classes during storage
98fa8bae 96md->SetResponsible("Brigitte Cheynis");
97md->SetBeamPeriod(0);
0a6fff5a 98md->SetAliRootVersion("November2006");
98fa8bae 99md->SetComment("Prototype");
100md->PrintMetaData();
101
102storLoc = man->GetDefaultStorage();
103storLoc->Put(calibda, id, md);
104
105storLoc->Delete();
106delete md;
107
108}