106 : spyReorderedDigisTag_(iConfig.getParameter<
edm::
InputTag>(
"SpyReorderedDigisTag")),
107 spyVirginRawDigisTag_(iConfig.getParameter<
edm::
InputTag>(
"SpyVirginRawDigisTag")),
108 byModule_(iConfig.getParameter<
bool>(
"ByModule")),
110 consumesCollector())),
124 produces<std::map<uint32_t, std::vector<uint32_t> > >(
"Medians");
125 produces<edm::DetSetVector<SiStripRawDigi> >(
"PedestalsOrdered");
126 produces<edm::DetSetVector<SiStripProcessedRawDigi> >(
"NoisesOrdered");
127 produces<edm::DetSetVector<SiStripRawDigi> >(
"PedSubtrDigisOrdered");
128 produces<edm::DetSetVector<SiStripRawDigi> >(
"CMSubtrDigisOrdered");
130 produces<edm::DetSetVector<SiStripRawDigi> >(
"ModulePedestals");
131 produces<edm::DetSetVector<SiStripProcessedRawDigi> >(
"ModuleNoises");
132 produces<edm::DetSetVector<SiStripRawDigi> >(
"PedSubtrModuleDigis");
133 produces<std::map<uint32_t, std::vector<uint32_t> > >(
"ModuleMedians");
134 produces<edm::DetSetVector<SiStripRawDigi> >(
"CMSubtrModuleDigis");
135 produces<edm::DetSetVector<SiStripDigi> >(
"ZSModuleDigis");
172 unsigned int lNDigis = lInputDigis->
size();
176 std::vector<edm::DetSetVector<SiStripRawDigi>::detset> pedsData;
177 pedsData.reserve(lNDigis);
178 std::vector<edm::DetSetVector<SiStripProcessedRawDigi>::detset> noiseData;
179 noiseData.reserve(lNDigis);
180 std::vector<edm::DetSetVector<SiStripRawDigi>::detset> pedSubtrData;
181 pedSubtrData.reserve(lNDigis);
182 std::vector<edm::DetSetVector<SiStripRawDigi>::detset> cmSubtrData;
183 cmSubtrData.reserve(lNDigis);
185 std::vector<edm::DetSet<SiStripDigi> > zsData;
188 std::map<uint32_t, std::vector<uint32_t> > medsData;
192 for (; inputChannel != lInputDigis->
end(); ++inputChannel) {
193 uint32_t lDetId = inputChannel->detId();
200 unsigned int lNStrips = inputChannel->
size();
203 std::vector<SiStripRawDigi>& pedsDetSetData = pedsData.back().data;
204 pedsDetSetData.reserve(lNStrips);
205 std::vector<SiStripProcessedRawDigi>& noiseDetSetData = noiseData.back().data;
206 noiseDetSetData.reserve(lNStrips);
207 std::vector<SiStripRawDigi>& pedSubtrDetSetData = pedSubtrData.back().data;
208 pedSubtrDetSetData.reserve(lNStrips);
209 std::vector<SiStripRawDigi>& cmSubtrDetSetData = cmSubtrData.back().data;
210 cmSubtrDetSetData.reserve(lNStrips);
218 std::vector<uint32_t> medsDetSetData;
219 medsDetSetData.reserve(lNPairs * 2);
224 uint16_t lFedChannel = 0;
228 lDetId = lConnection.
detId();
244 inputChannel, pedsDetSetData, noiseDetSetData, pedSubtrDetSetData, medsDetSetData,
true);
249 medsData[inputChannel->detId()] = medsDetSetData;
253 if (!zsDetSetData.
empty())
254 zsData.push_back(zsDetSetData);
259 std::unique_ptr<edm::DetSetVector<SiStripProcessedRawDigi> > lNoises(
262 std::unique_ptr<edm::DetSetVector<SiStripRawDigi> > lOutputPedSubtr(
265 std::unique_ptr<edm::DetSetVector<SiStripRawDigi> > lOutputCMSubtr(
268 std::unique_ptr<std::map<uint32_t, std::vector<uint32_t> > > lMedians(
269 new std::map<uint32_t, std::vector<uint32_t> >(medsData));
edm::ESWatcher< SiStripNoisesRcd > noisesWatcher_
const SiStripNoises * noises_
void updatePedestals(const SiStripPedestalsRcd &rcd)
def create(alignables, pedeDump, additionalData, outputFile, config)
edm::InputTag spyReorderedDigisTag_
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)
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
T const * product() const
void produce(edm::Event &, const edm::EventSetup &) override
const SiStripFedCabling * fedCabling_
void fedIndex(uint32_t aFedIndex, uint16_t &aFedId, uint16_t &aFedChannel)
Log< level::Error, false > LogError
edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noisesToken_
void retrieveNoises(const edm::ESHandle< SiStripNoises > &aHandle)
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
size_type size() const
Return the number of contained DetSets.
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > spyReorderedDigisToken_
Class containning control, module, detector and connection information, at the level of a FED channel...
~FEDEmulatorModule() override
static const char *const messageLabel_
void initialiseModule(const uint32_t aDetId, const uint32_t aNPairs, const uint32_t aPair)
void updateFedCabling(const SiStripFedCablingRcd &rcd)
void subtractCM(const std::vector< SiStripRawDigi > &pedSubtrDetSetData, std::vector< SiStripRawDigi > &cmSubtrDetSetData)
void updateNoises(const SiStripNoisesRcd &rcd)
iterator end()
Return the off-the-end iterator.
const uint32_t & detId() const
edm::ESWatcher< SiStripPedestalsRcd > pedestalsWatcher_
Log< level::Info, false > LogInfo
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
static const uint16_t STRIPS_PER_FEDCH
void initialise(const bool byModule)
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.
const uint16_t & nApvPairs() const
uint16_t apvPairNumber() const
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
bool check(const edm::EventSetup &iSetup)
edm::InputTag spyVirginRawDigisTag_
iterator begin()
Return an iterator to the first DetSet.
void retrievePedestals(const edm::ESHandle< SiStripPedestals > &aHandle)
Log< level::Warning, false > LogWarning
collection_type::const_iterator const_iterator
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
FEDEmulatorModule(const edm::ParameterSet &)
sistrip::FEDEmulator fedEmulator_
sistrip::FEDEmulatorModule SiStripFEDEmulatorModule
edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > pedestalsToken_
edm::ESWatcher< SiStripFedCablingRcd > cablingWatcher_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > spyVirginRawDigisToken_
const SiStripPedestals * pedestals_