12 <<
"Scenario: " << theScenarioId <<
" is already in the map!" << std::endl;
22 SiPixelBadFEDChannelsScenarioMap::const_iterator
it =
m_scenarioMap.find(theScenarioId);
28 <<
"No Bad Pixel FEDChannels defined for Scenario id: " << theScenarioId <<
"\n";
35 SiPixelBadFEDChannelsScenarioMap::const_iterator
it =
m_scenarioMap.find(theScenarioId);
41 <<
"No Bad Pixel FEDChannels defined for Scenario id: " << theScenarioId <<
"\n";
48 SiPixelBadFEDChannelsScenarioMap::const_iterator
it =
m_scenarioMap.find(theScenarioId);
52 <<
"No Bad Pixel FEDChannels defined for Scenario id: " << theScenarioId <<
"\n";
54 SiPixelFEDChannelCollection::const_iterator it2 = (
it->second).
find(theDetId);
56 if (it2 == (
it->second).end()) {
58 <<
"No Bad Pixel FEDChannels defined for DetId:" << theDetId <<
" in Scenario id: " << theScenarioId <<
"\n";
67 SiPixelBadFEDChannelsScenarioMap::const_iterator
it =
m_scenarioMap.find(theScenarioId);
71 <<
"No Bad Pixel FEDChannels defined for Scenario id: " << theScenarioId <<
"\n";
74 std::unique_ptr<PixelFEDChannelCollection> disabled_channelcollection =
75 std::make_unique<edmNew::DetSetVector<PixelFEDChannel> >();
76 auto SiPixelBadFedChannels =
it->second;
77 for (
const auto &
entry : SiPixelBadFedChannels) {
78 disabled_channelcollection->insert(
entry.first,
entry.second.data(),
entry.second.size());
80 return disabled_channelcollection;
85 edm::LogVerbatim(
"SiPixelFEDChannelContainer") <<
"SiPixelFEDChannelContainer::printAll()";
86 edm::LogVerbatim(
"SiPixelFEDChannelContainer") <<
" =================================================================" 87 "==================================================";
90 for (
const auto &thePixelFEDChannel :
it->second) {
95 for (
const auto &
entry : thePixelFEDChannel.second) {
98 <<
" fed : " <<
entry.fed <<
" link : " <<
entry.link <<
" roc_first : " <<
entry.roc_first
99 <<
" roc_last: : " <<
entry.roc_last;
108 os <<
"run :" <<
it->first <<
" \n ";
109 for (
const auto &thePixelFEDChannel :
it->second) {
111 os <<
"DetId :" <<
detId <<
" \n ";
112 for (
const auto &
entry : thePixelFEDChannel.second) {
113 os <<
" fed : " <<
entry.fed <<
" link : " <<
entry.link <<
" roc_first : " <<
entry.roc_first
114 <<
" roc_last: : " <<
entry.roc_last;
133 std::stringstream
ss;
SiPixelBadFEDChannelsScenarioMap m_scenarioMap
Log< level::Info, true > LogVerbatim
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::ostream & operator<<(std::ostream &os, SiPixelFEDChannelContainer FEDChannels)
SiPixelFEDChannelCollection getSiPixelBadFedChannels(const std::string &ScenarioId) const
void setScenario(const std::string &theScenarioId, const SiPixelFEDChannelCollection &theBadFEDChannels)
std::vector< std::string > getScenarioList() const
Log< level::Warning, false > LogWarning
const std::vector< PixelFEDChannel > & getSiPixelBadFedChannelsInDetId(const std::string &theScenarioId, DetId theDetId)
std::unique_ptr< PixelFEDChannelCollection > getDetSetBadPixelFedChannels(const std::string &ScenarioId) const
void print(std::ostream &os) const
std::map< DetId, std::vector< PixelFEDChannel > > SiPixelFEDChannelCollection