Skip to content

Commit

Permalink
Removing mutable keyword left behind and including a counter initiali…
Browse files Browse the repository at this point in the history
…zation
  • Loading branch information
mundim committed Jul 11, 2019
1 parent 90c62da commit e37187c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define EventFilter_CTPPSRawToDigi_CTPPSElectronicIndex_H

namespace ctppspixelobjects {
struct CTPPSElectronicIndex {
struct ElectronicIndex {
int link;
int roc;
int dcol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class CTPPSTotemDataFormatter {
typedef uint32_t Word32;
typedef uint64_t Word64;

mutable int m_WordCounter;
mutable int m_DigiCounter;
int m_WordCounter;
int m_DigiCounter;

public:
typedef std::unordered_map<int, FEDRawData> RawData;
Expand Down
8 changes: 4 additions & 4 deletions EventFilter/CTPPSRawToDigi/src/CTPPSPixelDataFormatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,14 @@ void CTPPSPixelDataFormatter::formatRawData(unsigned int lvl1_ID,
std::vector<PPSPixelIndex> iDdet2fed) {
std::map<int, vector<Word32> > words;
// translate digis into 32-bit raw words and store in map indexed by Fed
m_hasDetDigis = 0;
m_allDetDigis = 0;
for (auto const& im : digis) {
m_allDetDigis++;
cms_uint32_t rawId = im.first;

m_hasDetDigis++;
const DetDigis& detDigis = im.second;
for (auto const& it : detDigis) {
m_DigiCounter++;

int nroc = 999, nlink = 999;
int rocPixelRow = -1, rocPixelColumn = -1, rocID = -1;
int modulePixelColumn = it.column();
Expand All @@ -221,13 +220,14 @@ void CTPPSPixelDataFormatter::formatRawData(unsigned int lvl1_ID,
nlink = iDdet2fed.at(i).fedch;
nroc = iDdet2fed.at(i).rocch + 1;

CTPPSElectronicIndex cabling = {nlink, nroc, dcol, pxid};
ElectronicIndex cabling = {nlink, nroc, dcol, pxid};

cms_uint32_t word = (cabling.link << m_LINK_shift) | (cabling.roc << m_ROC_shift) |
(cabling.dcol << m_DCOL_shift) | (cabling.pxid << m_PXID_shift) | (it.adc() << m_ADC_shift);

words[iDdet2fed.at(i).fedid].push_back(word);
m_WordCounter++;
m_hasDetDigis++;

} // range
} // for DetDigis
Expand Down

0 comments on commit e37187c

Please sign in to comment.