1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.1 2007/02/20 15:57:00 decaro
19 Raw data update: to read the TOF raw data defined in UNPACKED mode
21 Revision 0.1 2006/12/15 A.De Caro
25 //////////////////////////////////////////////////////
27 // This class provides the TOF raw data object //
29 //////////////////////////////////////////////////////
33 #include "AliTOFGeometry.h"
34 #include "AliTOFrawData.h"
36 ClassImp(AliTOFrawData)
38 //_____________________________________________________________________________
39 AliTOFrawData::AliTOFrawData() :
58 //_____________________________________________________________________________
59 AliTOFrawData::AliTOFrawData(Int_t a, Int_t b, Int_t c, Int_t d, Float_t e,
60 Float_t f, Int_t g, Int_t h, Int_t l) :
79 //_____________________________________________________________________________
80 AliTOFrawData::AliTOFrawData(Int_t a, Int_t b, Int_t c, Int_t d, Float_t e,
81 Float_t f, Float_t ee, Float_t ff, Int_t g, Int_t h, Int_t l) :
100 //_____________________________________________________________________________
101 AliTOFrawData::AliTOFrawData(const AliTOFrawData& r) :
116 // dummy copy constructor
118 fACQflag = r.fACQflag;
121 fTRMchain = r.fTRMchain;
123 fTDCchannel = r.fTDCchannel;
124 fLeading = r.fLeading;
125 fTrailing = r.fTrailing;
132 //_____________________________________________________________________________
133 AliTOFrawData& AliTOFrawData::operator=(const AliTOFrawData& r)
136 // dummy assignment operator
138 this->fACQflag = r.fACQflag;
139 this->fPSbit = r.fPSbit;
141 this->fTRMchain = r.fTRMchain;
143 this->fTDCchannel = r.fTDCchannel;
144 this->fLeading = r.fLeading;
145 this->fTrailing = r.fTrailing;
147 this->fTime = r.fTime;
148 this->fError = r.fError;
153 //_____________________________________________________________________________
154 void AliTOFrawData::Update(Float_t tof, Float_t tot, Float_t leading, Float_t trailing, Int_t psBit, Int_t acq, Int_t errorFlag)
157 // To update a raw data object:
158 // if there is just a leading edge measurement,
159 // this method adds the trailing edge measurement
160 // to evaluate the time-of-flight and time-over-threshold measurements
163 AliDebug(2,Form(" %10.0f %10.0f %10.0f %1i %1i %1i",tof, tot, leading, psBit, acq, errorFlag));
165 if (fLeading!=-1 && fTime==-1 && fToT==-1 && trailing!=-1) {
167 fTrailing = trailing;
169 fToT = Int_t((trailing - fLeading)*AliTOFGeometry::TdcBinWidth()/AliTOFGeometry::ToTBinWidth());
173 else if (fLeading!=-1 && fTime==-1 && fToT==-1 && leading==-1 && trailing!=-1) {
176 fToT = Int_t((trailing - fLeading)*AliTOFGeometry::TdcBinWidth()/AliTOFGeometry::ToTBinWidth());