/*
$Log$
+Revision 1.2 2007/03/28 10:50:33 decaro
+Rounding off problem in rawData coding/decoding: solved
+
+Revision 1.1 2007/02/20 15:57:00 decaro
+Raw data update: to read the TOF raw data defined in UNPACKED mode
+
Revision 0.1 2006/12/15 A.De Caro
Introuction
*/
fTrailing(-1),
fToT(-1),
fTime(-1),
- fError(-1)
+ fError(-1),
+ fDeltaBC(-1),
+ fL0L1Latency(-1)
{
// default ctr
fTrailing(-1),
fToT(f),
fTime(e),
- fError(l)
+ fError(l),
+ fDeltaBC(0),
+ fL0L1Latency(0)
{
// ctr
//_____________________________________________________________________________
AliTOFrawData::AliTOFrawData(Int_t a, Int_t b, Int_t c, Int_t d, Int_t e,
- Int_t f, Float_t ee, Float_t ff, Int_t g, Int_t h, Int_t l) :
+ Int_t f, Int_t ee, Int_t ff, Int_t g, Int_t h, Int_t l, Int_t deltaBC, Int_t l0l1) :
TObject(),
fACQflag(h),
fPSbit(g),
fTrailing(ff),
fToT(f),
fTime(e),
- fError(l)
+ fError(l),
+ fDeltaBC(deltaBC),
+ fL0L1Latency(l0l1)
{
// ctr
-
+ if (fTime==-1) fTime = fLeading;
}
//_____________________________________________________________________________
fTrailing(-1),
fToT(-1),
fTime(-1),
- fError(-1)
+ fError(-1),
+ fDeltaBC(-1),
+ fL0L1Latency(-1)
{
// dummy copy constructor
fToT = r.fToT;
fTime = r.fTime;
fError = r.fError;
+ fDeltaBC = r.fDeltaBC;
+ fL0L1Latency = r.fL0L1Latency;
}
this->fToT = r.fToT;
this->fTime = r.fTime;
this->fError = r.fError;
+ this->fDeltaBC = r.fDeltaBC;
+ this->fL0L1Latency = r.fL0L1Latency;
return *this;
}
//_____________________________________________________________________________
-void AliTOFrawData::Update(Float_t tof, Float_t tot, Float_t leading, Float_t trailing, Int_t psBit, Int_t acq, Int_t errorFlag)
+void AliTOFrawData::Update(Int_t tof, Int_t tot, Int_t leading, Int_t trailing, Int_t psBit, Int_t acq, Int_t errorFlag)
{
//
// To update a raw data object:
// to evaluate the time-of-flight and time-over-threshold measurements
//
- AliDebug(2,Form(" %10.0f %10.0f %10.0f %1i %1i %1i",tof, tot, leading, psBit, acq, errorFlag));
+ AliDebug(2,Form(" %d %d %d %d %d %d",tof, tot, leading, psBit, acq, errorFlag));
- if (fLeading!=-1 && fTime==-1 && fToT==-1 && trailing!=-1) {
+ if (fLeading!=-1 /*&& fTime==-1*/ && fToT==-1 && trailing!=-1) { // adc
fTrailing = trailing;
fTime = fLeading;
fToT = Int_t((trailing - fLeading)*AliTOFGeometry::TdcBinWidth()/AliTOFGeometry::ToTBinWidth());
}
- /*
- else if (fLeading!=-1 && fTime==-1 && fToT==-1 && leading==-1 && trailing!=-1) {
- fTime = fLeading;
- fToT = Int_t((trailing - fLeading)*AliTOFGeometry::TdcBinWidth()/AliTOFGeometry::ToTBinWidth());
-
- }
- */
+}
+
+//_____________________________________________________________________________
+Int_t AliTOFrawData::GetTOT() const
+{
+ //
+ // Return the TOT measurement
+ //
+
+ Int_t dummyToT = 0;
+ if (fLeading!=-1 && fToT==-1) dummyToT = 0;
+ else dummyToT = fToT;
+
+ return dummyToT;
}