X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RAW%2FAliRawRootdDB.cxx;h=542e3de5d00e43345717e679884efadd5d411d87;hb=f07ec91134d579190702795f9e48455f81a25b59;hp=1de0c9a30bd5db16cc57526b4b3de7c877949a66;hpb=e61fd20dc897fe3296b8064c24aa4b2cf3b6bdb6;p=u%2Fmrichter%2FAliRoot.git diff --git a/RAW/AliRawRootdDB.cxx b/RAW/AliRawRootdDB.cxx index 1de0c9a30bd..542e3de5d00 100644 --- a/RAW/AliRawRootdDB.cxx +++ b/RAW/AliRawRootdDB.cxx @@ -87,21 +87,29 @@ const char *AliRawRootdDB::GetFileName() const } //______________________________________________________________________________ -void AliRawRootdDB::Close() +Int_t AliRawRootdDB::Close() { // Close raw rootd DB. - if (!fRawDB) return; + if (!fRawDB) return 0; + + if (!fRawDB->IsOpen()) return 0; fRawDB->cd(); // Write the tree. - fTree->Write(); - if (fESDTree) fESDTree->Write(); + Bool_t error = kFALSE; + if (fTree->Write() == 0) + error = kTRUE; + if (fESDTree) + if (fESDTree->Write() == 0) + error = kTRUE; // Close DB, this also deletes the fTree fRawDB->Close(); + Int_t filesize = fRawDB->GetEND(); + #if 0 // can use services of TFTP if (fDeleteFiles) @@ -110,4 +118,8 @@ void AliRawRootdDB::Close() delete fRawDB; fRawDB = 0; + if(!error) + return filesize; + else + return -1; }