Add AD CDB objects
authorrgrosso <Raffaele.Grosso@cern.ch>
Fri, 13 Feb 2015 16:33:19 +0000 (17:33 +0100)
committerrgrosso <Raffaele.Grosso@cern.ch>
Fri, 13 Feb 2015 16:33:19 +0000 (17:33 +0100)
Apply some little cosmetic modification to some AD/macros/Make*.C
Use the same macros to (re)generate the corresponding objects.

13 files changed:
AD/macros/MakeADCalibEntry.C
AD/macros/MakeADLightYieldsEntry.C
AD/macros/MakeADPMGainsEntry.C
AD/macros/MakeADRecoParamEntry.C
AD/macros/MakeADTimeDelaysEntry.C
OCDB/AD/Align/Data/Run0_999999999_v0_s0.root
OCDB/AD/Calib/Data/Run0_999999999_v0_s0.root [new file with mode: 0644]
OCDB/AD/Calib/Data/Run0_9999999_v0_s0.root [deleted file]
OCDB/AD/Calib/LightYields/Run0_999999999_v0_s0.root [new file with mode: 0644]
OCDB/AD/Calib/PMGains/Run0_999999999_v0_s0.root [new file with mode: 0644]
OCDB/AD/Calib/RecoParam/Run0_999999999_v0_s0.root [new file with mode: 0644]
OCDB/AD/Calib/RecoParam/Run0_9999999_v0_s0.root [deleted file]
OCDB/AD/Calib/TimeDelays/Run0_999999999_v0_s0.root [new file with mode: 0644]

