From: richterm Date: Thu, 27 Oct 2011 07:40:46 +0000 (+0000) Subject: returning the number of clusters extracted from the block and added an optional info... X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=f2cfbdd1fc50955afe44e9340c6a9e03701890ff;p=u%2Fmrichter%2FAliRoot.git returning the number of clusters extracted from the block and added an optional info message steered vis verbosity member; no functional change --- diff --git a/HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.cxx b/HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.cxx index 7bd80107630..9d1305af2b5 100644 --- a/HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.cxx +++ b/HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.cxx @@ -30,6 +30,7 @@ ClassImp(AliHLTTPCDataCompressionDecoder) AliHLTTPCDataCompressionDecoder::AliHLTTPCDataCompressionDecoder() + : fVerbosity(0) { /// constructor } diff --git a/HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.h b/HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.h index a2b8aa71d9d..86459ad0681 100644 --- a/HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.h +++ b/HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.h @@ -49,8 +49,11 @@ class AliHLTTPCDataCompressionDecoder : public AliHLTLogging { AliHLTDataInflater* CreateInflater(int deflater, int mode) const; + void SetVerbosity(int verbosity) {fVerbosity=verbosity;} protected: private: + int fVerbosity; //! verbosity level + ClassDef(AliHLTTPCDataCompressionDecoder, 0) }; @@ -199,7 +202,8 @@ int AliHLTTPCDataCompressionDecoder::ReadRemainingClustersCompressed(T& c, AliHL HLTError("error reading compressed cluster format of block 0x%08x: expected %d, read only %d cluster(s)", specification, nofClusters, outClusterCnt); return -EPROTO; } - return iResult; + if (iResult<0) return iResult; + return nofClusters; } template @@ -442,7 +446,11 @@ int AliHLTTPCDataCompressionDecoder::ReadClustersPartition(T& c, const AliHLTUIn const AliHLTTPCRawClusterData* clusterData = reinterpret_cast(pData); Int_t nCount = (Int_t) clusterData->fCount; if (clusterData->fVersion!=0) { - return ReadRemainingClustersCompressed(c, pData, dataSize, specification); + int iResult=ReadRemainingClustersCompressed(c, pData, dataSize, specification); + if (iResult>=0 && fVerbosity>0) { + HLTInfo("extracted %d cluster(s) from block 0x%08x", iResult, specification); + } + return iResult; } if (nCount*sizeof(AliHLTTPCRawCluster) + sizeof(AliHLTTPCRawClusterData) != dataSize) return -EBADF; AliHLTUInt8_t slice = AliHLTTPCDefinitions::GetMinSliceNr(specification); @@ -459,6 +467,6 @@ int AliHLTTPCDataCompressionDecoder::ReadClustersPartition(T& c, const AliHLTUIn c.SetCharge(clusters[i].GetCharge()); c.SetQMax(clusters[i].GetQMax()); } - return 0; + return nCount; } #endif