X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RAW%2FAliRawNullDB.cxx;h=a787b51a500c99f050b08a934a7c3499283ff0b6;hb=e0fdfa5289d0e8cdfdc91aae4a2f7927739744b9;hp=25c65efa3f21d6eb59752c4498c09b4b27c43573;hpb=a109e73ef777d562e3b69ec4212d0c56f4dc8ccc;p=u%2Fmrichter%2FAliRoot.git diff --git a/RAW/AliRawNullDB.cxx b/RAW/AliRawNullDB.cxx index 25c65efa3f2..a787b51a500 100644 --- a/RAW/AliRawNullDB.cxx +++ b/RAW/AliRawNullDB.cxx @@ -1,4 +1,4 @@ -// @(#)alimdc:$Name$:$Id$ +// @(#) $Id$ // Author: Fons Rademakers 26/11/99 /************************************************************************** @@ -29,21 +29,14 @@ ClassImp(AliRawNullDB) //______________________________________________________________________________ -AliRawNullDB::AliRawNullDB(AliRawEvent *event, -#ifdef USE_HLT - AliESD *esd, -#endif - Double_t maxsize, Int_t compress) - : AliRawDB(event, -#ifdef USE_HLT - esd, -#endif - maxsize, compress, kFALSE) +AliRawNullDB::AliRawNullDB(AliRawEventV2 *event, + AliESDEvent *esd, + Int_t compress, + const char* fileName,Int_t basketsize) + : AliRawDB(event, esd, compress, fileName, basketsize) { // Create a new raw DB that will wrtie to /dev/null. - if (!Create()) - MakeZombie(); } //______________________________________________________________________________ @@ -55,20 +48,36 @@ const char *AliRawNullDB::GetFileName() const } //______________________________________________________________________________ -void AliRawNullDB::Close() +Long64_t AliRawNullDB::Close() { // Close raw RFIO DB. - if (!fRawDB) return; + if (!fRawDB) return 0; + + if (!fRawDB->IsOpen()) return 0; fRawDB->cd(); // Write the tree. - fTree->Write(); + Bool_t error = kFALSE; + if (fTree) + if (fTree->Write() == 0) + error = kTRUE; + if (fESDTree) + if (fESDTree->Write() == 0) + error = kTRUE; // Close DB, this also deletes the fTree fRawDB->Close(); + fTree = NULL; + + Long64_t filesize = fRawDB->GetEND(); + delete fRawDB; fRawDB = 0; + if(!error) + return filesize; + else + return -1; }