index 2a2babe..834a9fa 100644 (file)
@@ -1,9 +1,8 @@
-void MakeADCalibEntry(Int_t run=1,const char *inputCDB = "raw://"){
+void MakeADCalibEntry(const char *outputCDB = "local://$ALICE_ROOT/../AliRoot/OCDB"){
 
   AliCDBManager *man = AliCDBManager::Instance();
 
-  man->SetDefaultStorage(inputCDB);
-  man->SetRun(run);
+  man->SetDefaultStorage(outputCDB);
 
   AliADCalibData *calibda = new AliADCalibData();
 
@@ -13,10 +12,8 @@ void MakeADCalibEntry(Int_t run=1,const char *inputCDB = "raw://"){
   md->SetBeamPeriod(0);
   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
   md->SetComment("AD Calibration test");
-  AliCDBId id("AD/Calib/Data",0,AliCDBRunRange::Infinity());
+  AliCDBId id("AD/Calib/Data", 0, AliCDBRunRange::Infinity());
 
-  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
-  AliCDBStorage *storLoc = man->GetDefaultStorage();
-  storLoc->Put(calibda, id, md);
+  man->Put(calibda, id, md);
 
 }
index e434695..78a47b0 100644 (file)
@@ -1,8 +1,8 @@
-void MakeADLightYieldsEntry()
+void MakeADLightYieldsEntry(const char *outputCDB = "local://$ALICE_ROOT/../AliRoot/OCDB")
 {
 
   AliCDBManager *man = AliCDBManager::Instance();
-  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  man->SetDefaultStorage(outputCDB);
 
   // Creation of the light yields OCDB object
   const Double_t lightYieldCorr[66] = {0.0,
@@ -10,22 +10,19 @@ void MakeADLightYieldsEntry()
                                       0.01270, 0.01184, 0.01110, 0.01266, 0.00956, 0.00826, 0.00966, 0.00891,
                                       0.0};
 
-  TH1F *yields = new TH1F("ADLightYields","AD Light Yields",16,-0.5,15.5);
+  TH1F *yields = new TH1F("ADLightYields", "AD Light Yields", 16, -0.5, 15.5);
   yields->SetContent(lightYieldCorr);
        
-  AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
+  AliCDBMetaData *md = new AliCDBMetaData(); // metaData describing the object
   md->SetResponsible("Michal Broz");
   md->SetBeamPeriod(0);
   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
   md->SetComment("Light Yields channel by channel");
   md->PrintMetaData();
 
-  AliCDBStorage *storLoc = man->GetDefaultStorage();
-  AliCDBId id("AD/Calib/LightYields",0,AliCDBRunRange::Infinity());
+  AliCDBId id("AD/Calib/LightYields", 0, AliCDBRunRange::Infinity());
+  man->Put(yields, id, md);
 
-  storLoc->Put(yields, id, md);
-
-  storLoc->Delete();
   delete md;
 
 }
index a228e66..27077a5 100644 (file)
@@ -1,8 +1,8 @@
-void MakeADPMGainsEntry()
+void MakeADPMGainsEntry(const char *outputCDB = "local://$ALICE_ROOT/../AliRoot/OCDB")
 {
 
   AliCDBManager *man = AliCDBManager::Instance();
-  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  man->SetDefaultStorage(outputCDB);
 
   // Creation of the PM gains OCDB object
   Double_t a[16] = {1012, 1203, 1021, 1083, 835, 1067, 1163, 1050,
@@ -10,7 +10,7 @@ void MakeADPMGainsEntry()
   Double_t b[16] = {7.32, 8.91, 6.05, 6.57, 5.34, 6.64, 8.25, 6.44,
                    7.24, 6.77, 6.85, 7.67, 4.86, 7.38, 5.48 ,7.13};
 
-  TH2F *gains = new TH2F("ADPMGains","AD PM gain factors",16,-0.5,15.5,2,-0.5,1.5);
+  TH2F *gains = new TH2F("ADPMGains", "AD PM gain factors", 16, -0.5, 15.5, 2, -0.5, 1.5);
   for(Int_t channel = 0; channel < 16; ++channel) {
     gains->SetBinContent(channel+1,1,a[channel]);
     gains->SetBinContent(channel+1,2,b[channel]);
@@ -21,14 +21,12 @@ void MakeADPMGainsEntry()
   md->SetBeamPeriod(0);
   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
   md->SetComment("PM gain factors channel by channel");
+  md->AddDateToComment();
   md->PrintMetaData();
 
-  AliCDBStorage *storLoc = man->GetDefaultStorage();
-  AliCDBId id("AD/Calib/PMGains",0,AliCDBRunRange::Infinity());
+  AliCDBId id("AD/Calib/PMGains", 0, AliCDBRunRange::Infinity());
+  man->Put(gains, id, md);
 
-  storLoc->Put(gains, id, md);
-
-  storLoc->Delete();
   delete md;
 
 }
index a30c031..132a1b7 100644 (file)
@@ -1,4 +1,4 @@
-void MakeADRecoParamEntry(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult) {
+void MakeADRecoParamEntry(AliRecoParam::EventSpecie_t defaultEventSpecie=AliRecoParam::kLowMult, const char *outputCDB = "local://$ALICE_ROOT/../AliRoot/OCDB") {
 //========================================================================
 //
 // Steering macro for AD reconstruction parameters
@@ -11,7 +11,7 @@ void MakeADRecoParamEntry(AliRecoParam::EventSpecie_t default=AliRecoParam::kLow
 
   // Activate CDB storage and load geometry from CDB
   AliCDBManager* cdb = AliCDBManager::Instance();
-  cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  cdb->SetDefaultStorage(outputCDB);
   cdb->SetRun(0);
   
   TObjArray *recoParamArray = new TObjArray();
@@ -40,12 +40,12 @@ void MakeADRecoParamEntry(AliRecoParam::EventSpecie_t default=AliRecoParam::kLow
     recoParamArray->AddLast(ADRecoParam);
   }
 
-  // Set the default
+  // Set the defaultEventSpecie
   Bool_t defaultIsSet = kFALSE;
   for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
     AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
     if (!param) continue;
-    if (default & param->GetEventSpecie()) {
+    if (defaultEventSpecie & param->GetEventSpecie()) {
       param->SetAsDefault();
       defaultIsSet = kTRUE;
     }
@@ -62,8 +62,8 @@ void MakeADRecoParamEntry(AliRecoParam::EventSpecie_t default=AliRecoParam::kLow
   md->SetComment("Reconstruction parameters for AD");
   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
   md->SetBeamPeriod(0);
-  AliCDBId id("AD/Calib/RecoParam",0,AliCDBRunRange::Infinity());
-  cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
+  AliCDBId id("AD/Calib/RecoParam", 0, AliCDBRunRange::Infinity());
+  cdb->Put(recoParamArray, id, md);
 
   return;
 }
index 3565301..f371ce7 100644 (file)
@@ -1,12 +1,12 @@
-void MakeADTimeDelaysEntry()
+void MakeADTimeDelaysEntry(const char *outputCDB = "local://$ALICE_ROOT/../AliRoot/OCDB")
 {
 
   AliCDBManager *man = AliCDBManager::Instance();
-  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  man->SetDefaultStorage(outputCDB);
 
   // Creation of the time delays OCDB object
   const Double_t timeShift[18] = {0.0 ,203.2, 203.4, 203.5, 203.0, 203.4, 203.5, 203.1, 203.2, 194.2, 194.4, 194.5, 194.2, 194.7, 194.5, 194.3, 192.8, 0.0};
-  TH1F *delays = new TH1F("ADTimeDelays","AD Time delays",16,-0.5,15.5);
+  TH1F *delays = new TH1F("ADTimeDelays", "AD Time delays", 16, -0.5, 15.5);
   delays->SetContent(timeShift);
        
   AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
@@ -17,11 +17,10 @@ void MakeADTimeDelaysEntry()
   md->PrintMetaData();
 
   AliCDBStorage *storLoc = man->GetDefaultStorage();
-  AliCDBId id("AD/Calib/TimeDelays",0,AliCDBRunRange::Infinity());
+  AliCDBId id("AD/Calib/TimeDelays", 0, AliCDBRunRange::Infinity());
 
-  storLoc->Put(delays, id, md);
+  man->Put(delays, id, md);
 
-  storLoc->Delete();
   delete md;
 
 }
index f2881cd..d890563 100644 (file)
Binary files a/OCDB/AD/Align/Data/Run0_999999999_v0_s0.root and b/OCDB/AD/Align/Data/Run0_999999999_v0_s0.root differ
diff --git a/OCDB/AD/Calib/Data/Run0_999999999_v0_s0.root b/OCDB/AD/Calib/Data/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..62a47df
Binary files /dev/null and b/OCDB/AD/Calib/Data/Run0_999999999_v0_s0.root differ
diff --git a/OCDB/AD/Calib/Data/Run0_9999999_v0_s0.root b/OCDB/AD/Calib/Data/Run0_9999999_v0_s0.root
deleted file mode 100644 (file)
index ea36641..0000000
Binary files a/OCDB/AD/Calib/Data/Run0_9999999_v0_s0.root and /dev/null differ
diff --git a/OCDB/AD/Calib/LightYields/Run0_999999999_v0_s0.root b/OCDB/AD/Calib/LightYields/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..dee6460
Binary files /dev/null and b/OCDB/AD/Calib/LightYields/Run0_999999999_v0_s0.root differ
diff --git a/OCDB/AD/Calib/PMGains/Run0_999999999_v0_s0.root b/OCDB/AD/Calib/PMGains/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..dbc66d5
Binary files /dev/null and b/OCDB/AD/Calib/PMGains/Run0_999999999_v0_s0.root differ
diff --git a/OCDB/AD/Calib/RecoParam/Run0_999999999_v0_s0.root b/OCDB/AD/Calib/RecoParam/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..fba9ba9
Binary files /dev/null and b/OCDB/AD/Calib/RecoParam/Run0_999999999_v0_s0.root differ
diff --git a/OCDB/AD/Calib/RecoParam/Run0_9999999_v0_s0.root b/OCDB/AD/Calib/RecoParam/Run0_9999999_v0_s0.root
deleted file mode 100644 (file)
index ea36641..0000000
Binary files a/OCDB/AD/Calib/RecoParam/Run0_9999999_v0_s0.root and /dev/null differ
diff --git a/OCDB/AD/Calib/TimeDelays/Run0_999999999_v0_s0.root b/OCDB/AD/Calib/TimeDelays/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..5caaa4e
Binary files /dev/null and b/OCDB/AD/Calib/TimeDelays/Run0_999999999_v0_s0.root differ