59 storeAPVAddress_(
pset.getParameter<
bool>(
"StoreAPVAddress")),
60 storePayloadDigis_(
pset.getParameter<
bool>(
"StorePayloadDigis")),
61 storeReorderedDigis_(
pset.getParameter<
bool>(
"StoreReorderedDigis")),
62 storeModuleDigis_(
pset.getParameter<
bool>(
"StoreModuleDigis")),
63 discardDigisWithAPVAddressError_(
pset.getParameter<
bool>(
"DiscardDigisWithWrongAPVAddress")),
64 expectedHeaderBit_(
pset.getParameter<uint32_t>(
"ExpectedPositionOfFirstHeaderBit")) {
67 LogTrace(
"SiStripSpyDigiConverter") <<
"[sistrip::SpyDigiConverterModule::" << __func__ <<
"]" 68 <<
" Constructing object...";
75 produces<edm::DetSetVector<SiStripRawDigi> >(
"SpyPayload");
77 produces<edm::DetSetVector<SiStripRawDigi> >(
"SpyReordered");
79 produces<edm::DetSetVector<SiStripRawDigi> >(
"SpyVirginRaw");
82 produces<std::vector<uint32_t> >(
"APVAddress");
97 LogTrace(
"SiStripSpyDigiConverter") <<
"[sistrip::SpyDigiConverterModule::" << __func__ <<
"]" 98 <<
" Destructing object...";
117 std::unique_ptr<std::vector<uint32_t> > pAPVAddresses(
new std::vector<uint32_t>);
119 std::unique_ptr<sistrip::SpyDigiConverter::DSVRawDigis> payloadDigis, reorderedDigis, moduleDigis;
123 auto run_once = [
this](
auto digis) {
124 uint16_t lFirstHeaderBit;
128 edm::LogWarning(
"") <<
" -- Majority position for firstHeaderBit in first event (" << lFirstHeaderBit
129 <<
") is not where expected: " <<
static_cast<uint16_t
>(
expectedHeaderBit_) << std::endl;
134 [[maybe_unused]]
static const bool lFirstEvent = run_once(scopeDigisHandle.
product());
156 event.put(
std::move(payloadDigis),
"SpyPayload");
158 event.put(
std::move(reorderedDigis),
"SpyReordered");
160 event.put(
std::move(moduleDigis),
"SpyVirginRaw");
162 event.put(
std::move(pAPVAddresses),
"APVAddress");
sistrip::SpyDigiConverterModule SiStripSpyDigiConverterModule
static std::unique_ptr< DSVRawDigis > reorderDigis(const DSVRawDigis *inputPayloadDigis)
const bool discardDigisWithAPVAddressError_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
const edm::InputTag productLabel_
T const * product() 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)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
#define DEFINE_FWK_MODULE(type)
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_
const bool storePayloadDigis_
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...