]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AD/macros/MakeADPMGainsEntry.C
doxy: do not show whitespace diffs on bulk edit
[u/mrichter/AliRoot.git] / AD / macros / MakeADPMGainsEntry.C
CommitLineData
68865a3d 1void MakeADPMGainsEntry()
2{
3
4 AliCDBManager *man = AliCDBManager::Instance();
5 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
6
7 // Creation of the PM gains OCDB object
8 Double_t a[16] = {1012, 1203, 1021, 1083, 835, 1067, 1163, 1050,
9 1033, 1026, 1121, 1135, 1050, 1312, 957, 1013};
122c9ddc 10 Double_t b[16] = {7.32, 8.91, 6.05, 6.57, 5.34, 6.64, 8.25, 6.44,
11 7.24, 6.77, 6.85, 7.67, 4.86, 7.38, 5.48 ,7.13};
68865a3d 12
13 TH2F *gains = new TH2F("ADPMGains","AD PM gain factors",16,-0.5,15.5,2,-0.5,1.5);
14 for(Int_t channel = 0; channel < 16; ++channel) {
15 gains->SetBinContent(channel+1,1,a[channel]);
16 gains->SetBinContent(channel+1,2,b[channel]);
17 }
18
19 AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
20 md->SetResponsible("Michal Broz");
21 md->SetBeamPeriod(0);
22 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
23 md->SetComment("PM gain factors channel by channel");
24 md->PrintMetaData();
25
26 AliCDBStorage *storLoc = man->GetDefaultStorage();
27 AliCDBId id("AD/Calib/PMGains",0,AliCDBRunRange::Infinity());
28
29 storLoc->Put(gains, id, md);
30
31 storLoc->Delete();
32 delete md;
33
34}