Skip to content

Commit

Permalink
TIBlobModule: Better comments & warning message about word4 type
Browse files Browse the repository at this point in the history
  • Loading branch information
hansenjo authored and MarkKJones committed Aug 31, 2023
1 parent 2903ebd commit fd16e76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/TIBlobModule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ UInt_t TIBlobModule::LoadBank( Decoder::THaSlotData* sldat,
evtblk.push_back(p-evbuffer); // include block trailer

// Verify block trailer
if( (*p & 0xFFC00000) != (BIT(31) | (1U << 27) | (fSlot & 0x1F) << 22) ) {
if( (*p & 0xFFC00000) != (BIT(31) | (kBlockTrailer << 27) | (fSlot & 0x1F) << 22) ) {
cerr << Here(here) << "Warning: Missing block trailer" << endl;
}
UInt_t nwords_inblock = *p & 0x3FFFFF;
Expand Down Expand Up @@ -437,8 +437,12 @@ void TIBlobModule::Clear(const Option_t* opt)
//_____________________________________________________________________________
void TIBlobModule::SetWord4Type( UInt_t type )
{
if( type != 0 && type != kCounterBits && type != kTriggerBits )
if( type != 0 && type != kCounterBits && type != kTriggerBits ) {
Warning( "TIBlobModule::SetWord4Type",
"Unsupported type for 3rd/4th data word: %u. "
"Check configuration string in crate map.", type);
return;
}
fWord4Type = type;
}

Expand Down
2 changes: 2 additions & 0 deletions src/TIBlobModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class TIBlobModule : public PipeliningModule {
// bits or the trigger bit pattern word, but not both. This case cannot
// be unambiguously decoded automatically.
// Values can be 0 = automatic, kCounterBits, or kTriggerBits.
// If this data word represents counter bits, this flag should be set via
// a configuration string (see Init()).
void SetWord4Type( UInt_t type );

protected:
Expand Down

0 comments on commit fd16e76

Please sign in to comment.