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
HcalDcsMapAddons::Helper Class Reference

#include <HcalDcsMap.h>

Public Member Functions

 Helper ()
 
bool mapGeomId2DcsId (HcalDetId fId, HcalDcsDetId fDcsId)
 

Public Attributes

std::set< HcalDcsMap::Item,
LessByDcsId
mItems
 

Detailed Description

Definition at line 144 of file HcalDcsMap.h.

Constructor & Destructor Documentation

HcalDcsMapAddons::Helper::Helper ( )

Definition at line 141 of file HcalDcsMap.cc.

141 {}

Member Function Documentation

bool HcalDcsMapAddons::Helper::mapGeomId2DcsId ( HcalDetId  fId,
HcalDcsDetId  fDcsId 
)

Definition at line 143 of file HcalDcsMap.cc.

References HcalDcsDetId::DCSUNKNOWN, HcalDcsMap::mItems, HcalDcsDetId::ring(), HcalDcsDetId::slice(), HcalDcsDetId::subchannel(), HcalOtherDetId::subdet(), and filterCSVwithJSON::target.

143  {
144  // DCS type is a part of DcsDetId but it does not make sense to keep
145  // duplicate records in the map for DCS channels where only type is different.
146  // Hence, the type in HcalDcsDetId is always forced to DCSUNKNOWN
147  HcalDcsDetId fDcsId_notype(fDcsId.subdet(),
148  fDcsId.ring(), // side is included
149  fDcsId.slice(),
151  fDcsId.subchannel());
152  HcalDcsMap::Item target(fId, fDcsId_notype);
153  auto iter = mItems.find(target);
154  if (iter != mItems.end() and iter->mId == fId) {
155  edm::LogWarning("HCAL") << "HcalDcsMap::mapGeomId2DcsId-> Geom channel " << fId << " already mapped to DCS channel "
156  << fDcsId_notype;
157  return false; // element already exists
158  }
159  mItems.insert(target);
160 
161  return true;
162 }
std::set< HcalDcsMap::Item, LessByDcsId > mItems
Definition: HcalDcsMap.h:154
int subchannel() const
Definition: HcalDcsDetId.h:58
HcalOtherSubdetector subdet() const
get the category
int slice() const
Definition: HcalDcsDetId.h:56
Log< level::Warning, false > LogWarning
int ring() const
Definition: HcalDcsDetId.h:55

Member Data Documentation

std::set<HcalDcsMap::Item, LessByDcsId> HcalDcsMapAddons::Helper::mItems

Definition at line 154 of file HcalDcsMap.h.