@@ -666,9 +666,11 @@ struct DataHeader : public BaseHeader {
666666 using SplitPayloadPartsType = uint32_t ;
667667 using PayloadSizeType = uint64_t ;
668668 using TForbitType = uint32_t ;
669+ using TFCounterType = uint32_t ;
670+ using RunNumberType = uint32_t ;
669671
670672 // static data for this header type/version
671- static constexpr uint32_t sVersion {2 };
673+ static constexpr uint32_t sVersion {3 };
672674 static constexpr o2::header::HeaderType sHeaderType {String2<uint64_t >(" DataHead" )};
673675 static constexpr o2::header::SerializationMethod sSerializationMethod {gSerializationMethodNone };
674676
@@ -711,10 +713,20 @@ struct DataHeader : public BaseHeader {
711713 // ___NEW STUFF GOES BELOW
712714
713715 // /
714- // / first orbit of time frame as unique identifier within the run
716+ // / first orbit of time frame, since v2
715717 // /
716718 TForbitType firstTForbit;
717719
720+ // /
721+ // / ever incrementing TF counter, allows to disentangle even TFs with same firstTForbit in case of replay, since v3
722+ // /
723+ TFCounterType tfCounter;
724+
725+ // /
726+ // / run number TF belongs to, since v3
727+ // /
728+ RunNumberType runNumber;
729+
718730 // ___the functions:
719731 // __________________________________________________________________________________________________
720732 constexpr DataHeader ()
@@ -726,7 +738,9 @@ struct DataHeader : public BaseHeader {
726738 subSpecification(0 ),
727739 splitPayloadIndex(0 ),
728740 payloadSize(0 ),
729- firstTForbit{0 }
741+ firstTForbit{0 },
742+ tfCounter (0 ),
743+ runNumber (0 )
730744 {
731745 }
732746
@@ -740,7 +754,9 @@ struct DataHeader : public BaseHeader {
740754 subSpecification(subspec),
741755 splitPayloadIndex(0 ),
742756 payloadSize(size),
743- firstTForbit{0 }
757+ firstTForbit{0 },
758+ tfCounter (0 ),
759+ runNumber (0 )
744760 {
745761 }
746762
@@ -754,7 +770,9 @@ struct DataHeader : public BaseHeader {
754770 subSpecification(subspec),
755771 splitPayloadIndex(partIndex),
756772 payloadSize(size),
757- firstTForbit{0 }
773+ firstTForbit{0 },
774+ tfCounter (0 ),
775+ runNumber (0 )
758776 {
759777 }
760778
@@ -808,8 +826,8 @@ static_assert(sizeof(BaseHeader) == 32,
808826 " BaseHeader struct must be of size 32" );
809827static_assert (sizeof (DataOrigin) == 4 ,
810828 " DataOrigin struct must be of size 4" );
811- static_assert (sizeof (DataHeader) == 88 ,
812- " DataHeader struct must be of size 88 " );
829+ static_assert (sizeof (DataHeader) == 96 ,
830+ " DataHeader struct must be of size 96 " );
813831static_assert (gSizeMagicString == sizeof (BaseHeader::magicStringInt),
814832 " Size mismatch in magic string union" );
815833static_assert (sizeof (BaseHeader::sMagicString ) == sizeof (BaseHeader::magicStringInt),
0 commit comments