]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSreconstruction.cxx
Additional protection
[u/mrichter/AliRoot.git] / ITS / AliITSreconstruction.cxx
index 684fc6d3e6a07fdebc3e7429f63dae6fad975d2f..b8d8f4edee7060094ba58e1b8a840a6b782c2bc0 100644 (file)
@@ -269,9 +269,15 @@ void AliITSreconstruction::Exec(const Option_t *opt){
 }
 //______________________________________________________________________ 
 void AliITSreconstruction::SetOutputFile(TString filename){
-  // Set a file name for recpoints. Used only if this file is not the file
-  // containing digits. This obj is deleted by AliRun.
-  Error("SetOutputFile",
-       "Use AliLoader::SetRecPointsFileName(TString&)instead filename=%s",
-       filename.Data());
+  // Set a new file name for recpoints. 
+  // It must be called before Init()
+  if(!fLoader)fLoader = (AliITSLoader*) fRunLoader->GetLoader("ITSLoader");
+  if(fLoader){
+    Info("SetOutputFile","name for rec points is %s",filename.Data());
+    fLoader->SetRecPointsFileName(filename);
+  }
+  else {
+    Error("SetOutputFile",
+    "ITS loader not available. Not possible to set name: %s",filename.Data());
+  }
 }