Skip to content

Commit 1699931

Browse files
committed
code format
1 parent 943faa3 commit 1699931

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

EventFilter/L1TRawToDigi/plugins/implementations_stage2/CaloSummaryUnpacker.cc

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,34 @@ bool l1t::stage2::CaloSummaryUnpacker::unpack(const Block& block, UnpackerCollec
3535
int nBX = int(ceil(block.header().getSize() / nFramesPerEvent));
3636
int firstBX = (nBX / 2) - nBX + 1;
3737
int lastBX = nBX / 2;
38-
int processedBXs = 0; //This will just help us keep track of what words we are grabbing
39-
38+
int processedBXs = 0; //This will just help us keep track of what words we are grabbing
4039

4140
auto res_ = static_cast<L1TObjectCollections*>(coll)->getCICADAScore();
42-
res_ -> setBXRange(firstBX, lastBX);
41+
res_->setBXRange(firstBX, lastBX);
4342

44-
for (int bx = firstBX; bx <= lastBX; ++bx){
43+
for (int bx = firstBX; bx <= lastBX; ++bx) {
4544
//convert to float and then multiply by a factor based on the index?
4645
unsigned int cicadaBits[numCICADAWords] = {0, 0, 0, 0};
4746

4847
for (unsigned int wordNum = 0; wordNum < numCICADAWords; ++wordNum) {
49-
unsigned short wordLocation = processedBXs*nFramesPerEvent + wordNum; //Calculate the location of the needed CICADA word based on how many BXs we have already handled, and how many words of CICADA we have already grabbed.
48+
unsigned short wordLocation =
49+
processedBXs * nFramesPerEvent +
50+
wordNum; //Calculate the location of the needed CICADA word based on how many BXs we have already handled, and how many words of CICADA we have already grabbed.
5051
//Frame 0 of a bx are the most significant integer bits
5152
//Frame 1 of a bx are the least significant integer bits
5253
//Frame 2 of a bx are the most significant decimal bits
5354
//Frame 3 of a bx are the lest significant decimal bits
5455
//Frames 4&5 are unused (by CICADA), they are reserved.
5556
uint32_t raw_data = block.payload().at(wordLocation);
5657
cicadaBits[wordNum] =
57-
(cicadaBitsPattern & raw_data) >>
58-
28; //The 28 shifts the extracted bits over to the start of the 32 bit result data for easier working with later
58+
(cicadaBitsPattern & raw_data) >>
59+
28; //The 28 shifts the extracted bits over to the start of the 32 bit result data for easier working with later
5960
}
60-
res_->push_back(bx, processBitsToScore(cicadaBits)); //Now we insert CICADA into the proper BX, after a quick utility constructs a number from the 4 sets of bits.
61-
++processedBXs; //index BXs
61+
res_->push_back(
62+
bx,
63+
processBitsToScore(
64+
cicadaBits)); //Now we insert CICADA into the proper BX, after a quick utility constructs a number from the 4 sets of bits.
65+
++processedBXs; //index BXs
6266
}
6367

6468
return true;

EventFilter/L1TRawToDigi/plugins/implementations_stage2/CaloSummaryUnpacker.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ namespace l1t {
1212

1313
bool unpack(const Block& block, UnpackerCollections* coll) override;
1414
float processBitsToScore(const unsigned int[]);
15-
15+
1616
static constexpr unsigned short numCICADAWords = 4; // We have 4 words/frames that contain CICADA bits
17-
static constexpr unsigned int nFramesPerEvent = 6; //Calo Summary outputs 6 32 bit words (or frames in uGT parlance) per event.
17+
static constexpr unsigned int nFramesPerEvent =
18+
6; //Calo Summary outputs 6 32 bit words (or frames in uGT parlance) per event.
1819
static constexpr unsigned int cicadaBitsPattern =
1920
0xF0000000; //first 4 bits of the first 4 words/frames are CICADA
2021
};

0 commit comments

Comments
 (0)