]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliDataLoader.cxx
Typo fixed, and removing unused variable.
[u/mrichter/AliRoot.git] / STEER / AliDataLoader.cxx
index 347ef76d04464c08a011f6b183697070e4a0129d..1abb6f33694cae966c77913cbb54a1fd8b3076ec 100644 (file)
@@ -92,40 +92,6 @@ AliDataLoader::AliDataLoader(const char* filename, const char* contname,
   
 }
 
-//______________________________________________________________________________
-AliDataLoader::AliDataLoader(const AliDataLoader& source) : 
-  TNamed(source),
-  fFileName(source.fFileName),
-  fFile(source.fFile),
-  fDirectory(source.fDirectory),
-  fFileOption(source.fFileOption),
-  fCompressionLevel(source.fCompressionLevel),
-  fNEventsPerFile(source.fNEventsPerFile),
-  fBaseLoaders(source.fBaseLoaders),
-  fHasTask(source.fHasTask),
-  fTaskName(source.fTaskName),
-  fParentalTask(source.fParentalTask),
-  fEventFolder(source.fEventFolder),
-  fFolder(source.fFolder)
-{
-  //
-  // copy constructor
-  //
-  AliFatal("Copy constructor not implemented");
-}
-
-
-//______________________________________________________________________________
-AliDataLoader& AliDataLoader::operator=(const AliDataLoader& /*source*/) 
-{
-  //
-  // Assignment operator
-  //
-  AliFatal("Assignment operator not implemented");
-  return *this;
-}
-
-
 //______________________________________________________________________________
 AliDataLoader::~AliDataLoader()
 {
@@ -240,9 +206,24 @@ Int_t AliDataLoader::OpenFile(Option_t* opt)
     {
       if(fFile->IsOpen() == kTRUE)
        {
-         AliWarning(Form("File %s already opened by sombody else. First close it.",
-                         fFile->GetName()));
-         return 0;
+         TString option1 = fFile->GetOption();
+         if (option1.CompareTo("read",TString::kIgnoreCase) == 0)
+           {
+             AliInfo(Form("File %s already opened in read mode.",fFile->GetName()));
+           }
+         else
+           {
+             TString option2 = opt;
+             if (option2.CompareTo("read",TString::kIgnoreCase) == 0)
+               {
+                 AliInfo(Form("Open already opened file %s in read mode.",fFile->GetName()));
+               }
+             else {
+               AliWarning(Form("File %s already opened by sombody else. First close it.",
+                               fFile->GetName()));
+               return 0;
+             }
+           }
        }
     }
   
@@ -491,7 +472,7 @@ void AliDataLoader::SetFileNameSuffix(const TString& suffix)
   AliDebug(1, Form("suffix=%s",suffix.Data()));
   AliDebug(1, Form("   Digits File Name before: %s",fFileName.Data()));
   
-  static TString dotroot(".root");
+  static const TString dotroot(".root");
   const TString& suffixdotroot = suffix + dotroot;
   fFileName = fFileName.ReplaceAll(dotroot,suffixdotroot);
   
@@ -671,7 +652,7 @@ void  AliDataLoader::SetDirName(TString& dirname)
   AliDebug(10, Form("Slash found on pos %d",n));
   if (n > 0) fFileName = fFileName.Remove(0,n+1);
   AliDebug(10, Form("Core FileName %s",fFileName.Data()));
-  fFileName = dirname + "/" + fFileName;
+  fFileName = dirname + fFileName;
   AliDebug(10, Form("FileName after %s",fFileName.Data()));
 }