32 #define SLINK_WORD_SIZE 8
50 mappingToken_ = esConsumes<DTReadOutMapping, DTReadOutMappingRcd>();
56 unpackerParameters.getUntrackedParameter<
bool>(
"performDataIntegrityMonitor",
false);
59 produces<DTDigiCollection>();
60 produces<DTLocalTriggerCollection>();
62 if (performDataIntegrityMonitor) {
63 produces<std::vector<DTDDUData>>();
64 produces<std::vector<std::vector<DTROS25Data>>>();
74 desc.
add<
bool>(
"useStandardFEDid",
true);
85 psd1.
addUntracked<
bool>(
"performDataIntegrityMonitor",
false);
91 psd0.
addUntracked<
bool>(
"performDataIntegrityMonitor",
false);
95 desc.
add<
bool>(
"dqmOnly",
false);
96 descriptions.
add(
"dtUnpackingModule", desc);
104 LogError(
"DTUnpackingModule::produce") <<
" unable to get raw data from the event" << endl;
112 auto detectorProduct = std::make_unique<DTDigiCollection>();
113 auto triggerProduct = std::make_unique<DTLocalTriggerCollection>();
115 auto dduProduct = std::make_unique<std::vector<DTDDUData>>();
116 auto ros25Product = std::make_unique<DTROS25Collection>();
119 int FEDIDmin = 0, FEDIDMax = 0;
128 for (
int id = FEDIDmin;
id <= FEDIDMax; ++
id) {
129 const FEDRawData& feddata = rawdata->FEDData(
id);
131 if (feddata.
size()) {
141 dduProduct->push_back(dynamic_cast<DTDDUUnpacker*>(
unpacker)->getDDUControlData());
142 ros25Product->push_back(dynamic_cast<DTDDUUnpacker*>(
unpacker)->getROSsControlData());
144 ros25Product->push_back(dynamic_cast<DTROS25Unpacker*>(
unpacker)->getROSsControlData());
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
uint16_t *__restrict__ id
virtual void interpretRawData(const unsigned int *index, int datasize, int dduID, edm::ESHandle< DTReadOutMapping > &mapping, std::unique_ptr< DTDigiCollection > &product, std::unique_ptr< DTLocalTriggerCollection > &product2, uint16_t rosList=0)=0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< FEDRawDataCollection > inputLabel
if not you need the label
Log< level::Error, false > LogError
size_t size() const
Lenght of the data buffer in bytes.
int minFEDid_
if not you need to set the range by hand
DTUnpackingModule(const edm::ParameterSet &pset)
Constructor.
bool useStandardFEDid_
do you want to use the standard DT FED ID's, i.e. [770-775]? (why the hell 6??)
~DTUnpackingModule() override
Destructor.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void produce(edm::Event &e, const edm::EventSetup &c) override
Call the Unpackers and create the digis.
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > mappingToken_
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool performDataIntegrityMonitor
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const