consolidate zero-length arrays (aka struct hack)
[u/mrichter/AliRoot.git] / VZERO / MakeVZEROLightYieldsEntry.C
1 void MakeVZEROLightYieldsEntry()
2 {
3
4   AliCDBManager *man = AliCDBManager::Instance();
5   man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
6
7   // Creation of the light yields OCDB object
8   const Double_t lightYieldCorr[66] = {0.0,
9                                        0.01051, 0.00955, 0.00861, 0.00948, 0.01082, 0.00870, 0.01023, 0.01012,
10                                        0.01270, 0.01184, 0.01110, 0.01266, 0.00956, 0.00826, 0.00966, 0.00891,
11                                        0.01358, 0.01543, 0.01516, 0.01337, 0.01908, 0.01641, 0.01767, 0.01512,
12                                        0.01664, 0.01326, 0.01536, 0.01500, 0.01439, 0.01445, 0.01504, 0.01079,
13                                        0.00105, 0.00110, 0.00143, 0.00093, 0.00072, 0.01919, 0.00073, 0.02580,
14                                        0.02911, 0.00148, 0.03176, 0.00126, 0.00158, 0.00111, 0.02804, 0.00109,
15                                        0.00157, 0.00158, 0.00104, 0.00120, 0.00123, 0.00188, 0.00193, 0.02133,
16                                        0.00200, 0.00185, 0.00143, 0.00257, 0.00201, 0.00119, 0.00197, 0.00282,
17                                        0.0};
18
19   TH1F *yields = new TH1F("VZEROLightYields","VZERO Light Yields",64,-0.5,63.5);
20   yields->SetContent(lightYieldCorr);
21         
22   AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
23   md->SetResponsible("Brigitte Cheynis");
24   md->SetBeamPeriod(0);
25   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
26   md->SetComment("Light Yields channel by channel");
27   md->PrintMetaData();
28
29   AliCDBStorage *storLoc = man->GetDefaultStorage();
30   AliCDBId id("VZERO/Calib/LightYields",0,AliCDBRunRange::Infinity());
31
32   storLoc->Put(yields, id, md);
33
34   storLoc->Delete();
35   delete md;
36
37 }