]> 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 1f99b4d67b5defe635521eedb9489d674b35dc47..4f55c81dc1560f724c29a06614eea3ca9aa93ad9 100644 (file)
@@ -32,11 +32,11 @@ ClassImp(AliRawCastorDB)
 
 
 //______________________________________________________________________________
-AliRawCastorDB::AliRawCastorDB(AliRawEvent *event,
+AliRawCastorDB::AliRawCastorDB(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 CASTOR and rootd.
 
@@ -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
 }
 
 //______________________________________________________________________________
@@ -103,7 +105,7 @@ const char *AliRawCastorDB::GetFileName() const
 }
 
 //______________________________________________________________________________
-Int_t AliRawCastorDB::Close()
+Long64_t AliRawCastorDB::Close()
 {
    // Close raw CASTOR/rootd DB.
 
@@ -115,8 +117,9 @@ Int_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,7 +127,9 @@ Int_t AliRawCastorDB::Close()
    // Close DB, this also deletes the fTree
    fRawDB->Close();
 
-   Int_t filesize = fRawDB->GetEND();
+   fTree = NULL;
+
+   Long64_t filesize = fRawDB->GetEND();
 
    if (fDeleteFiles) {
       TUrl u(fRawDB->GetName());