Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / ACORDE / macros / DBStorageCalib.C
1 void DBStorageCalib(){
2
3 AliCDBManager *man = AliCDBManager::Instance();
4
5 AliCDBStorage *storLoc;
6 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
7
8
9 AliACORDECalibData *calibda = new AliACORDECalibData("Calib");
10
11 Float_t Efficiencies[60] = { 
12   0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
13   0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
14   0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
15   0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
16   0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
17   0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94
18 };
19 Float_t Rates[60] = {
20
21   1.14, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
22   1.14, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
23   1.14, 0.94, 0.94, 0.94, 0.94, 1.94, 0.94, 0.94, 0.94, 0.94,
24   1.14, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
25   1.94, 0.94, 0.94, 0.94, 1.94, 0.94, 0.94, 0.94, 0.94, 0.94,
26   0.94, 0.94, 0.94, 0.94, 1.94, 0.94, 0.94, 0.94, 0.94, 0.94
27
28
29                     };
30   
31 calibda->SetEfficiencies(Efficiencies);
32 calibda->SetRates(Rates);
33
34 // Creation of the object ACORDE Calibration as a MetaData
35         
36 TObjString str("ACORDE Calibration");      // object that will be stored
37
38 AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
39
40 AliCDBId id("ACORDE/Calib/Data",0,9999999);
41
42 md->SetResponsible("ACORDE team");
43 md->SetBeamPeriod(0);
44 md->SetAliRootVersion("v4-05-Release");
45 md->SetComment("Prototype");
46 md->PrintMetaData();
47
48 storLoc = man->GetDefaultStorage();
49 storLoc->Put(calibda, id, md);
50
51 storLoc->Delete();
52 delete md;
53
54 }
55