CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
HcalElectronicsMapAddons::Helper Class Reference

#include <HcalElectronicsMap.h>

Public Member Functions

 Helper ()
 
bool mapEId2chId (HcalElectronicsId fElectronicsId, DetId fId)
 
bool mapEId2tId (HcalElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
 

Public Attributes

std::vector
< HcalElectronicsMap::PrecisionItem
mPItems
 
std::vector
< HcalElectronicsMap::TriggerItem
mTItems
 

Detailed Description

Definition at line 137 of file HcalElectronicsMap.h.

Constructor & Destructor Documentation

HcalElectronicsMapAddons::Helper::Helper ( )

Definition at line 163 of file HcalElectronicsMap.cc.

std::vector< HcalElectronicsMap::TriggerItem > mTItems
std::vector< HcalElectronicsMap::PrecisionItem > mPItems
static const int maxLinearIndex

Member Function Documentation

bool HcalElectronicsMapAddons::Helper::mapEId2chId ( HcalElectronicsId  fElectronicsId,
DetId  fId 
)

Definition at line 182 of file HcalElectronicsMap.cc.

References B2GTnPMonitor_cfi::item, HcalElectronicsId::linearIndex(), HcalElectronicsMap::PrecisionItem::mElId, HcalElectronicsMap::PrecisionItem::mId, DetId::rawId(), and HcalElectronicsId::rawId().

Referenced by HcalLogicalMap::generateHcalElectronicsMap().

182  {
184 
185  if (item.mElId == 0)
186  item.mElId = fElectronicsId.rawId();
187  if (item.mId == 0) {
188  item.mId = fId.rawId();
189  } else if (item.mId != fId.rawId()) {
190  edm::LogWarning("HCAL") << "HcalElectronicsMap::Helper::mapEId2tId-> Electronics channel " << fElectronicsId
191  << " already mapped to channel " << HcalGenericDetId(item.mId) << ". New value "
192  << HcalGenericDetId(fId) << " is ignored";
193  return false;
194  }
195  return true;
196 }
constexpr uint32_t rawId() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr int linearIndex() const
get a fast, compact, unique index for linear lookups
std::vector< HcalElectronicsMap::PrecisionItem > mPItems
Log< level::Warning, false > LogWarning
bool HcalElectronicsMapAddons::Helper::mapEId2tId ( HcalElectronicsId  fElectronicsId,
HcalTrigTowerDetId  fTriggerId 
)

Definition at line 166 of file HcalElectronicsMap.cc.

References B2GTnPMonitor_cfi::item, HcalElectronicsId::linearIndex(), HcalElectronicsMap::TriggerItem::mElId, HcalElectronicsMap::TriggerItem::mTrigId, DetId::rawId(), and HcalElectronicsId::rawId().

Referenced by HcalLogicalMap::generateHcalElectronicsMap().

166  {
168 
169  if (item.mElId == 0)
170  item.mElId = fElectronicsId.rawId();
171  if (item.mTrigId == 0) {
172  item.mTrigId = fTriggerId.rawId(); // just cast avoiding long machinery
173  } else if (item.mTrigId != fTriggerId.rawId()) {
174  edm::LogWarning("HCAL") << "HcalElectronicsMap::Helper::mapEId2tId-> Electronics channel " << fElectronicsId
175  << " already mapped to trigger channel " << (HcalTrigTowerDetId(item.mTrigId))
176  << ". New value " << fTriggerId << " is ignored";
177  return false;
178  }
179  return true;
180 }
constexpr uint32_t rawId() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::vector< HcalElectronicsMap::TriggerItem > mTItems
constexpr int linearIndex() const
get a fast, compact, unique index for linear lookups
Log< level::Warning, false > LogWarning

Member Data Documentation

std::vector<HcalElectronicsMap::PrecisionItem> HcalElectronicsMapAddons::Helper::mPItems

Definition at line 144 of file HcalElectronicsMap.h.

std::vector<HcalElectronicsMap::TriggerItem> HcalElectronicsMapAddons::Helper::mTItems

Definition at line 145 of file HcalElectronicsMap.h.