21 mTItemsByTrigId(nullptr) {}
23 namespace castor_impl {
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++)
208 edm::LogWarning(
"CASTOR") <<
"CastorElectronicsMap::mapEId2tId-> Electronics channel " << fElectronicsId
210 <<
". New value " << fTriggerId <<
" is ignored";
223 }
else if (item.
mId != fId.
rawId()) {
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 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
bool operator()(const CastorElectronicsMap::PrecisionItem *a, const CastorElectronicsMap::PrecisionItem *b)
constexpr uint32_t rawId() const
get the raw id
void swap(CastorElectronicsMap &other)
std::atomic< std::vector< const PrecisionItem * > * > mPItemsById
bool mapEId2tId(CastorElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
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
bool operator()(const CastorElectronicsMap::TriggerItem *a, const CastorElectronicsMap::TriggerItem *b)
void sortByTriggerId() const
std::vector< CastorElectronicsId > allElectronicsId() const
std::atomic< std::vector< const TriggerItem * > * > mTItemsByTrigId
std::vector< TriggerItem > mTItems
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
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] ...
Log< level::Warning, false > LogWarning