58 std::vector<const CastorElectronicsMap::PrecisionItem*>::const_iterator item;
63 if (item == (*mPItemsById).end() || (*item)->mId != fId)
73 if (i!=
nullptr && i->
mElId!=fElId) i=
nullptr;
81 if (i!=
nullptr && i->
mElId!=fElId) i=
nullptr;
88 std::vector<const CastorElectronicsMap::TriggerItem*>::const_iterator item;
93 if (item == (*mTItemsByTrigId).end() || (*item)->mTrigId != fTrigId)
101 return DetId (item ? item->
mId : 0);
121 if (i!=
nullptr && i->
mId!=0) {
130 if (i!=
nullptr && i->
mTrigId!=0) {
139 std::vector <CastorElectronicsId>
result;
140 for (std::vector<PrecisionItem>::const_iterator item =
mPItems.begin (); item !=
mPItems.end (); item++)
142 for (std::vector<TriggerItem>::const_iterator item =
mTItems.begin (); item !=
mTItems.end (); item++)
149 std::vector <CastorElectronicsId>
result;
150 for (std::vector<PrecisionItem>::const_iterator item =
mPItems.begin (); item !=
mPItems.end (); item++)
156 std::vector <CastorElectronicsId>
result;
157 for (std::vector<TriggerItem>::const_iterator item =
mTItems.begin (); item !=
mTItems.end (); item++)
164 std::vector <HcalGenericDetId>
result;
165 std::set <unsigned long> allIds;
166 for (std::vector<PrecisionItem>::const_iterator item =
mPItems.begin (); item !=
mPItems.end (); item++)
167 if (item->mId) allIds.insert (item->mId);
168 for (std::set <unsigned long>::const_iterator channel = allIds.begin (); channel != allIds.end (); channel++) {
175 std::vector <HcalTrigTowerDetId>
result;
176 std::set <unsigned long> allIds;
177 for (std::vector<TriggerItem>::const_iterator item =
mTItems.begin (); item !=
mTItems.end (); item++)
178 if (item->mTrigId) allIds.insert (item->mTrigId);
179 for (std::set <unsigned long>::const_iterator channel = allIds.begin (); channel != allIds.end (); channel++)
191 edm::LogWarning(
"CASTOR") <<
"CastorElectronicsMap::mapEId2tId-> Electronics channel " << fElectronicsId <<
" already mapped to trigger channel " 205 else if (item.
mId != fId.
rawId ()) {
206 edm::LogWarning(
"CASTOR") <<
"CastorElectronicsMap::mapEId2tId-> Electronics channel " << fElectronicsId <<
" already mapped to channel " 215 auto ptr =
new std::vector<const PrecisionItem*>;
217 if (
i->mElId) (*ptr).push_back(&(*
i));
221 std::vector<const PrecisionItem*>* expect =
nullptr;
222 bool exchanged =
mPItemsById.compare_exchange_strong(expect, ptr);
231 auto ptr =
new std::vector<const TriggerItem*>;
233 if (
i->mElId) (*ptr).push_back(&(*
i));
238 std::vector<const TriggerItem*>* expect =
nullptr;
std::vector< PrecisionItem > mPItems
const DetId lookupTrigger(CastorElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
std::vector< CastorElectronicsId > allElectronicsIdTrigger() const
std::vector< CastorElectronicsId > allElectronicsIdPrecision() const
void swap(CastorElectronicsMap &other)
std::atomic< std::vector< const PrecisionItem * > * > mPItemsById
bool mapEId2tId(CastorElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
uint32_t rawId() const
get the raw id
const PrecisionItem * findById(unsigned long fId) const
const DetId lookup(CastorElectronicsId fId) const
lookup the logical detid associated with the given electronics id
const TriggerItem * findTByElId(unsigned long fElId) const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< HcalTrigTowerDetId > allTriggerId() const
const PrecisionItem * findPByElId(unsigned long fElId) const
const TriggerItem * findByTrigId(unsigned long fTrigId) const
std::vector< HcalGenericDetId > allPrecisionId() const
void sortByTriggerId() const
std::vector< CastorElectronicsId > allElectronicsId() const
std::atomic< std::vector< const TriggerItem * > * > mTItemsByTrigId
std::vector< TriggerItem > mTItems
CastorElectronicsMap & operator=(const CastorElectronicsMap &rhs)
bool mapEId2chId(CastorElectronicsId fElectronicsId, DetId fId)
Readout chain identification for Castor Bits for the readout chain : some names need change! [31:26] ...