-// @(#)alimdc:$Name$:$Id$
+// @(#)alimdc:$Name: $:$Id$
// Author: Fons Rademakers 26/11/99
// Updated: Dario Favretto 15/04/2003
// 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
}
// Create the guid files folder if it does not exist
- if (fGuidFileFolder) {
+ if (!fGuidFileFolder.IsNull()) {
gSystem->ResetErrno();
- gSystem->MakeDirectory(fGuidFileFolder);
+ gSystem->MakeDirectory(fGuidFileFolder.Data());
if (gSystem->GetErrno() && gSystem->GetErrno() != EEXIST) {
- SysError("AliMDC", "mkdir %s", fGuidFileFolder);
+ SysError("AliMDC", "mkdir %s", fGuidFileFolder.Data());
}
}
// 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();
+ AliDebug(1,Form("current file size is %lld bytes",currentFileSize));
if(currentFileSize > kFileSizeErrorLevel) {
- Error("ProcessEvent", "file size (%u) exceeds the limit "
+ Error("ProcessEvent", "file size (%lu) exceeds the limit "
, currentFileSize);
return kErrFileSize;
}
// Create Tag DB here only after the raw data header
// version was already identified
if (!fIsTagDBCreated) {
- if (fFileNameTagDB) {
+ if (!fFileNameTagDB.IsNull()) {
if (fMaxSizeTagDB > 0) {
fTagDB = new AliTagDB(fEventTag, NULL);
fTagDB->SetMaxSize(fMaxSizeTagDB);
- fTagDB->SetFS(fFileNameTagDB);
+ fTagDB->SetFS(fFileNameTagDB.Data());
if (!fTagDB->Create()) return kErrTagFile;
} else {
- fTagDB = new AliTagDB(fEventTag, fFileNameTagDB);
+ fTagDB = new AliTagDB(fEventTag, fFileNameTagDB.Data());
if (fTagDB->IsZombie()) return kErrTagFile;
}
}
}
//______________________________________________________________________________
-Int_t AliMDC::GetTotalSize()
+Long64_t AliMDC::GetTotalSize()
{
// return the total current raw DB file size
}
//______________________________________________________________________________
-Int_t AliMDC::Close()
+Long64_t AliMDC::Close()
{
// close the current raw DB file
if (!fRawDB) return -1;
fRawDB->WriteStats(fStats);
- Int_t filesize = fRawDB->Close();
+ Long64_t filesize = fRawDB->Close();
delete fRawDB;
fRawDB = NULL;
delete fStats;
eventSize = 2 * hdr->GetEventSize();
event = new char[eventSize];
}
- memcpy(event, hdr->HeaderBaseBegin(), hdr->HeaderBaseSize());
+ memcpy(event, header.HeaderBaseBegin(), header.HeaderBaseSize());
memcpy(event+hdr->HeaderBaseSize(), hdr->HeaderBegin(), hdr->HeaderSize());
if (hdr->GetExtendedDataSize() != 0)
memcpy(event+hdr->HeaderBaseSize()+hdr->HeaderSize(),