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();
virtual char const * what() const
void subtract(const edm::DetSet< SiStripRawDigi > &, std::vector< int16_t > &)
edm::ESHandle< SiStripPedestals > pedestalsHandle
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 subtract_(const uint32_t &, const uint16_t &, const input_t &, std::vector< int16_t > &)