19 : inputTags(conf.getParameter<std::vector<edm::InputTag> >(
"DigiProducersList")),
20 inputTokensDigi(edm::
vector_transform(inputTags, [this](edm::InputTag
const &
tag){
return consumes<edm::DetSetVector<SiStripDigi> >(
tag);})),
25 produces< edm::DetSetVector<SiStripProcessedRawDigi> >(
"");
40 if(
"VirginRaw" == label )
vr_process(*inputRawdigis, *output);
41 else if(
"ProcessedRaw" == label )
pr_process(*inputRawdigis, *output);
55 token = tokens.begin(); token != tokens.end(); ++token ) {
56 unsigned index(token - tokens.begin());
58 if( handle.
isValid() && !handle->empty() ) {
63 return "Input Not Found";
68 std::vector<float> digis;
72 digis.resize( digi->strip(), 0);
73 digis.push_back( digi->adc() );
82 std::vector<float> digis;
92 std::vector<int16_t> int_digis(detset->size());
94 std::vector<float> digis(int_digis.begin(), int_digis.end());
105 for(std::vector<float>::iterator it=digis.begin(); it<digis.end(); it++)
106 (*it)/= (
gainHandle->getStripGain(it-digis.begin(), detGainRange));
110 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 > &)