]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/MakeEMCALResMisAlignment.C
script to compare background maps in the central region
[u/mrichter/AliRoot.git] / EMCAL / MakeEMCALResMisAlignment.C
index a1f2c76b750bfa1bba5d4fc729391471b92a3bad..5a3b3d276db0e5883026d3963498a9723d3f4454 100644 (file)
@@ -1,20 +1,21 @@
-void MakeEMCALResMisAlignment(){
+void MakeEMCALResMisAlignment(TString geoname = "EMCAL_COMPLETE"){
   // Create TClonesArray of residual misalignment objects for EMCAL
   //
   const char* macroname = "MakeEMCALResMisAlignment.C";
-  const AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance(AliEMCALGeometry::GetDefaulGeometryName(),"");
-  if(!geom) {
+  if(geoname=="")geoname=AliEMCALGeometry::GetDefaultGeometryName();
+  const AliEMCALGeometry *emcalGeom = AliEMCALGeometry::GetInstance(geoname,"");
+  if(!emcalGeom) {
     Error("MakeEMCALResMisAlignment","Cannot obtain AliEMCALGeometry singleton\n");
     return;
   }
 
-  TClonesArray *array = new TClonesArray("AliAlignObjParams",geom->GetNumberOfSuperModules());
+  TClonesArray *array = new TClonesArray("AliAlignObjParams",emcalGeom->GetNumberOfSuperModules());
   TClonesArray &alobj = *array;
 
 
   // Activate CDB storage and load geometry from CDB
   AliCDBManager* cdb = AliCDBManager::Instance();
-  if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
+  if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
   cdb->SetRun(0);
   
   AliCDBStorage* storage;