Always delete TObjArrays created by TString::Tokenize (Ruben)
[u/mrichter/AliRoot.git] / RAW / AliRawRootdDB.cxx
index ec1ba14..7410254 100644 (file)
@@ -31,11 +31,11 @@ ClassImp(AliRawRootdDB)
 
 
 //______________________________________________________________________________
-AliRawRootdDB::AliRawRootdDB(AliRawEvent *event,
+AliRawRootdDB::AliRawRootdDB(AliRawEventV2 *event,
                             AliESDEvent *esd,
                             Int_t compress,
-                            const char* fileName)
-   : AliRawDB(event, esd, compress, fileName)
+                            const char* fileName,Int_t basketsize)
+   : AliRawDB(event, esd, compress, fileName, basketsize)
 {
    // Create a new raw DB that will be accessed via rootd daemon.
 
@@ -99,8 +99,9 @@ Long64_t AliRawRootdDB::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;
@@ -108,6 +109,8 @@ Long64_t AliRawRootdDB::Close()
    // Close DB, this also deletes the fTree
    fRawDB->Close();
 
+   fTree = NULL;
+
    Long64_t filesize = fRawDB->GetEND();
 
 #if 0