Initialize the path name to the geometry file in the Init and not in the InitParameters
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 1 Apr 2012 10:31:43 +0000 (10:31 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 1 Apr 2012 10:31:43 +0000 (10:31 +0000)
PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx

index 4ead3bb..9df9cd3 100755 (executable)
@@ -291,6 +291,9 @@ void AliCaloTrackReader::Init()
   // Init geometry, I do not like much to do it like this ...
   if(fImportGeometryFromFile && !gGeoManager) 
   {
+    if(fImportGeometryFilePath=="") // If not specified, set a default location
+    fImportGeometryFilePath = "$ALICE_ROOT/PWGGA/EMCALTasks/macros/geometry.root"; // "$ALICE_ROOT/EVE/alice-data/default_geo.root"
+
     printf("AliCaloTrackReader::Init() - Import %s\n",fImportGeometryFilePath.Data());
     TGeoManager::Import(fImportGeometryFilePath) ; // default need file "geometry.root" in local dir!!!!
   }
@@ -356,7 +359,6 @@ void AliCaloTrackReader::InitParameters()
   fAODBranchList   = new TList ;
 
   fImportGeometryFromFile = kFALSE;
-  fImportGeometryFilePath = "$ALICE_ROOT/PWGGA/EMCALTasks/macros/geometry.root"; // "$ALICE_ROOT/EVE/alice-data/default_geo.root"
   
 }