33 : mPItems(src.mPItems), mTItems(src.mTItems),
48 std::memory_order_acq_rel);
51 std::memory_order_acq_rel);
61 std::vector<const HcalElectronicsMap::PrecisionItem*>::const_iterator item;
65 auto ptr = (*
mPItemsById.load(std::memory_order_acquire));
67 if (item == ptr.end() || (*item)->mId != fId)
77 if (i!=0 && i->
mElId!=fElId) i=0;
85 if (i!=0 && i->
mElId!=fElId) i=0;
92 std::vector<const HcalElectronicsMap::TriggerItem*>::const_iterator item;
98 if (item == (*mTItemsByTrigId).end() || (*item)->mTrigId != fTrigId)
106 return DetId (item ? item->
mId : 0);
126 if (i!=0 && i->
mId!=0) {
144 std::vector <HcalElectronicsId>
result;
145 for (std::vector<PrecisionItem>::const_iterator item =
mPItems.begin (); item !=
mPItems.end (); item++)
147 for (std::vector<TriggerItem>::const_iterator item =
mTItems.begin (); item !=
mTItems.end (); item++)
154 std::vector <HcalElectronicsId>
result;
155 for (std::vector<PrecisionItem>::const_iterator item =
mPItems.begin (); item !=
mPItems.end (); item++)
161 std::vector <HcalElectronicsId>
result;
162 for (std::vector<TriggerItem>::const_iterator item =
mTItems.begin (); item !=
mTItems.end (); item++)
169 std::vector <HcalGenericDetId>
result;
170 std::set <unsigned long> allIds;
171 for (std::vector<PrecisionItem>::const_iterator item =
mPItems.begin (); item !=
mPItems.end (); item++)
172 if (item->mId) allIds.insert (item->mId);
173 for (std::set <unsigned long>::const_iterator channel = allIds.begin (); channel != allIds.end (); channel++) {
180 std::vector <HcalTrigTowerDetId>
result;
181 std::set <unsigned long> allIds;
182 for (std::vector<TriggerItem>::const_iterator item =
mTItems.begin (); item !=
mTItems.end (); item++)
183 if (item->mTrigId) allIds.insert (item->mTrigId);
184 for (std::set <unsigned long>::const_iterator channel = allIds.begin (); channel != allIds.end (); channel++)
202 edm::LogWarning(
"HCAL") <<
"HcalElectronicsMap::mapEId2tId-> Electronics channel " << fElectronicsId <<
" already mapped to trigger channel "
219 else if (item.
mId != fId.
rawId ()) {
220 edm::LogWarning(
"HCAL") <<
"HcalElectronicsMap::mapEId2tId-> Electronics channel " << fElectronicsId <<
" already mapped to channel "
228 if (!
mPItemsById.load(std::memory_order_acquire)) {
229 auto ptr =
new std::vector<const PrecisionItem*>;
231 if (
i->mElId) (*ptr).push_back(&(*
i));
236 std::vector<const PrecisionItem*>* expect =
nullptr;
237 bool exchanged =
mPItemsById.compare_exchange_strong(expect, ptr, std::memory_order_acq_rel);
246 auto ptr =
new std::vector<const TriggerItem*>;
248 if (
i->mElId) (*ptr).push_back(&(*
i));
253 std::vector<const TriggerItem*>* expect =
nullptr;
254 bool exchanged =
mTItemsByTrigId.compare_exchange_strong(expect, ptr, std::memory_order_acq_rel);
const TriggerItem * findByTrigId(unsigned long fTrigId) const
const PrecisionItem * findPByElId(unsigned long fElId) const
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
std::vector< PrecisionItem > mPItems
bool operator()(const HcalElectronicsMap::TriggerItem *a, const HcalElectronicsMap::TriggerItem *b)
bool mapEId2tId(HcalElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
void swap(HcalElectronicsMap &other)
uint32_t rawId() const
get the raw id
std::vector< HcalElectronicsId > allElectronicsIdTrigger() const
const PrecisionItem * findById(unsigned long fId) const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::atomic< std::vector< const PrecisionItem * > * > mPItemsById
std::vector< TriggerItem > mTItems
std::vector< HcalGenericDetId > allPrecisionId() const
bool mapEId2chId(HcalElectronicsId fElectronicsId, DetId fId)
std::vector< HcalElectronicsId > allElectronicsId() const
bool operator()(const HcalDcsMap::Item *a, const HcalDcsMap::Item *b)
const TriggerItem * findTByElId(unsigned long fElId) const
HcalElectronicsMap & operator=(const HcalElectronicsMap &rhs)
int linearIndex() const
get a fast, compact, unique index for linear lookups
void sortByTriggerId() const
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
Readout chain identification for Hcal.
std::vector< HcalTrigTowerDetId > allTriggerId() const
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
std::atomic< std::vector< const TriggerItem * > * > mTItemsByTrigId