62 : productLabel_(pset.getParameter<edm::
InputTag>(
"InputProductLabel")),
63 storeAPVAddress_(pset.getParameter<bool>(
"StoreAPVAddress")),
64 storePayloadDigis_(pset.getParameter<bool>(
"StorePayloadDigis")),
65 storeReorderedDigis_(pset.getParameter<bool>(
"StoreReorderedDigis")),
66 storeModuleDigis_(pset.getParameter<bool>(
"StoreModuleDigis")),
67 discardDigisWithAPVAddressError_(pset.getParameter<bool>(
"DiscardDigisWithWrongAPVAddress")),
68 expectedHeaderBit_(pset.getParameter<uint32_t>(
"ExpectedPositionOfFirstHeaderBit")),
73 LogTrace(
"SiStripSpyDigiConverter") <<
"[sistrip::SpyDigiConverterModule::" << __func__ <<
"]"
74 <<
" Constructing object...";
78 produces<edm::DetSetVector<SiStripRawDigi> >(
"SpyPayload");
80 produces<edm::DetSetVector<SiStripRawDigi> >(
"SpyReordered");
82 produces<edm::DetSetVector<SiStripRawDigi> >(
"SpyVirginRaw");
85 produces<std::vector<uint32_t> >(
"APVAddress");
100 LogTrace(
"SiStripSpyDigiConverter") <<
"[sistrip::SpyDigiConverterModule::" << __func__ <<
"]"
101 <<
" Destructing object...";
116 static bool lFirstEvent =
true;
128 std::unique_ptr<std::vector<uint32_t> > pAPVAddresses(
new std::vector<uint32_t>);
130 std::unique_ptr<sistrip::SpyDigiConverter::DSVRawDigis> payloadDigis, reorderedDigis, moduleDigis;
135 uint16_t lFirstHeaderBit;
139 edm::LogWarning(
"") <<
" -- Majority position for firstHeaderBit in first event (" << lFirstHeaderBit
140 <<
") is not where expected: " <<
static_cast<uint16_t
>(
expectedHeaderBit_) << std::endl;
163 event.put(
std::move(payloadDigis),
"SpyPayload");
165 event.put(
std::move(reorderedDigis),
"SpyReordered");
167 event.put(
std::move(moduleDigis),
"SpyVirginRaw");
169 event.put(
std::move(pAPVAddresses),
"APVAddress");
void produce(edm::Event &, const edm::EventSetup &) override
sistrip::SpyDigiConverterModule SiStripSpyDigiConverterModule
const SiStripFedCabling * fedCabling_
static std::unique_ptr< DSVRawDigis > reorderDigis(const DSVRawDigis *inputPayloadDigis)
const bool discardDigisWithAPVAddressError_
#define DEFINE_FWK_MODULE(type)
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
const edm::InputTag productLabel_
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
static std::unique_ptr< DSVRawDigis > extractPayloadDigis(const DSVRawDigis *inputScopeDigis, std::vector< uint32_t > *pAPVAddresses, const bool discardDigisWithAPVAddrErr, const sistrip::SpyUtilities::FrameQuality &aQuality, const uint16_t expectedPos)
Extract frames from the scope digis.
edm::EDGetTokenT< sistrip::SpyDigiConverter::DSVRawDigis > productToken_
void getMajorityHeader(const edm::DetSetVector< SiStripRawDigi > *aInputDigis, uint16_t &firstHeaderBit, bool printResult=true)
edm::ESWatcher< SiStripFedCablingRcd > cablingWatcher_
static std::unique_ptr< DSVRawDigis > mergeModuleChannels(const DSVRawDigis *inputPhysicalOrderChannelDigis, const SiStripFedCabling &cabling)
const bool storeAPVAddress_
True = store APVE address for each channel.
const bool storeModuleDigis_
void updateFedCabling(const SiStripFedCablingRcd &rcd)
T const * product() const
const bool storePayloadDigis_
T getParameter(std::string const &) const
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
bool check(const edm::EventSetup &iSetup)
sistrip::SpyUtilities::FrameQuality frameQuality_
const uint32_t expectedHeaderBit_
const bool storeReorderedDigis_
Log< level::Warning, false > LogWarning
~SpyDigiConverterModule() override
SpyDigiConverterModule(const edm::ParameterSet &)
A plug-in module that takes the spy channel scope mode digis as input from the Event and creates EDPr...