UInt_t mcmno, chno;
UInt_t adc;
Int_t det, smn, irow, icol;
+ Int_t parity;
const Int_t kMaxBus = 50;
Int_t totPatchBus, bPatchBus, ePatchBus;
AliBitPacking::PackWord(chno,baseword,12,17);
AliBitPacking::PackWord(mcmno,baseword,18,28);
AliBitPacking::PackWord(0,baseword,29,30);
- AliBitPacking::PackWord(1,baseword,31,31);
+ parity = ComputeParity(baseword); // generate the parity bit
+ AliBitPacking::PackWord(parity,baseword,31,31);
Int_t jj = contentsBus[busno];
busPatch[busno][jj] = baseword;
}
//____________________________________________________________________________
+Int_t AliPMDDDLRawData::ComputeParity(UInt_t baseword)
+{
+ // Generate the parity bit
+
+ Int_t count = 0;
+ for(Int_t j=0; j<29; j++)
+ {
+ if (baseword & 0x01 ) count++;
+ baseword >>= 1;
+ }
+ Int_t parity = count%2;
+ return parity;
+}
+
+//____________________________________________________________________________
+
Int_t *endRowBus, Int_t *endColBus,
Int_t & busno, UInt_t &mcmno, UInt_t &chno);
+
protected:
+ Int_t ComputeParity(UInt_t baseword);
+
TClonesArray *fDigits; //! List of digits
- // AliPMDdigit *fPMDdigit; //! Pointer to digits
- ClassDef(AliPMDDDLRawData,6) // To make RAW Data
+ ClassDef(AliPMDDDLRawData,7) // To make RAW Data
};
#endif
Int_t iddl = fRawReader->GetDDLID();
Int_t dataSize = fRawReader->GetDataSize();
Int_t totaldataword = dataSize/4;
- Int_t equipId = fRawReader->GetEquipmentId();
if (dataSize <= 0) return kFALSE;
if (indexDDL != iddl)
const Int_t kdspHLen = dspHeader.GetHeaderLength();
const Int_t kpbusHLen = pbusHeader.GetHeaderLength();
-
+ Int_t parity;
Int_t idet, ismn;
Int_t irow = -1;
Int_t icol = -1;
Int_t imcm = (data >> 18) & 0x07FF;
Int_t ibit = (data >> 31) & 0x0001;
+ parity = ComputeParity(data);
+ if (ibit != parity)
+ {
+ AliWarning("ComputeParity:: Parity Error");
+ }
GetRowCol(iddl, pbusid, imcm, ich,
startRowBus, endRowBus,
startColBus, endColBus,
row = irownew;
col = icolnew;
}
+
+//_____________________________________________________________________________
+
+int AliPMDRawStream::ComputeParity(Int_t data)
+{
+// Calculate the parity bit
+
+ Int_t count = 0;
+ for(Int_t j = 0; j<29; j++)
+ {
+ if (data & 0x01 ) count++;
+ data >>= 1;
+ }
+
+ Int_t parity = count%2;
+
+ return parity;
+}
+
//_____________________________________________________________________________
void ConvertDDL2SMN(Int_t iddl, Int_t imodule,
Int_t &smn, Int_t &detector) const;
void TransformH2S(Int_t smn, Int_t &row, Int_t &col) const;
+ int ComputeParity(Int_t data);
AliRawReader* fRawReader; // object for reading the raw data
#pragma link C++ class AliPMDClusteringV1+;
#pragma link C++ class AliPMDClusteringV2+;
#pragma link C++ class AliPMDclupid+;
+#pragma link C++ class AliPMDcludata+;
#pragma link C++ class AliPMDDiscriminator+;
#pragma link C++ class AliPMDEmpDiscriminator+;
#pragma link C++ class AliPMDClusterFinder+;
#-*- Mode: Makefile -*-
# $Id$
-SRCS:= AliPMDRecPoint.cxx AliPMDUtility.cxx AliPMDrecpoint1.cxx AliPMDrechit.cxx AliPMDcluster.cxx AliPMDClusteringV1.cxx AliPMDClusteringV2.cxx AliPMDclupid.cxx AliPMDEmpDiscriminator.cxx AliPMDClusterFinder.cxx AliPMDtracker.cxx AliPMDReconstructor.cxx
+SRCS:= AliPMDRecPoint.cxx AliPMDUtility.cxx AliPMDrecpoint1.cxx AliPMDrechit.cxx AliPMDcluster.cxx AliPMDClusteringV1.cxx AliPMDClusteringV2.cxx AliPMDclupid.cxx AliPMDEmpDiscriminator.cxx AliPMDClusterFinder.cxx AliPMDtracker.cxx AliPMDReconstructor.cxx AliPMDcludata.cxx
-HDRS:= $(SRCS:.cxx=.h) AliPMDClustering.h AliPMDDiscriminator.h
+HDRS:= $(SRCS:.cxx=.h) AliPMDClustering.h AliPMDDiscriminator.h AliPMDcludata.h
DHDR:=PMDrecLinkDef.h