25 doFullCorruptBufferChecks_(
false),
26 doAPVEmulatorCheck_(
true)
30 <<
"[sistrip::RawToDigiModule::" << __func__ <<
"]" 31 <<
" Constructing object...";
35 int16_t appended_bytes = pset.
getParameter<
int>(
"AppendedBytes");
36 int16_t trigger_fed_id = pset.
getParameter<
int>(
"TriggerFedId");
37 bool legacy_unpacker = pset.
getParameter<
bool>(
"LegacyUnpacker");
38 bool use_daq_register = pset.
getParameter<
bool>(
"UseDaqRegister");
39 bool using_fed_key = pset.
getParameter<
bool>(
"UseFedKey");
40 bool unpack_bad_channels = pset.
getParameter<
bool>(
"UnpackBadChannels");
41 bool mark_missing_feds = pset.
getParameter<
bool>(
"MarkModulesOnMissingFeds");
50 uint32_t errorThreshold = pset.
getParameter<
unsigned int>(
"ErrorThreshold");
52 rawToDigi_ =
new sistrip::RawToDigiUnpacker( appended_bytes, fed_buffer_dump_freq, fed_event_dump_freq, trigger_fed_id, using_fed_key, unpack_bad_channels, mark_missing_feds, errorThreshold);
53 rawToDigi_->legacy(legacy_unpacker);
54 rawToDigi_->quiet(quiet);
55 rawToDigi_->useDaqRegister( use_daq_register );
56 rawToDigi_->extractCm(extractCm_);
57 rawToDigi_->doFullCorruptBufferChecks(doFullCorruptBufferChecks_);
58 rawToDigi_->doAPVEmulatorCheck(doAPVEmulatorCheck_);
60 produces< SiStripEventSummary >();
61 produces< edm::DetSetVector<SiStripRawDigi> >(
"ScopeMode");
62 produces< edm::DetSetVector<SiStripRawDigi> >(
"VirginRaw");
63 produces< edm::DetSetVector<SiStripRawDigi> >(
"ProcessedRaw");
64 produces< edm::DetSetVector<SiStripDigi> >(
"ZeroSuppressed");
65 produces<DetIdCollection>();
66 if ( extractCm_ ) produces< edm::DetSetVector<SiStripRawDigi> >(
"CommonMode");
75 <<
"[sistrip::RawToDigiModule::" << __func__ <<
"]" 76 <<
" Destructing object...";
96 event.getByToken(
token_, buffers );
99 auto summary = std::make_unique<SiStripEventSummary>();
114 std::unique_ptr< edm::DetSetVector<SiStripRawDigi> > sm_dsv(sm);
115 std::unique_ptr< edm::DetSetVector<SiStripRawDigi> > vr_dsv(vr);
116 std::unique_ptr< edm::DetSetVector<SiStripRawDigi> > pr_dsv(pr);
117 std::unique_ptr< edm::DetSetVector<SiStripDigi> > zs_dsv(zs);
118 std::unique_ptr< DetIdCollection > det_ids(ids);
119 std::unique_ptr< edm::DetSetVector<SiStripRawDigi> > cm_dsv(cm);
123 event.put(
std::move(sm_dsv),
"ScopeMode");
124 event.put(
std::move(vr_dsv),
"VirginRaw");
125 event.put(
std::move(pr_dsv),
"ProcessedRaw");
126 event.put(
std::move(zs_dsv),
"ZeroSuppressed");
144 std::stringstream ss;
145 ss <<
"[sistrip::RawToDigiModule::" << __func__ <<
"]" 146 <<
" Updating cabling for first time..." << std::endl
147 <<
" Terse print out of FED cabling:" << std::endl;
149 LogTrace(
"SiStripRawToDigi") << ss.str();
154 std::stringstream sss;
155 sss <<
"[sistrip::RawToDigiModule::" << __func__ <<
"]" 156 <<
" Summary of FED cabling:" << std::endl;
160 LogTrace(
"SiStripRawToDigi") << sss.str();
void triggerFed(const FEDRawDataCollection &, SiStripEventSummary &, const uint32_t &event)
trigger info
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
RawToDigiModule(const edm::ParameterSet &)
void terse(std::stringstream &) const
edm::EDGetTokenT< FEDRawDataCollection > token_
def setup(process, global_tag, zero_tesla=False)
void produce(edm::Event &, const edm::EventSetup &) override
void updateCabling(const edm::EventSetup &)
~RawToDigiModule() override
void beginRun(const edm::Run &, const edm::EventSetup &) override
void summary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY.
void createDigis(const SiStripFedCabling &, const FEDRawDataCollection &, SiStripEventSummary &, RawDigis &scope_mode, RawDigis &virgin_raw, RawDigis &proc_raw, Digis &zero_suppr, DetIdCollection &, RawDigis &common_mode)
creates digis
bool doFullCorruptBufferChecks_
edm::EDCollection< DetId > DetIdCollection
RawToDigiUnpacker * rawToDigi_
const SiStripFedCabling * cabling_
T const * product() const