]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Load geometry in CreateOuputObjects(), instead of Exec()
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Oct 2009 17:22:45 +0000 (17:22 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Oct 2009 17:22:45 +0000 (17:22 +0000)
PWG1/AliAlignmentDataFilterITS.cxx
PWG1/AliTrackMatchingTPCITSCosmics.cxx

index d3a793e641bb005be9c6643e082b83376a9aa7ec..a061517dff35ec2d0016dc639e1a00c60e39e39e 100644 (file)
@@ -184,6 +184,16 @@ void AliAlignmentDataFilterITS::CreateOutputObjects()
 {
   // Create the output container
   //
+  
+  // load the geometry  
+  if(!gGeoManager) {    
+    printf("AliAlignmentDataFilterITS::CreateOutputObjects(): loading geometry from %s\n",fGeometryFileName.Data());
+    AliGeomManager::LoadGeometry(fGeometryFileName.Data());
+    if(!gGeoManager) { 
+      printf("AliAlignmentDataFilterITS::CreateOutputObjects(): no geometry loaded \n");
+      return;
+    }
+  }
 
   // Several histograms are more conveniently managed in a TList
   fListOfHistos = new TList();
@@ -253,14 +263,10 @@ void AliAlignmentDataFilterITS::Exec(Option_t */*option*/)
   // Execute analysis for current event:
   // write ITS AliTrackPoints for selected tracks to fspTree
   
-  // load the geometry  
-  if(!gGeoManager) {    
-    printf("AliAlignmentDataFilterITS::Exec(): loading geometry from %s\n",fGeometryFileName.Data());
-    AliGeomManager::LoadGeometry(fGeometryFileName.Data());
-    if(!gGeoManager) { 
-      printf("AliAlignmentDataFilterITS::Exec(): no geometry loaded \n");
-      return;
-    }
+  // check the geometry  
+  if(!gGeoManager) { 
+    printf("AliAlignmentDataFilterITS::Exec(): no geometry loaded \n");
+    return;
   }
 
   // check if we have AliITSRecoParam
index adfbd4312797baeae889f7949e7b6b42c7e4d3a9..518fad96986cd9b308231e071ccc458a59a9f3a3 100644 (file)
@@ -130,6 +130,15 @@ void AliTrackMatchingTPCITSCosmics::CreateOutputObjects()
   // Create the output container
   //
 
+  // load the geometry  
+  if(!gGeoManager) {    
+    AliGeomManager::LoadGeometry(fGeometryFileName.Data());
+    if(!gGeoManager) { 
+      printf("AliTrackMatchingTPCITSCosmics::CreateOutputObjects(): no geometry loaded \n");
+      return;
+    }
+  }
+
   // Several histograms are more conveniently managed in a TList
   fList = new TList();
   fList->SetOwner();
@@ -153,13 +162,10 @@ void AliTrackMatchingTPCITSCosmics::Exec(Option_t */*option*/)
   // Execute analysis for current event:
   // write ITS AliTrackPoints for selected tracks to fspTree
   
-  // load the geometry  
-  if(!gGeoManager) {    
-    AliGeomManager::LoadGeometry(fGeometryFileName.Data());
-    if(!gGeoManager) { 
-      printf("AliAlignmentDataFilterITS::Exec(): no geometry loaded \n");
-      return;
-    }
+  // check the geometry  
+  if(!gGeoManager) { 
+    printf("AliTrackMatchingTPCITSCosmics::Exec(): no geometry loaded \n");
+    return;
   }
 
   if(!fESD) {