From 60838f24a78582c389db6e75e972076d021ccfbf Mon Sep 17 00:00:00 2001 From: cvetan Date: Wed, 16 Jan 2008 16:19:04 +0000 Subject: [PATCH] A raw-data file and Tree size limit is increased to 20GB. Wherever is needed the interfaces are moved from 32-bit to 64-bit integers. The mStreamRecorder interface is updated accordingly. For the moment the svn Revision keyword is used to log the aliroot version inside the raw-data tree. Should be corrected soon. --- RAW/AliMDC.cxx | 14 +++++++++----- RAW/AliMDC.h | 4 ++-- RAW/AliRawDB.cxx | 18 +++++++++--------- RAW/AliRawDB.h | 4 ++-- RAW/alimdc_main.cxx | 10 +++++----- RAW/mdc.cxx | 2 +- RAW/mdc.h | 2 +- 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/RAW/AliMDC.cxx b/RAW/AliMDC.cxx index 2a7ae0e7b2a..63ccc25c0da 100644 --- a/RAW/AliMDC.cxx +++ b/RAW/AliMDC.cxx @@ -1,4 +1,4 @@ -// @(#) $Id$ +// @(#)alimdc:$Name: $:$Id$ // Author: Fons Rademakers 26/11/99 // Updated: Dario Favretto 15/04/2003 @@ -119,6 +119,10 @@ AliMDC::AliMDC(Int_t compress, Bool_t deleteFiles, EFilterMode filterMode, // Optional 'guidFileFolder' specifies the folder in which *.guid files // will be stored. In case this option is not given, the *.guid files // will be written to the same folder as the raw-data files. + + // Set the maximum tree size to 19GB + // in order to allow big raw data files + TTree::SetMaxTreeSize(20000000000LL); // This line is needed in case of a stand-alone application w/o // $ROOTSYS/etc/system.rootrc file @@ -234,11 +238,11 @@ Int_t AliMDC::ProcessEvent(void* event, Bool_t isIovecArray) // or, if isIovecArray is kTRUE, a pointer to an array of iovecs with one // iovec per subevent (used by the event builder). // The return value is the number of written bytes or an error code - const UInt_t kFileSizeErrorLevel = 1900000000; + const Long64_t kFileSizeErrorLevel = 19000000000LL; - UInt_t currentFileSize = GetTotalSize(); + Long64_t currentFileSize = GetTotalSize(); if(currentFileSize > kFileSizeErrorLevel) { - Error("ProcessEvent", "file size (%u) exceeds the limit " + Error("ProcessEvent", "file size (%lu) exceeds the limit " , currentFileSize); return kErrFileSize; } @@ -415,7 +419,7 @@ Int_t AliMDC::ProcessEvent(void* event, Bool_t isIovecArray) } //______________________________________________________________________________ -Int_t AliMDC::GetTotalSize() +Long64_t AliMDC::GetTotalSize() { // return the total current raw DB file size diff --git a/RAW/AliMDC.h b/RAW/AliMDC.h index bc59cd5cf5d..4306430e5bd 100644 --- a/RAW/AliMDC.h +++ b/RAW/AliMDC.h @@ -1,6 +1,6 @@ #ifndef ALIMDC_H #define ALIMDC_H -// @(#) $Id$ +// @(#)alimdc:$Name: $:$Id$ // Author: Fons Rademakers 26/11/99 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. * @@ -71,7 +71,7 @@ public: Double_t maxFileSize = 0, const char* fs1 = NULL, const char* fs2 = NULL); Int_t ProcessEvent(void* event, Bool_t isIovecArray = kFALSE); - Int_t GetTotalSize(); + Long64_t GetTotalSize(); Int_t Close(); Int_t Run(const char* inputFile, Bool_t loop, diff --git a/RAW/AliRawDB.cxx b/RAW/AliRawDB.cxx index a02f225e43f..88095a95389 100644 --- a/RAW/AliRawDB.cxx +++ b/RAW/AliRawDB.cxx @@ -1,4 +1,4 @@ -// @(#) $Id$ +// @(#)alimdc:$Name: $:$Id$ // Author: Fons Rademakers 26/11/99 /************************************************************************** @@ -49,7 +49,7 @@ ClassImp(AliRawDB) -const char *AliRawDB::fgkAliRootTag = "$Name$"; +const char *AliRawDB::fgkAliRootTag = "$Rev$"; // Split TPC into 9 branches in order to avoid problems with big memory // consumption in case of TPC events w/o zero-suppression @@ -267,7 +267,7 @@ void AliRawDB::MakeTree() // Create ROOT Tree object container. fTree = new TTree("RAW", Form("ALICE raw-data tree (%s)", GetAliRootTag())); - fTree->SetAutoSave(2000000000); // autosave when 2 Gbyte written + fTree->SetAutoSave(21000000000LL); // autosave when 21 Gbyte written fTree->BranchRef(); @@ -292,7 +292,7 @@ void AliRawDB::MakeTree() if (fESD) { fESDTree = new TTree("esdTree", Form("ALICE HLT ESD tree (%s)", GetAliRootTag())); - fESDTree->SetAutoSave(2000000000); // autosave when 2 Gbyte written + fESDTree->SetAutoSave(21000000000LL); // autosave when 21 Gbyte written split = 0; fESDTree->Branch("ESD", "AliESDEvent", &fESD, bufsize, split); } @@ -383,10 +383,10 @@ Int_t AliRawDB::Fill() } //______________________________________________________________________________ -Int_t AliRawDB::GetTotalSize() +Long64_t AliRawDB::GetTotalSize() { // Return the total size of the trees - Int_t total = 0; + Long64_t total = 0; { Int_t skey = 0; @@ -395,7 +395,7 @@ Int_t AliRawDB::GetTotalSize() TKey *key = dir->GetKey(fTree->GetName()); if (key) skey = key->GetKeylen(); } - total += skey + fTree->GetZipBytes(); + total += (Long64_t)skey + fTree->GetZipBytes(); } if(fESDTree) @@ -406,7 +406,7 @@ Int_t AliRawDB::GetTotalSize() TKey *key = dir->GetKey(fESDTree->GetName()); if (key) skey = key->GetKeylen(); } - total += skey + fESDTree->GetZipBytes(); + total += (Long64_t)skey + fESDTree->GetZipBytes(); } return total; @@ -463,7 +463,7 @@ const char *AliRawDB::GetAliRootTag() TString version = fgkAliRootTag; version.Remove(TString::kBoth,'$'); - version.ReplaceAll("Name","AliRoot version"); + version.ReplaceAll("LastChangedRevision","AliRoot version"); return version.Data(); } diff --git a/RAW/AliRawDB.h b/RAW/AliRawDB.h index 112c58fd865..58593051abf 100644 --- a/RAW/AliRawDB.h +++ b/RAW/AliRawDB.h @@ -1,6 +1,6 @@ #ifndef ALIRAWDB_H #define ALIRAWDB_H -// @(#) $Id$ +// @(#)alimdc:$Name: $:$Id$ // Author: Fons Rademakers 26/11/99 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. * @@ -51,7 +51,7 @@ public: virtual Bool_t Create(const char* fileName = NULL); virtual Int_t Close(); Int_t Fill(); - Int_t GetTotalSize(); + Long64_t GetTotalSize(); void WriteStats(AliStats* stats); diff --git a/RAW/alimdc_main.cxx b/RAW/alimdc_main.cxx index e2007dde49a..846ca09c64c 100644 --- a/RAW/alimdc_main.cxx +++ b/RAW/alimdc_main.cxx @@ -1,4 +1,4 @@ -// @(#) $Id$ +// @(#)alimdc:$Name: $:$Id$ // Author: Fons Rademakers 26/11/99 ////////////////////////////////////////////////////////////////////////// @@ -210,17 +210,17 @@ int main(int argc, char **argv) // no special arg checking so don't make errors if (argv[iarg][0] == '-') { delFiles = kTRUE; - maxFileSize = atoi(argv[iarg]+1); + maxFileSize = atoll(argv[iarg]+1); } else - maxFileSize = atoi(argv[iarg]); - if (maxFileSize < 1000 || maxFileSize > 2.e9) { + maxFileSize = atoll(argv[iarg]); + if (maxFileSize < 1000 || maxFileSize > 20.e9) { Error(argv[0], "unreasonable file size %f\n", maxFileSize); return 1; } iarg++; maxTagSize = atoi(argv[iarg]); - if (maxTagSize > 0 && (maxTagSize < 1000 || maxTagSize > 2.e9)) { + if (maxTagSize > 0 && (maxTagSize < 1000 || maxTagSize > 20.e9)) { Error(argv[0], "unreasonable tag file size %f\n", maxTagSize); return 1; } diff --git a/RAW/mdc.cxx b/RAW/mdc.cxx index b32735d69c7..07205273d76 100644 --- a/RAW/mdc.cxx +++ b/RAW/mdc.cxx @@ -51,7 +51,7 @@ int alimdcProcessEvent(void* alimdc, void* event, int isIovecArray) return ((AliMDC*)alimdc)->ProcessEvent(event, isIovecArray); } -int alimdcGetTotalFileSize(void* alimdc) +long long alimdcGetTotalFileSize(void* alimdc) { // return the total current file size diff --git a/RAW/mdc.h b/RAW/mdc.h index 1801f88aeed..37db1927ba8 100644 --- a/RAW/mdc.h +++ b/RAW/mdc.h @@ -20,7 +20,7 @@ void* alimdcCreate(int compress, int filterMode, const char* guidFileFolder); int alimdcOpen(void* alimdc, int mode, const char* fileName); int alimdcProcessEvent(void* alimdc, void* event, int isIovecArray); -int alimdcGetTotalFileSize(void* alimdc); +long long alimdcGetTotalFileSize(void* alimdc); int alimdcClose(void* alimdc); void alimdcDelete(void* alimdc); void alimdcEnableDebug(); -- 2.43.0