]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawCastorDB.cxx
merge centrality bins on input level
[u/mrichter/AliRoot.git] / RAW / AliRawCastorDB.cxx
index ba03e9f3e3eb7ea0886812a8a5de0254688daaf3..4f55c81dc1560f724c29a06614eea3ca9aa93ad9 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)
@@ -52,7 +52,9 @@ AliRawCastorDB::AliRawCastorDB(AliRawEvent *event,
       init = 1;
    }
 
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0)
    if (fRawDB) fRawDB->UseCache(50, 0x200000);  //0x100000 = 1MB)
+#endif
 }
 
 //______________________________________________________________________________
@@ -115,8 +117,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 +127,8 @@ Long64_t AliRawCastorDB::Close()
    // Close DB, this also deletes the fTree
    fRawDB->Close();
 
+   fTree = NULL;
+
    Long64_t filesize = fRawDB->GetEND();
 
    if (fDeleteFiles) {