**************************************************************************/
/* $Id$ */
-
+
#include "AliMUONBusStruct.h"
-#include "AliLog.h"
+#include "AliLog.h"
+#include <Riostream.h>
+#include <string.h>
+//-----------------------------------------------------------------------------
/// \class AliMUONBusStruct
/// Bus patch structure for tracker raw data
/// each Dsp contains at most 5 bus patch structure
/// 12 bits for charge)
///
/// \author Christian Finck
+//-----------------------------------------------------------------------------
/// \cond CLASSIMP
ClassImp(AliMUONBusStruct)
const Int_t AliMUONBusStruct::fgkHeaderLength = 4;
const UInt_t AliMUONBusStruct::fgkDefaultDataKey = 0xB000000B;
+const Int_t AliMUONBusStruct::fgkManuNofChannels(64);
//___________________________________________
AliMUONBusStruct::AliMUONBusStruct()
fTotalLength(0),
fLength(0),
fBusPatchId(0),
- fBufSize(43*64),
+fBufSize(43*fgkManuNofChannels),
/* assuming 43 manus max per bustpatch.
Anyway fData is resized where needed (though it makes it slower) */
fData(new UInt_t[fBufSize]),
/// In case of resizing the vector
/// the most simplest way to do it
///
- AliInfo("reallocating");
if (size == 0)
fBufSize *= 2;
else
/// clear
/// delete the allocated memory
///
- AliInfo("here");
delete[] fData;
}
//___________________________________________
}
//___________________________________________
-Char_t AliMUONBusStruct::GetChannelId(Int_t n) const
+UChar_t AliMUONBusStruct::GetChannelId(Int_t n) const
{
///
/// get channel Id
AliError("Index outside limits.");
return 0;
}
+
+//___________________________________________
+void AliMUONBusStruct::Print(Option_t* opt) const
+{
+ /// print out
+
+ cout << "Bus patch info" << endl;
+ cout << "DataKey: " << fDataKey << endl;
+ cout << "fTotalLength: " << fTotalLength << endl;
+ cout << "fLength: " << fLength << endl;
+ cout << "fBusPatchId: " << fBusPatchId << endl;
+ cout << "fBufSize: " << fBufSize << endl;
+
+ if (strstr(opt, "all")) {
+ for (Int_t i = 0; i <fLength; ++i)
+ cout << "Data["<< i << "] = " << fData[i] << endl;
+ }
+}
+
+