]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
minor code cleanup to prepare renaming of methods to better fit the actual functionality
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 Dec 2012 08:44:30 +0000 (08:44 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 Dec 2012 08:44:30 +0000 (08:44 +0000)
HLT/TPCLib/AliHLTTPCClusterAccessHLTOUT.cxx
HLT/TPCLib/AliHLTTPCClusterAccessHLTOUT.h

index 819dae5b41f60f015a9938bd399b117a75b26882..41bd0c9ed7c2944548cd1594cd6d844697c82b51 100644 (file)
@@ -435,7 +435,7 @@ AliHLTTPCClusterAccessHLTOUT::AliRawClusterContainer::~AliRawClusterContainer()
   }
 }
 
-AliHLTTPCClusterAccessHLTOUT::AliRawClusterContainer::iterator& AliHLTTPCClusterAccessHLTOUT::AliRawClusterContainer::BeginRemainingClusterBlock(int count, AliHLTUInt32_t specification)
+AliHLTTPCClusterAccessHLTOUT::AliRawClusterContainer::iterator& AliHLTTPCClusterAccessHLTOUT::AliRawClusterContainer::BeginPartitionClusterBlock(int count, AliHLTUInt32_t specification)
 {
   /// iterator of remaining clusters block of specification
 
index c08b3db040d8d1899cfa29e710c100d367deb437..25af8a3d4fe60a92594f0f7ef2106ddf46e4388c 100644 (file)
@@ -128,7 +128,7 @@ class AliHLTTPCClusterAccessHLTOUT : public TObject
    * @class AliRawClusterContainer
    * Cluster read interface for offline.
    * The class implements the interface to be used in the decoding
-   * of compressed TPC data.
+   * of compressed TPC data. The container handles 
    */
   class AliRawClusterContainer {
   public:
@@ -159,6 +159,13 @@ class AliHLTTPCClusterAccessHLTOUT : public TObject
       void SetSigmaZ2(float sigmaZ2)   {if (fEntry ) fEntry->fCluster.SetSigmaZ2(sigmaZ2);}
       void SetCharge(unsigned charge)  {if (fEntry ) fEntry->fCluster.SetCharge(charge);}
       void SetQMax(unsigned qmax)      {if (fEntry ) fEntry->fCluster.SetQMax(qmax);}
+      iterator& operator=(const AliHLTTPCRawCluster& rawcluster) {if (fEntry ) {
+         memcpy(&fEntry->fCluster, &rawcluster, sizeof(AliHLTTPCRawCluster));
+         // Note: offline code uses a different convention for row offset than the online code
+         // Online: first row of readout partition
+         // Offline: first row of readout chamber(inner: partition 0-1; outer: 2-5 
+         fEntry->fCluster.fPadRow-=fRowOffset;
+       } return *this;}
       void SetMC(const AliHLTTPCClusterMCLabel* pMC) {
        if (fEntry && pMC ) fEntry->fMC=*pMC;
       }
@@ -176,8 +183,12 @@ class AliHLTTPCClusterAccessHLTOUT : public TObject
       int fRowOffset;  //! row offset for current partition      
     };
 
-    /// iterator of remaining clusters block of specification
-    iterator& BeginRemainingClusterBlock(int count, AliHLTUInt32_t specification);
+    /// legacy, to be removed later
+    iterator& BeginRemainingClusterBlock(int count, AliHLTUInt32_t specification) {
+      return BeginPartitionClusterBlock(count, specification);
+    }
+    /// iterator of partition clusters block of specification
+    iterator& BeginPartitionClusterBlock(int count, AliHLTUInt32_t specification);
     /// iterator of track model clusters
     iterator& BeginTrackModelClusterBlock(int count);