]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/MUON/AliHLTMUONMansoCandidatesBlockStruct.cxx
fix minor bug: add task argument was not passed to tak
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONMansoCandidatesBlockStruct.cxx
index 8d9bddd614f1886f33b4ab925a16b6d1617308a9..5319264dbe52b90daefb562afe90862ba6c13082 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
+// $Id$
 
 /**
  * @file   AliHLTMUONMansoCandidatesBlockStruct.cxx
  * @author Artur Szostak <artursz@iafrica.com>
- * @date   
+ * @date   21 May 2007
  * @brief  Implementation of useful stream and comparison operators.
  */
 
@@ -49,6 +49,8 @@ std::ostream& operator << (
                << ", fRoI[1] = " << candidate.fRoI[1]
                << ", fRoI[2] = " << candidate.fRoI[2]
                << ", fRoI[3] = " << candidate.fRoI[3]
+               << ", fZmiddle = " << candidate.fZmiddle
+               << ", fBl = " << candidate.fBl
                << "}";
        return stream;
 }
@@ -61,10 +63,12 @@ std::ostream& operator << (
 {
        assert( AliHLTMUONUtils::IntegrityOk(block) );
 
+       const AliHLTMUONMansoCandidateStruct* candidate =
+               reinterpret_cast<const AliHLTMUONMansoCandidateStruct*>(&block + 1);
        stream  << "{fHeader = " << block.fHeader << ", fCandidate[] = [";
-       if (block.fHeader.fNrecords > 0) stream << block.fCandidate[0];
+       if (block.fHeader.fNrecords > 0) stream << candidate[0];
        for (AliHLTUInt32_t i = 1; i < block.fHeader.fNrecords; i++)
-               stream << ", " << block.fCandidate[i];
+               stream << ", " << candidate[i];
        stream << "]}";
        return stream;
 }
@@ -77,12 +81,17 @@ bool operator == (
 {
        assert( AliHLTMUONUtils::IntegrityOk(a) );
        assert( AliHLTMUONUtils::IntegrityOk(b) );
+       
+       const AliHLTMUONMansoCandidateStruct* candidateA =
+               reinterpret_cast<const AliHLTMUONMansoCandidateStruct*>(&a + 1);
+       const AliHLTMUONMansoCandidateStruct* candidateB =
+               reinterpret_cast<const AliHLTMUONMansoCandidateStruct*>(&b + 1);
 
        // First check if the blocks have the same header. If they do then check
        // if every track candidate is the same. In either case if we find a
        // difference return false.
        if (a.fHeader != b.fHeader) return false;
        for (AliHLTUInt32_t i = 0; i < a.fHeader.fNrecords; i++)
-               if (a.fCandidate[i] != b.fCandidate[i]) return false;
+               if (candidateA[i] != candidateB[i]) return false;
        return true;
 }