]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/MUON/AliHLTMUONDataBlockReader.h
Disable retireval of DCS data points from AliShuttle for SDD
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONDataBlockReader.h
index 5b69058aa854d00e6ac81166f79d198d1d65af5e..1b8b435eff506fe98bfdf270931445392ccc2c05 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
+// $Id$
 
 /**
  * @file   AliHLTMUONDataBlockReader.h
  * @author Artur Szostak <artursz@iafrica.com>
- * @date   
+ * @date   19 May 2007
  * @brief  Definition of a reader class for internal dimuon HLT raw data blocks.
  */
 
 
 #include "AliHLTMUONTriggerRecordsBlockStruct.h"
 #include "AliHLTMUONTrigRecsDebugBlockStruct.h"
-#include "AliHLTMUONTriggerChannelsBlockStruct.h"
 #include "AliHLTMUONRecHitsBlockStruct.h"
 #include "AliHLTMUONClustersBlockStruct.h"
 #include "AliHLTMUONChannelsBlockStruct.h"
 #include "AliHLTMUONMansoTracksBlockStruct.h"
 #include "AliHLTMUONMansoCandidatesBlockStruct.h"
+#include "AliHLTMUONTracksBlockStruct.h"
 #include "AliHLTMUONSinglesDecisionBlockStruct.h"
 #include "AliHLTMUONPairsDecisionBlockStruct.h"
 
@@ -45,7 +45,7 @@
  * stored in memory and the size of the data block is given by the variable 'size'.
  * The data block is of type 'block_type' and the data block entries are of type
  * 'entries_type'. The data block can be accessed in the following way:
- *
+ * \code
  *   void* buffer = somebuffer;
  *   AliHLTUInt32_t size = somebuffer_size;
  *   
@@ -67,6 +67,7 @@
  *      const entries_type& entry = block[i];
  *      // Do something with the entry...
  *   }
+ * \endcode
  */
 template <class DataBlockType, class DataElementType>
 class AliHLTMUONDataBlockReader
@@ -90,6 +91,31 @@ public:
        {
                assert( buffer != NULL );
        }
+       
+       /**
+        * Copy constructor that performs a shallow copy.
+        * Since this class does not take direct ownership of the buffer, never
+        * allocates or deallocates memory, this can be allowed.
+        */
+       AliHLTMUONDataBlockReader(const AliHLTMUONDataBlockReader& reader)
+       {
+               fSize = reader.fSize;
+               fBlock = reader.fBlock;
+               fData = reader.fData;
+       }
+       
+       /**
+        * Assignment operator performs a shallow copy.
+        * This is OK because this class does not take direct ownership of the
+        * output memory buffer.
+        */
+       AliHLTMUONDataBlockReader& operator = (const AliHLTMUONDataBlockReader& reader)
+       {
+               fSize = reader.fSize;
+               fBlock = reader.fBlock;
+               fData = reader.fData;
+               return *this;
+       }
 
        /**
         * Checks that the size of the buffer storing the data block is correct.
@@ -169,11 +195,11 @@ public:
         */
        AliHLTUInt32_t BytesUsed() const
        {
-               assert( sizeof(DataElementType) == fBlock->fHeader.fRecordWidth);
+               assert( sizeof(DataElementType) == fBlock->fHeader.fRecordWidth);
                return sizeof(DataBlockType) + Nentries() * sizeof(DataElementType);
        }
 
-       AliHLTUInt32_t BufferSize() { return fSize; }
+       AliHLTUInt32_t BufferSize() const { return fSize; }
        
 private:
 
@@ -196,11 +222,6 @@ typedef AliHLTMUONDataBlockReader<
                AliHLTMUONTrigRecInfoStruct
        > AliHLTMUONTrigRecsDebugBlockReader;
 
-typedef AliHLTMUONDataBlockReader<
-               AliHLTMUONTriggerChannelsBlockStruct,
-               AliHLTMUONTriggerChannelStruct
-       > AliHLTMUONTriggerChannelsBlockReader;
-
 typedef AliHLTMUONDataBlockReader<
                AliHLTMUONRecHitsBlockStruct,
                AliHLTMUONRecHitStruct
@@ -226,6 +247,11 @@ typedef AliHLTMUONDataBlockReader<
                AliHLTMUONMansoCandidateStruct
        > AliHLTMUONMansoCandidatesBlockReader;
 
+typedef AliHLTMUONDataBlockReader<
+               AliHLTMUONTracksBlockStruct,
+               AliHLTMUONTrackStruct
+       > AliHLTMUONTracksBlockReader;
+
 typedef AliHLTMUONDataBlockReader<
                AliHLTMUONSinglesDecisionBlockStruct,
                AliHLTMUONTrackDecisionStruct