CMS 3D CMS Logo

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, LessByDcsIdmItems
 

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.

Referenced by HcalDbASCIIIO::createObject< HcalDcsMap >(), and HcalDbHardcode::makeHardcodeDcsMap().

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
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.