16 : inputTags_(conf.getParameter<std::
vector<edm::
InputTag> >(
"DigiProducersList")),
18 inputTags_, [this](edm::
InputTag const&
tag) {
return consumes<edm::DetSetVector<SiStripDigi> >(
tag); })),
20 inputTags_, [
this](
edm::InputTag const&
tag) {
return consumes<edm::DetSetVector<SiStripRawDigi> >(
tag); })),
24 produces<edm::DetSetVector<SiStripProcessedRawDigi> >(
"");
37 if (
"VirginRaw" == label)
39 else if (
"ProcessedRaw" == label)
57 if (handle.
isValid() && !handle->empty()) {
62 return "Input Not Found";
68 std::vector<float> digis;
72 digis.resize(digi->strip(), 0);
73 digis.push_back(digi->adc());
83 std::vector<float> digis;
85 detset->begin(), detset->end(), back_inserter(digis), std::bind(&
SiStripRawDigi::adc, std::placeholders::_1));
95 std::vector<int16_t> int_digis(detset->size());
97 std::vector<float> digis(int_digis.begin(), int_digis.end());
104 std::vector<float>& digis,
109 for (std::vector<float>::iterator it = digis.begin(); it < digis.end(); ++it)
110 (*it) /= (gain.
getStripGain(it - digis.begin(), detGainRange));
114 copy(digis.begin(), digis.end(), back_inserter(ds.
data));
subtractorPed_(SiStripRawProcessingFactory::create_SubtractorPed(conf, consumesCollector()))
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void zs_process(const edm::DetSetVector< SiStripDigi > &, edm::DetSetVector< SiStripProcessedRawDigi > &, const SiStripGain &)
void common_process(const uint32_t, std::vector< float > &, edm::DetSetVector< SiStripProcessedRawDigi > &, const SiStripGain &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< SiStripCommonModeNoiseSubtractor > subtractorCMN_
Log< level::Error, false > LogError
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
std::string findInput(edm::Handle< T > &handle, const std::vector< edm::EDGetTokenT< T > > &tokens, const edm::Event &e)
static std::string const input
static std::unique_ptr< SiStripCommonModeNoiseSubtractor > create_SubtractorCMN(const edm::ParameterSet &, edm::ConsumesCollector)
bool getData(T &iHolder) const
SiStripProcessedRawDigiProducer(edm::ParameterSet const &)
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
std::pair< ContainerIterator, ContainerIterator > Range
void pr_process(const edm::DetSetVector< SiStripRawDigi > &, edm::DetSetVector< SiStripProcessedRawDigi > &, const SiStripGain &)
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > > inputTokensDigi_
subtractorCMN_(SiStripRawProcessingFactory::create_SubtractorCMN(conf, consumesCollector()))
iterator end()
Return the off-the-end iterator.
inputTokensRawDigi_(edm::vector_transform(inputTags_, [this](edm::InputTag const &tag){return consumes< edm::DetSetVector< SiStripRawDigi > >(tag);}))
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
static std::unique_ptr< SiStripPedestalsSubtractor > create_SubtractorPed(const edm::ParameterSet &, edm::ConsumesCollector)
void produce(edm::Event &e, const edm::EventSetup &es) override
Log< level::Info, false > LogInfo
std::vector< edm::InputTag > inputTags_
void insert(detset const &s)
Insert the given DetSet.
std::unique_ptr< SiStripPedestalsSubtractor > subtractorPed_
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
void vr_process(const edm::DetSetVector< SiStripRawDigi > &, edm::DetSetVector< SiStripProcessedRawDigi > &, const SiStripGain &)
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > > inputTokensRawDigi_
const SiStripApvGain::Range getRange(uint32_t detID) const