]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/UpdateCDBCTPConfig.C
updates to fix histogram ranges, new 2D cuts, new Analysis macro for fast QA
[u/mrichter/AliRoot.git] / MUON / UpdateCDBCTPConfig.C
index a9b12c1922289810c235518b5414ee0753ad5889..a6030f940efb6d7299549963681449601cd6b92f 100644 (file)
@@ -58,6 +58,8 @@
 #include "AliCDBId.h"
 #include "AliCDBMetaData.h"
 #include "AliTriggerConfiguration.h"
+#include "AliTriggerUtils.h"
+#include "AliSimulation.h"
 #include <TROOT.h>
 #include <TString.h>
 #include <TSystem.h>
 
 void UpdateCDBCTPConfig(Bool_t check = false) {
   
+  // AliSimulation object must exist, as it is used via AliMC
+  // which is used in AliTriggerUtils::CheckConfiguration()
+  AliSimulation sim;
+
   AliCDBManager* cdb = AliCDBManager::Instance();
-  cdb->SetDefaultStorage("local://$ALICE_ROOT");
+  cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
   cdb->SetRun(0);
 
   if (check) {
@@ -97,7 +103,8 @@ void UpdateCDBCTPConfig(Bool_t check = false) {
   }
 
   // check if Config.C is compatible with the trigger configuration requested
-  if (!trconfig->CheckConfiguration(cfgFile)) {
+  AliTriggerUtils tru;
+  if (!tru.CheckConfiguration(cfgFile,trconfig)) {
     Printf("CTP configuration is incompatible with the specified Config.C and AliRoot version! Exiting...");
     return;
   }
@@ -109,15 +116,15 @@ void UpdateCDBCTPConfig(Bool_t check = false) {
 
   // ROOT and AliRoot versions
   const char* rootv = gROOT->GetVersion();
-  TString av(ALIROOT_SVN_BRANCH);
-  Int_t revnum = ALIROOT_SVN_REVISION;
+  TString av(ALIROOT_BRANCH);
+  TString revnum(ALIROOT_REVISION);
 
-  Printf("root version: %s.  AliRoot %s, revision number %d",rootv,av.Data(),revnum);
+  Printf("root version: %s.  AliRoot %s, revision number %s",rootv,av.Data(),revnum);
 
   md->SetAliRootVersion(av.Data());
-  md->SetComment(Form("Default CTP configuration for MUON mode produced with root version %s and AliRoot version %s revision %d ",rootv,av.Data(),revnum));
+  md->SetComment(Form("Default CTP configuration for MUON mode produced with root version %s and AliRoot version %s revision %s ",rootv,av.Data(),revnum));
 
-  AliCDBStorage* storage = cdb->GetStorage("local://$ALICE_ROOT");
+  AliCDBStorage* storage = cdb->GetStorage("local://$ALICE_ROOT/OCDB");
   storage->Put(trconfig,id,md);
   
 }