17 template <
class input_t>
20 subtract_(
const uint32_t&
id,
const uint16_t& firstStrip,
const input_t&
input, std::vector<int16_t>&
output) {
23 pedestals.resize(firstStrip + input.size());
27 typename input_t::const_iterator inDigi = input.begin();
28 std::vector<int>::const_iterator ped =
pedestals.begin() + firstStrip;
29 std::vector<int16_t>::iterator outDigi = output.begin();
31 while( inDigi != input.end() ) {
33 *outDigi = ( *ped > 895 )
34 ?
eval(*inDigi) - *ped + 1024
35 :
eval(*inDigi) - *ped;
48 <<
"[SiStripPedestalsSubtractor::subtract] DetId " <<
id <<
" propagating error from SiStripPedestal" << e.
what();
void subtract(const edm::DetSet< SiStripRawDigi > &, std::vector< int16_t > &)
edm::ESHandle< SiStripPedestals > pedestalsHandle
char const * what() const override
std::pair< ContainerIterator, ContainerIterator > Range
static std::string const input
void init(const edm::EventSetup &)
std::vector< int > pedestals
const int16_t & eval(const int16_t &in)
void allPeds(std::vector< int > &pefs, const Range &range) const
void subtract_(const uint32_t &, const uint16_t &, const input_t &, std::vector< int16_t > &)
const Range getRange(const uint32_t &detID) const