Skip to content

Commit

Permalink
Merge pull request #19804 from matz-e/fix-hcal-tp-packing-soi
Browse files Browse the repository at this point in the history
Set the SOI for HCAL TP samples when packing.
  • Loading branch information
cmsbuild committed Jul 25, 2017
2 parents 9acf4bb + 51d7216 commit 673fc62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion EventFilter/HcalRawToDigi/plugins/PackerHelp.h
Expand Up @@ -144,6 +144,8 @@ namespace TPHeaderSpec{
static const int MASK_FLAVOR = 0x7;
static const int OFFSET_HEADER_BIT = 15;
static const int MASK_HEADER_BIT = 0x1;
static const int OFFSET_SOI_BIT = 14;
static const int MASK_SOI_BIT = 0x1;
}

namespace QIE8SampleSpec{
Expand Down Expand Up @@ -549,7 +551,11 @@ class UHTRpacker{
// loop over words in dataframe
for( int iTS = 0 ; iTS < qiedf->size() ; iTS++ ){
// push data into uhtr data container
uhtrs[uhtrIndex].push_back(qiedf->sample(iTS).raw());
auto raw = qiedf->sample(iTS).raw();
// Add SOI information
if (iTS == qiedf->presamples())
raw |= TPHeaderSpec::MASK_SOI_BIT << TPHeaderSpec::OFFSET_SOI_BIT;
uhtrs[uhtrIndex].push_back(raw);
}// end loop over dataframe words
};

Expand Down

0 comments on commit 673fc62

Please sign in to comment.