Changes for Root6 (Mikolaj)
[u/mrichter/AliRoot.git] / ACORDE / macros / MakeACORDEOCDBConfigEff.C
1
2 /**************************************************************************
3         
4         Macro created for storing the OCDB Config Efficiency data of 
5         ACORDE in $ALICE_ROOT/OCDB/ACORDE/Config/Efficiency
6
7
8         From: 
9
10                 Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch>
11                 FCFM, BUAP, Puebla, Mexico
12
13         Created:
14
15                 March 3rd. 2009 @ CERN
16
17
18         Further commnents:
19
20                 Arturo Fernandez <afernan@mail.cern.ch>
21
22 **************************************************************************/
23 void MakeACORDEOCDBConfigEff()
24 {
25
26         AliCDBManager *man = AliCDBManager::Instance();
27
28         AliCDBStorage *storLoc;
29         man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
30
31
32         AliACORDECalibData *calibda = new AliACORDECalibData("OCDBConfigEff");
33
34         Float_t Efficiencies[60] = 
35         { 
36                 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
37                 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
38                 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
39                 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
40                 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
41                 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94
42         };
43         calibda->SetEfficiencies(Efficiencies);
44         
45         // Creation of the object ACORDE Calibration as a MetaData
46         
47         TObjString str("ACORDE OCDB Config Efficiency Data");      // object that will be stored
48
49         AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
50
51         AliCDBId id("ACORDE/Config/Efficiency",0,9999999);
52
53         md->SetResponsible("Mario Rodriguez");
54         md->SetBeamPeriod(0);
55         md->SetAliRootVersion("Current trunk version");
56         md->SetComment("Version 1.0 of OCDB Config Efficiency Reference Calib Data for ACORDE");
57         md->PrintMetaData();
58
59         storLoc = man->GetDefaultStorage();
60         storLoc->Put(calibda, id, md);
61
62         storLoc->Delete();
63         delete md;
64
65 }
66