16 #include "boost/bind.hpp"
21 : inputTags(conf.getParameter<std::vector<edm::InputTag> >(
"DigiProducersList")),
22 inputTokensDigi(edm::
vector_transform(inputTags, [this](edm::InputTag
const &
tag){
return consumes<edm::DetSetVector<SiStripDigi> >(
tag);})),
27 produces< edm::DetSetVector<SiStripProcessedRawDigi> >(
"");
42 if(
"VirginRaw" == label )
vr_process(*inputRawdigis, *output);
43 else if(
"ProcessedRaw" == label )
pr_process(*inputRawdigis, *output);
57 token = tokens.begin(); token != tokens.end(); ++token ) {
58 unsigned index(token - tokens.begin());
60 if( handle.
isValid() && !handle->empty() ) {
65 return "Input Not Found";
70 std::vector<float> digis;
74 digis.resize( digi->strip(), 0);
75 digis.push_back( digi->adc() );
84 std::vector<float> digis;
94 std::vector<int16_t> int_digis(detset->size());
96 std::vector<float> digis(int_digis.begin(), int_digis.end());
107 for(std::vector<float>::iterator it=digis.begin(); it<digis.end(); it++)
108 (*it)/= (
gainHandle->getStripGain(it-digis.begin(), detGainRange));
112 copy(digis.begin(), digis.end(), back_inserter(ds.
data) );
const uint16_t & adc() const
std::vector< edm::InputTag > inputTags
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > > inputTokensRawDigi
std::auto_ptr< SiStripPedestalsSubtractor > subtractorPed
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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)
subtractorPed(SiStripRawProcessingFactory::create_SubtractorPed(conf))
inputTokensRawDigi(edm::vector_transform(inputTags, [this](edm::InputTag const &tag){return consumes< edm::DetSetVector< SiStripRawDigi > >(tag);}))
static std::auto_ptr< SiStripCommonModeNoiseSubtractor > create_SubtractorCMN(const edm::ParameterSet &)
static std::string const input
void pr_process(const edm::DetSetVector< SiStripRawDigi > &, edm::DetSetVector< SiStripProcessedRawDigi > &)
edm::ESHandle< SiStripGain > gainHandle
SiStripProcessedRawDigiProducer(edm::ParameterSet const &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
subtractorCMN(SiStripRawProcessingFactory::create_SubtractorCMN(conf))
std::pair< ContainerIterator, ContainerIterator > Range
void common_process(const uint32_t, std::vector< float > &, edm::DetSetVector< SiStripProcessedRawDigi > &)
iterator end()
Return the off-the-end iterator.
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > > inputTokensDigi
void produce(edm::Event &e, const edm::EventSetup &es)
std::auto_ptr< SiStripCommonModeNoiseSubtractor > subtractorCMN
void zs_process(const edm::DetSetVector< SiStripDigi > &, edm::DetSetVector< SiStripProcessedRawDigi > &)
void insert(detset const &s)
Insert the given DetSet.
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
static std::auto_ptr< SiStripPedestalsSubtractor > create_SubtractorPed(const edm::ParameterSet &)
void vr_process(const edm::DetSetVector< SiStripRawDigi > &, edm::DetSetVector< SiStripProcessedRawDigi > &)