]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawCastorDB.cxx
New flat raw-data event format. The details can be found at: http://indico.cern.ch...
[u/mrichter/AliRoot.git] / RAW / AliRawCastorDB.cxx
index ba03e9f3e3eb7ea0886812a8a5de0254688daaf3..c93f7ae79ed2b7abaddfbbcc6b5fdd2bb4b0f59e 100644 (file)
@@ -32,7 +32,7 @@ ClassImp(AliRawCastorDB)
 
 
 //______________________________________________________________________________
-AliRawCastorDB::AliRawCastorDB(AliRawEvent *event,
+AliRawCastorDB::AliRawCastorDB(AliRawEventV2 *event,
                               AliESDEvent *esd,
                               Int_t compress,
                               const char* fileName,Int_t basketsize)
@@ -115,8 +115,9 @@ Long64_t AliRawCastorDB::Close()
 
    // Write the tree.
    Bool_t error = kFALSE;
-   if (fTree->Write() == 0)
-     error = kTRUE;
+   if (fTree)
+     if (fTree->Write() == 0)
+       error = kTRUE;
    if (fESDTree)
      if (fESDTree->Write() == 0)
        error = kTRUE;
@@ -124,6 +125,8 @@ Long64_t AliRawCastorDB::Close()
    // Close DB, this also deletes the fTree
    fRawDB->Close();
 
+   fTree = NULL;
+
    Long64_t filesize = fRawDB->GetEND();
 
    if (fDeleteFiles) {