69 template <
typename DigiType>
82 errSummary(
"TotemVFATRawToDigi",
"[TotemVFATRawToDigi]",
false) {
97 <<
"Unknown sub-system string " <<
subSystemName <<
"." << endl;
141 LogDebug(
"TotemVFATRawToDigi").log([
this](
auto &
log) {
142 log <<
"List of FEDs handled by this instance: ";
159 run<DetSetVector<TotemRPDigi>>(
event, es);
162 run<DetSetVector<CTPPSDiamondDigi>>(
event, es);
165 run<DetSetVector<TotemTimingDigi>>(
event, es);
168 run<edmNew::DetSetVector<TotemT2Digi>>(
event, es);
171 template <
typename DigiType>
183 vector<TotemFEDInfo> fedInfo;
188 bool data_exist =
false;
192 if (
data.size() > 0) {
204 <<
"No DAQMapping found for " <<
subSystemName <<
"." << endl;
210 analysisMask = *analysisMaskHandle;
221 event.put(make_unique<vector<TotemFEDInfo>>(fedInfo),
subSystemName);
236 desc.add<std::vector<unsigned int>>(
"fedIds", {})
238 "IMPORTANT: leave empty to load the default configuration from " 239 "DataFormats/FEDRawData/interface/FEDNumbering.h");
249 "0-3: 1=one line/event with some corrupted VFAT frame, 2=list all corrupt VFAT frames/event, 3=all " 250 "problems with every corrupt frame");
251 psd0.
add<
unsigned int>(
"testFootprint", 2)->setComment(
"0=no test, 1=warn only, 2=warn and skip");
252 psd0.
add<
unsigned int>(
"testCRC", 2);
253 psd0.
add<
unsigned int>(
"testID", 2)->setComment(
"compare the ID from data and mapping");
254 psd0.
add<
unsigned int>(
"testECMostFrequent", 2)
255 ->setComment(
"compare frame EC with the most frequent value in the event");
256 psd0.
add<
unsigned int>(
"testBCMostFrequent", 2);
258 ->setComment(
"minimal number of frames to search for the most frequent counter value");
262 "the most frequent counter value is accepted provided its relative occupancy is higher than this fraction");
264 psd0.
add<
bool>(
"useOlderT2TestFile",
false)
265 ->setComment(
"treat hwID field as two separate 8-bit fields instead of one 16-bit");
266 psd0.
addUntracked<
bool>(
"printErrorSummary",
false)->setComment(
"per-VFAT error summary at the end of the job");
267 psd0.
addUntracked<
bool>(
"printUnknownFrameSummary",
false)
268 ->setComment(
"summary of frames found in data, but not in the mapping");
271 descriptions.
add(
"totemVFATRawToDigi",
desc);
void setComment(std::string const &value)
T getParameter(std::string const &) const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
pps::RawDataUnpacker rawDataUnpacker
edm::ESGetToken< TotemDAQMapping, TotemReadoutRcd > totemMappingToken
edm::ESGetToken< TotemAnalysisMask, TotemAnalysisMaskRcd > analysisMaskToken
void run(edm::Event &, const edm::EventSetup &)
~TotemVFATRawToDigi() override
std::vector< unsigned int > fedIds
CTPPSRawToDigiErrorSummary errSummary
TotemVFATRawToDigi(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
void add(const std::string &message, const std::string &details="")
ParameterDescriptionBase * add(U const &iLabel, T const &value)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
int run(int fedId, const FEDRawData &data, std::vector< TotemFEDInfo > &fedInfoColl, SimpleVFATFrameCollection &coll) const
Unpack data from FED with fedId into ‘coll’ collection.
enum TotemVFATRawToDigi::@500 subSystem
Collection of code to convert TOTEM raw data into digi.
edm::EDGetTokenT< FEDRawDataCollection > fedDataToken
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Collection of code for unpacking of TOTEM raw-data.
ParameterSet const & getParameterSet(ParameterSetID const &id)
char data[epos_bytes_allocation]
void printSummaries() const
Print error summaries.
RawToDigiConverter rawToDigiConverter
void printSummary() const
static void fillDescriptions(edm::ConfigurationDescriptions &)
void produce(edm::Event &, const edm::EventSetup &) override
std::string subSystemName
void run(const VFATFrameCollection &coll, const TotemDAQMapping &mapping, const TotemAnalysisMask &mask, edm::DetSetVector< TotemRPDigi > &digi, edm::DetSetVector< TotemVFATStatus > &status)
Creates RP digi.
void endStream() override