X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliDataLoader.cxx;h=1abb6f33694cae966c77913cbb54a1fd8b3076ec;hb=94ac72a50b4ef68d2670f4a5e9ae9d2955186a60;hp=ccddb056abde67a91ec02a4ce8050fec4a5f380a;hpb=dc86eb511832cb913ca6931aaae3fde4438ba9a2;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliDataLoader.cxx b/STEER/AliDataLoader.cxx index ccddb056abd..1abb6f33694 100644 --- a/STEER/AliDataLoader.cxx +++ b/STEER/AliDataLoader.cxx @@ -206,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; + } + } } } @@ -457,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);