]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
returning the number of clusters extracted from the block and added an optional info...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Oct 2011 07:40:46 +0000 (07:40 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Oct 2011 07:40:46 +0000 (07:40 +0000)
HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.cxx
HLT/TPCLib/comp/AliHLTTPCDataCompressionDecoder.h

index 7bd801076307b2d22f1805c638072993b7609b4f..9d1305af2b5608720ae441682f3bdfbea7b14cd2 100644 (file)
@@ -30,6 +30,7 @@
 ClassImp(AliHLTTPCDataCompressionDecoder)
 
 AliHLTTPCDataCompressionDecoder::AliHLTTPCDataCompressionDecoder()
+  : fVerbosity(0)
 {
   /// constructor
 }
index a2b8aa71d9dba8517f319d063bfe0b5c2c46dd65..86459ad0681245b71b9f5f01d460d48381279493 100644 (file)
@@ -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<typename T>
@@ -442,7 +446,11 @@ int AliHLTTPCDataCompressionDecoder::ReadClustersPartition(T& c, const AliHLTUIn
   const AliHLTTPCRawClusterData* clusterData = reinterpret_cast<const AliHLTTPCRawClusterData*>(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