104 byModule_(iConfig.getParameter<bool>(
"ByModule")),
115 produces<std::map<uint32_t,std::vector<uint32_t> > >(
"Medians");
116 produces<edm::DetSetVector<SiStripRawDigi> >(
"PedestalsOrdered");
117 produces<edm::DetSetVector<SiStripProcessedRawDigi> >(
"NoisesOrdered");
118 produces<edm::DetSetVector<SiStripRawDigi> >(
"PedSubtrDigisOrdered");
119 produces<edm::DetSetVector<SiStripRawDigi> >(
"CMSubtrDigisOrdered");
122 produces<edm::DetSetVector<SiStripRawDigi> >(
"ModulePedestals");
123 produces<edm::DetSetVector<SiStripProcessedRawDigi> >(
"ModuleNoises");
124 produces<edm::DetSetVector<SiStripRawDigi> >(
"PedSubtrModuleDigis");
125 produces<std::map<uint32_t,std::vector<uint32_t> > >(
"ModuleMedians");
126 produces<edm::DetSetVector<SiStripRawDigi> >(
"CMSubtrModuleDigis");
127 produces<edm::DetSetVector<SiStripDigi> >(
"ZSModuleDigis");
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.
size()) 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");
virtual char const * what() const
static void fedIndex(uint32_t aFedIndex, uint16_t &aFedId, uint16_t &aFedChannel)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
def create(alignables, pedeDump, additionalData, outputFile, config)
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
edm::InputTag spyReorderedDigisTag_
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)
#define DEFINE_FWK_MODULE(type)
edm::ESHandle< SiStripNoises > getNoiseHandle(const edm::EventSetup &eventSetup)
uint16_t apvPairNumber() const
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::ESHandle< SiStripPedestals > getPedestalHandle(const edm::EventSetup &eventSetup)
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
void initialise(const bool byModule)
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)
Constants and enumerated types for FED/FEC systems.
static const char * messageLabel_
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...
edm::InputTag spyVirginRawDigisTag_
iterator begin()
Return an iterator to the first DetSet.
void retrievePedestals(const edm::ESHandle< SiStripPedestals > &aHandle)
collection_type::const_iterator const_iterator
FEDEmulatorModule(const edm::ParameterSet &)
sistrip::FEDEmulator fedEmulator_
sistrip::FEDEmulatorModule SiStripFEDEmulatorModule
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > spyVirginRawDigisToken_