164 unsigned int lNDigis = lInputDigis->
size();
168 std::vector<edm::DetSetVector<SiStripRawDigi>::detset > pedsData;
169 pedsData.reserve(lNDigis);
170 std::vector<edm::DetSetVector<SiStripProcessedRawDigi>::detset > noiseData;
171 noiseData.reserve(lNDigis);
172 std::vector<edm::DetSetVector<SiStripRawDigi>::detset > pedSubtrData;
173 pedSubtrData.reserve(lNDigis);
174 std::vector<edm::DetSetVector<SiStripRawDigi>::detset > cmSubtrData;
175 cmSubtrData.reserve(lNDigis);
177 std::vector< edm::DetSet<SiStripDigi> > zsData;
180 std::map<uint32_t,std::vector<uint32_t> > medsData;
184 for ( ; inputChannel!=lInputDigis->
end(); ++inputChannel){
185 uint32_t lDetId = inputChannel->detId();
192 unsigned int lNStrips = inputChannel->
size();
195 std::vector<SiStripRawDigi>& pedsDetSetData = pedsData.back().data;
196 pedsDetSetData.reserve(lNStrips);
197 std::vector<SiStripProcessedRawDigi>& noiseDetSetData = noiseData.back().data;
198 noiseDetSetData.reserve(lNStrips);
199 std::vector<SiStripRawDigi>& pedSubtrDetSetData = pedSubtrData.back().data;
200 pedSubtrDetSetData.reserve(lNStrips);
201 std::vector<SiStripRawDigi>& cmSubtrDetSetData = cmSubtrData.back().data;
202 cmSubtrDetSetData.reserve(lNStrips);
210 std::vector<uint32_t> medsDetSetData;
211 medsDetSetData.reserve(lNPairs*2);
216 uint16_t lFedChannel = 0;
220 lDetId = lConnection.
detId();
245 medsData[inputChannel->detId()] = medsDetSetData;
249 if (!zsDetSetData.empty()) zsData.push_back( zsDetSetData );
261 std::unique_ptr<std::map<uint32_t,std::vector<uint32_t> > > lMedians(
new std::map<uint32_t,std::vector<uint32_t> >(medsData));
270 iEvent.
put(
std::move(lOutputPedSubtr),
"PedSubtrDigisOrdered");
271 iEvent.
put(
std::move(lOutputCMSubtr),
"CMSubtrDigisOrdered");
276 iEvent.
put(
std::move(lOutputPedSubtr),
"PedSubtrModuleDigis");
278 iEvent.
put(
std::move(lOutputCMSubtr),
"CMSubtrModuleDigis");
static void fedIndex(uint32_t aFedIndex, uint16_t &aFedId, uint16_t &aFedChannel)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void subtractPedestals(const edm::DetSetVector< SiStripRawDigi >::const_iterator &inputChannel, std::vector< SiStripRawDigi > &pedsDetSetData, std::vector< SiStripProcessedRawDigi > &noiseDetSetData, std::vector< SiStripRawDigi > &pedSubtrDetSetData, std::vector< uint32_t > &medsDetSetData, const bool fillApvsForCM)
edm::ESHandle< SiStripNoises > getNoiseHandle(const edm::EventSetup &eventSetup)
uint16_t apvPairNumber() const
edm::ESHandle< SiStripPedestals > getPedestalHandle(const edm::EventSetup &eventSetup)
char const * what() const override
void retrieveNoises(const edm::ESHandle< SiStripNoises > &aHandle)
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > spyReorderedDigisToken_
const uint32_t & detId() const
Class containning control, module, detector and connection information, at the level of a FED channel...
void initialiseModule(const uint32_t aDetId, const uint32_t aNPairs, const uint32_t aPair)
void subtractCM(const std::vector< SiStripRawDigi > &pedSubtrDetSetData, std::vector< SiStripRawDigi > &cmSubtrDetSetData)
iterator end()
Return the off-the-end iterator.
size_type size() const
Return the number of contained DetSets.
static const uint16_t STRIPS_PER_FEDCH
T const * product() const
std::unique_ptr< SiStripRawProcessingAlgorithms > algorithms_
object for zero-suppression
void zeroSuppress(const std::vector< SiStripRawDigi > &cmSubtrDetSetData, edm::DetSet< SiStripDigi > &zsDetSetData, const std::unique_ptr< SiStripRawProcessingAlgorithms > &algorithms)
const SiStripFedCabling * getCabling(const edm::EventSetup &)
Updates the cabling object from the DB.
const uint16_t & nApvPairs() const
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
iterator begin()
Return an iterator to the first DetSet.
void retrievePedestals(const edm::ESHandle< SiStripPedestals > &aHandle)
collection_type::const_iterator const_iterator
sistrip::FEDEmulator fedEmulator_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > spyVirginRawDigisToken_