40 const auto& tkDets = tkGeom->dets();
42 edm::LogInfo(
"SiStripNoisesGetAllChecker") <<
"Starting to loop over all SiStrip modules...";
45 std::vector<uint32_t>
detIDs;
46 siStripNoises.getDetIds(
detIDs);
48 size_t exceptionCounts{0};
49 for (
const auto& detID :
detIDs) {
50 uint16_t maxNStrips{0};
51 auto det = std::find_if(tkDets.begin(), tkDets.end(), [detID](
auto& elem) ->
bool {
52 return (elem->geographicalId().rawId() == detID);
55 maxNStrips =
p.nstrips();
62 <<
"Exception in checkModuleNoise for detID " << detID <<
": " <<
e.what();
65 edm::LogError(
"SiStripNoisesGetAllChecker") <<
"Unknown exception in checkModuleNoise for detID " << detID;
70 std::ostringstream message;
73 const int boxWidth = 50;
77 <<
"* " << std::setw(boxWidth - 4) << std::left <<
"SiStripNoisesGetAllChecker Summary" 80 <<
"* " << std::setw(boxWidth - 4) << std::left
82 <<
"* " << std::setw(boxWidth - 4) << std::left
83 << (
"Encountered " +
std::to_string(exceptionCounts) +
" exceptions.") <<
" *\n" 91 uint16_t maxNStrips) {
97 edm::LogInfo(
"SiStripNoisesGetAllChecker") <<
"Successfully processed detID: " << detID;
99 edm::LogError(
"SiStripNoisesGetAllChecker") <<
"Exception caught for detID " << detID <<
": " <<
e.what();
102 edm::LogError(
"SiStripNoisesGetAllChecker") <<
"Unknown exception caught for detID " << detID;
SiStripNoisesGetAllChecker(const edm::ParameterSet &)
Log< level::System, false > LogSystem
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
void allNoises(std::vector< float > &noises, const Range &range) const
void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
Log< level::Error, false > LogError
static std::string to_string(const XMLCh *ch)
~SiStripNoisesGetAllChecker() override=default
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
#define DEFINE_FWK_MODULE(type)
Log< level::Info, false > LogInfo
const Range getRange(const uint32_t detID) const
std::pair< ContainerIterator, ContainerIterator > Range
const edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noisesToken_
void checkModuleNoise(const SiStripNoises &, const uint32_t detID, uint16_t maxNStrips)