Adding missing methods to fetch the data blocks creation time stamp.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Jul 2011 01:46:23 +0000 (01:46 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Jul 2011 01:46:23 +0000 (01:46 +0000)
HLT/BASE/HOMER/AliHLTHOMERReader.cxx
HLT/BASE/HOMER/AliHLTHOMERReader.h

index 4cd5e36..e125811 100644 (file)
@@ -500,6 +500,22 @@ homer_uint32 AliHLTHOMERReader::GetBlockDataSpec( unsigned long ndx ) const
     return (homer_uint32)*(((homer_uint64*)fBlocks[ndx].fMetaData)+kSubType2_64b_Offset);
     }
 
+homer_uint64 AliHLTHOMERReader::GetBlockBirthSeconds( unsigned long ndx ) const
+    {
+// see header file for class documentation
+    if ( ndx >= fBlockCnt )
+       return 0;
+    return *(((homer_uint64*)fBlocks[ndx].fMetaData)+kBirth_s_64b_Offset);
+    }
+
+homer_uint64 AliHLTHOMERReader::GetBlockBirthMicroSeconds( unsigned long ndx ) const
+    {
+// see header file for class documentation
+    if ( ndx >= fBlockCnt )
+       return 0;
+    return *(((homer_uint64*)fBlocks[ndx].fMetaData)+kBirth_us_64b_Offset);
+    }
+
 /* Find the next data block in the current event with the given
    data type, origin, and specification. Returns the block's 
    index. */
index 8362d52..f02c5d6 100644 (file)
@@ -235,6 +235,16 @@ class AliHLTHOMERReader: public AliHLTMonitoringReader, public TObject
           block with the given block index (starting at 0). */
        homer_uint32 GetBlockDataSpec( unsigned long ndx ) const;
 
+       /** Return the time stamp of when the data block was created.
+          This is a UNIX time stamp in seconds.
+          \param ndx  The index of the block (starting at 0). */
+       homer_uint64 GetBlockBirthSeconds( unsigned long ndx ) const;
+
+       /** Return the micro seconds part of the time stamp of when the data
+          block was created.
+          \param ndx  The index of the block (starting at 0). */
+       homer_uint64 GetBlockBirthMicroSeconds( unsigned long ndx ) const;
+
        /** Find the next data block in the current event with the given
           data type, origin, and specification. Returns the block's 
           index. */