fTotalLength(0),
fLength(0),
fBusPatchId(0),
- fBufSize(1024),
+ fBufSize(43*64),
+ /* assuming 43 manus max per bustpatch.
+ Anyway fData is resized where needed (though it makes it slower) */
+ fData(new UInt_t[fBufSize]),
fDspId(0),
fBlkId(0)
{
//
// ctor
//
- fData = new UInt_t[fBufSize];
+
}
//___________________________________________
AliMUONBusStruct::~AliMUONBusStruct()
void AliMUONBusStruct::SetAlloc(Int_t size)
{
//
- // Allocate size per default 1024;
- // return if size < 1024
+ // Allocate size
+ // return if size < fBufSize
//
if (size < fBufSize)
return;
// In case of resizing the vector
// the most simplest way to do it
//
+ AliInfo("reallocating");
if (size == 0)
fBufSize *= 2;
else
}
//___________________________________________
AliMUONBusStruct::
-AliMUONBusStruct(const AliMUONBusStruct& event): TObject(event)
+AliMUONBusStruct(const AliMUONBusStruct& event)
+ : TObject(event),
+ fDataKey(event.fDataKey),
+ fTotalLength(event.fTotalLength),
+ fLength(event.fLength),
+ fBusPatchId(event.fBusPatchId),
+ fBufSize(event.fBufSize),
+ fData(new UInt_t[event.fBufSize]),
+ fDspId(event.fDspId),
+ fBlkId(event.fBlkId)
{
//
// copy ctor
//
- fDataKey = event.fDataKey;
- fTotalLength = event.fTotalLength;
- fLength = event.fLength;
- fBusPatchId = event.fBusPatchId;
- fBufSize = event.fBufSize;
- fBlkId = event.fBlkId;
- fDspId = event.fDspId;
-
- fData = new UInt_t[event.fBufSize];
for (int i = 0; i < event.fBufSize; i++)
fData[i] = event.fData[i];
}
// clear
// delete the allocated memory
//
-
+ AliInfo("here");
delete[] fData;
}
//___________________________________________
//
// get parity
//
- if ( n>=0 && n<fLength ) return (Char_t)(fData[n] >> 29) & 0x7;
+ if ( n>=0 && n<fLength ) return (Char_t)(fData[n] >> 31) & 0x1;
AliError("Index outside limits.");
return 0;