11 if (p !=
v_detids.end() && *p == DetId) {
12 edm::LogError(
"SiStripApvGain") <<
"[" << __PRETTY_FUNCTION__ <<
"] SiStripApvGain for DetID " << DetId
13 <<
" is already stored. Skippig this put" << std::endl;
17 unsigned int sd = input.second - input.first;
18 unsigned int pd = p -
v_detids.begin();
20 unsigned int ibegin =
v_gains.size();
33 if (p ==
v_detids.end() || *p != DetId)
36 unsigned int pd = p -
v_detids.begin();
37 unsigned int ibegin = *(
v_ibegin.begin() + pd);
38 unsigned int iend = *(
v_iend.begin() + pd);
39 __builtin_prefetch((&
v_gains.front()) + ibegin);
47 unsigned int ibegin = *(
v_ibegin.begin() + pos);
48 unsigned int iend = *(
v_iend.begin() + pos);
49 __builtin_prefetch((&
v_gains.front()) + ibegin);
61 uint16_t apv = (uint16_t)(
strip / 128);
62 if (apv >= range.second - range.first) {
64 <<
"[SiStripApvGain::getApvGain] looking for SiStripApvGain for a strip out of range: strip " <<
strip 65 <<
" apv " << apv << std::endl;
70 return *(range.first + apv);
74 if (apv >= range.second - range.first) {
76 <<
"[SiStripApvGain::getApvGain] looking for SiStripApvGain for an apv out of range: apv " << apv << std::endl;
81 return *(range.first + apv);
86 std::vector<unsigned int>::const_iterator detid =
v_detids.begin();
87 ss <<
"Number of detids " <<
v_detids.size() << std::endl;
89 for (; detid !=
v_detids.end(); ++detid) {
92 for (
int it = 0; it < range.second - range.first; ++it) {
93 ss <<
"detid " << *detid <<
" \t" 94 <<
" apv " << apv++ <<
" \t" <<
getApvGain(it, range) <<
" \t" << std::endl;
102 std::vector<uint32_t>::const_iterator detid =
v_detids.begin();
103 for (; detid !=
v_detids.end(); ++detid) {
105 for (
int it = 0; it < range.second - range.first; ++it) {
106 summaryGain.add(*detid,
getApvGain(it, range));
109 ss <<
"Summary of gain values:" << std::endl;
110 summaryGain.print(ss,
true);
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Registry::const_iterator RegistryConstIterator
static float getApvGain(uint16_t apv, const Range &range)
Registry::iterator RegistryIterator
Range getRangeByPos(unsigned short pos) const
void getDetIds(std::vector< uint32_t > &DetIds_) const
static std::string const input
bool put(const uint32_t &detID, Range input)
std::vector< float > v_gains
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< unsigned int > v_iend
std::vector< unsigned int > v_detids
static float getStripGain(uint16_t strip, const Range &range)
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
std::vector< unsigned int > v_ibegin
const Range getRange(const uint32_t detID) const