Skip to content

Commit

Permalink
Code-format applied
Browse files Browse the repository at this point in the history
  • Loading branch information
icosivi committed Jun 23, 2020
1 parent 8bdcb36 commit 0e905af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
13 changes: 6 additions & 7 deletions DataFormats/ForwardDetId/interface/ETLDetId.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

class ETLDetId : public MTDDetId {
public:
static const uint32_t kETLmoduleOffset = 5; //7
static const uint32_t kETLmoduleMask = 0x7FF; //0x1FF
static const uint32_t kETLmodTypeOffset = 3; //5
static const uint32_t kETLmodTypeMask = 0x3; //0x3
static const uint32_t kETLmoduleOffset = 5; //7
static const uint32_t kETLmoduleMask = 0x7FF; //0x1FF
static const uint32_t kETLmodTypeOffset = 3; //5
static const uint32_t kETLmodTypeMask = 0x3; //0x3

static constexpr int kETLv1maxRing = 11;
static constexpr int kETLv1maxModule = 176;
Expand All @@ -31,7 +31,7 @@ class ETLDetId : public MTDDetId {
static const uint32_t kETLsectorMask = 0x3;

static constexpr int kETLv4maxRing = 16;
static constexpr int kETLv4maxModule = 517; //248
static constexpr int kETLv4maxModule = 517; //248
static constexpr int kETLv4nDisc = 2;

static constexpr uint32_t kSoff = 4;
Expand Down Expand Up @@ -97,9 +97,8 @@ class ETLDetId : public MTDDetId {
}

uint32_t newForm(const uint32_t& rawid);

};

std::ostream& operator<<(std::ostream&, const ETLDetId&);
std::ostream& operator<<(std::ostream&, const ETLDetId&);

#endif // DataFormats_ETLDetId_ETLDetId_h
18 changes: 9 additions & 9 deletions DataFormats/ForwardDetId/src/ETLDetId.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ std::ostream& operator<<(std::ostream& os, const ETLDetId& id) {
return os;
}

uint32_t ETLDetId::newForm(const uint32_t& rawid){
uint32_t rawid_new = 0;
rawid_new |= (MTDType::ETL & ETLDetId::kMTDsubdMask) << ETLDetId::kMTDsubdOffset | (mtdSide() & ETLDetId::kZsideMask) << ETLDetId::kZsideOffset |
(mtdRR() & ETLDetId::kRodRingMask) << ETLDetId::kRodRingOffset |
(module() & ETLDetId::kETLmoduleMask) << (ETLDetId::kETLmoduleOffset-2) | (modType() & ETLDetId::kETLmodTypeMask) << (kETLmodTypeOffset-2);
return rawid_new;
}


uint32_t ETLDetId::newForm(const uint32_t& rawid) {
uint32_t rawid_new = 0;
rawid_new |= (MTDType::ETL & ETLDetId::kMTDsubdMask) << ETLDetId::kMTDsubdOffset |
(mtdSide() & ETLDetId::kZsideMask) << ETLDetId::kZsideOffset |
(mtdRR() & ETLDetId::kRodRingMask) << ETLDetId::kRodRingOffset |
(module() & ETLDetId::kETLmoduleMask) << (ETLDetId::kETLmoduleOffset - 2) |
(modType() & ETLDetId::kETLmodTypeMask) << (kETLmodTypeOffset - 2);
return rawid_new;
}

0 comments on commit 0e905af

Please sign in to comment.