21 mTItemsByTrigId(nullptr) {}
27 return a->mId <
b->mId;
33 return a->mTrigId <
b->mTrigId;
44 : mPItems(
src.mPItems), mTItems(
src.mTItems), mPItemsById(nullptr), mTItemsByTrigId(nullptr) {}
63 std::vector<const CastorElectronicsMap::PrecisionItem*>::const_iterator
item;
68 if (
item == (*mPItemsById).end() || (*item)->mId != fId)
78 if (
i !=
nullptr &&
i->mElId != fElId)
87 if (
i !=
nullptr &&
i->mElId != fElId)
94 std::vector<const CastorElectronicsMap::TriggerItem*>::const_iterator
item;
99 if (
item == (*mTItemsByTrigId).end() || (*item)->mTrigId != fTrigId)
129 if (
i !=
nullptr &&
i->mId != 0) {
141 if (
i !=
nullptr &&
i->mTrigId != 0) {
150 std::vector<CastorElectronicsId>
result;
162 std::vector<CastorElectronicsId>
result;
170 std::vector<CastorElectronicsId>
result;
179 std::vector<HcalGenericDetId>
result;
180 std::set<unsigned long> allIds;
183 allIds.insert(
item->mId);
184 for (std::set<unsigned long>::const_iterator channel = allIds.begin(); channel != allIds.end(); channel++) {
191 std::vector<HcalTrigTowerDetId>
result;
192 std::set<unsigned long> allIds;
195 allIds.insert(
item->mTrigId);
196 for (std::set<unsigned long>::const_iterator channel = allIds.begin(); channel != allIds.end(); channel++)
205 if (
item.mTrigId == 0) {
207 }
else if (
item.mTrigId != fTriggerId.
rawId()) {
208 edm::LogWarning(
"CASTOR") <<
"CastorElectronicsMap::mapEId2tId-> Electronics channel " << fElectronicsId
210 <<
". New value " << fTriggerId <<
" is ignored";
224 edm::LogWarning(
"CASTOR") <<
"CastorElectronicsMap::mapEId2tId-> Electronics channel " << fElectronicsId
234 auto ptr =
new std::vector<const PrecisionItem*>;
237 (*ptr).push_back(&(*
i));
241 std::vector<const PrecisionItem*>* expect =
nullptr;
242 bool exchanged =
mPItemsById.compare_exchange_strong(expect, ptr);
251 auto ptr =
new std::vector<const TriggerItem*>;
254 (*ptr).push_back(&(*
i));
259 std::vector<const TriggerItem*>* expect =
nullptr;
std::vector< PrecisionItem > mPItems
const PrecisionItem * findById(unsigned long fId) const
bool operator()(const CastorElectronicsMap::PrecisionItem *a, const CastorElectronicsMap::PrecisionItem *b)
void swap(CastorElectronicsMap &other)
const PrecisionItem * findPByElId(unsigned long fElId) const
std::atomic< std::vector< const PrecisionItem * > * > mPItemsById
const DetId lookupTrigger(CastorElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
bool mapEId2tId(CastorElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
std::vector< CastorElectronicsId > allElectronicsId() const
const TriggerItem * findByTrigId(unsigned long fTrigId) const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
void sortByTriggerId() const
const TriggerItem * findTByElId(unsigned long fElId) const
std::vector< CastorElectronicsId > allElectronicsIdPrecision() const
bool operator()(const CastorElectronicsMap::TriggerItem *a, const CastorElectronicsMap::TriggerItem *b)
std::vector< HcalGenericDetId > allPrecisionId() const
constexpr uint32_t rawId() const
get the raw id
const DetId lookup(CastorElectronicsId fId) const
lookup the logical detid associated with the given electronics id
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] ...
std::vector< HcalTrigTowerDetId > allTriggerId() const
Log< level::Warning, false > LogWarning
std::vector< CastorElectronicsId > allElectronicsIdTrigger() const