#include <MatacqDataFormatter.h>
Definition at line 14 of file MatacqDataFormatter.h.
◆ MatacqTBDataFormatter()
MatacqTBDataFormatter::MatacqTBDataFormatter |
( |
| ) |
|
|
inline |
◆ ~MatacqTBDataFormatter()
virtual MatacqTBDataFormatter::~MatacqTBDataFormatter |
( |
| ) |
|
|
inlinevirtual |
◆ interpretRawData()
Callback method for decoding raw data
- Parameters
-
data | raw data |
matacqDigiCollection | [out] digi collection object to fill with the decoded data |
Definition at line 16 of file MatacqDataFormatter.cc.
References edm::SortedCollection< T, SORT >::back(), filterCSVwithJSON::copy, gather_cfg::cout, data, relativeConstraints::empty, mps_fire::i, createfilelist::int, SiStripPI::max, PresampleTask_cfi::nSamples, printData(), edm::SortedCollection< T, SORT >::push_back(), EgammaValidation_cff::samples, dttriganalyzer_cfi::tTrig, and BeamSplash_cfg::version.
Referenced by EcalDCCTBUnpackingModule::produce(), and EcalDCCTB07UnpackingModule::produce().
18 std::cout <<
"****************************************************************\n";
19 std::cout <<
"********************** MATACQ decoder **************************\n";
20 std::cout <<
"****************************************************************\n";
23 for (
int i = 0;
i <
max(100, (
int)
data.size()); ++
i) {
24 std::cout << std::hex << std::setw(2) << (
int)(
data.data()[
i]) << ((
i + 1) % 8 ?
" " :
"\n");
27 std::cout <<
"======================================================================\n";
28 #endif //MATACQ_DEBUG defined 34 #endif //MATACQ_DEBUG defined 36 const double ns = 1.e-9;
37 const double ps = 1.e-12;
38 double ts = ns / matacq.getFreqGHz();
40 int version = matacq.getMatacqDataFormatVersion();
46 const std::vector<MatacqTBRawEvent::ChannelData>& chData = matacq.getChannelData();
47 for (
unsigned iCh = 0; iCh < chData.size(); ++iCh) {
51 int chId = chData[iCh].chId;
52 std::vector<int16_t>
empty;
54 matacqDigiCollection.
push_back(matacqDigi);
void push_back(T const &t)
char data[epos_bytes_allocation]
const_reference back() const
◆ printData()
void MatacqTBDataFormatter::printData |
( |
std::ostream & |
out, |
|
|
const MatacqTBRawEvent & |
event |
|
) |
| const |
|
private |
Definition at line 59 of file MatacqDataFormatter.cc.
References gpuClustering::adc, ewkTauDQM_cfi::channels, gather_cfg::cout, TauDecayModes::dec, MatacqTBRawEvent::getBxId(), MatacqTBRawEvent::getChannelCount(), MatacqTBRawEvent::getChannelData(), MatacqTBRawEvent::getDccErrors(), MatacqTBRawEvent::getDccLen(), MatacqTBRawEvent::getEventId(), MatacqTBRawEvent::getFedId(), MatacqTBRawEvent::getFov(), MatacqTBRawEvent::getFreqGHz(), MatacqTBRawEvent::getMatacqDataFormatVersion(), MatacqTBRawEvent::getRunNum(), MatacqTBRawEvent::getStatus(), MatacqTBRawEvent::getTimeStamp(), MatacqTBRawEvent::getTriggerType(), and mps_fire::i.
Referenced by interpretRawData().
60 std::cout <<
"FED id: " << std::hex <<
"0x" << matacq.getFedId() <<
std::dec <<
"\n";
61 std::cout <<
"Event id (lv1): " << std::hex <<
"0x" << matacq.getEventId() <<
std::dec <<
"\n";
63 std::cout <<
"BX id: " << std::hex <<
"0x" << matacq.getBxId() <<
std::dec <<
"\n";
64 std::cout <<
"Trigger type: " << std::hex <<
"0x" << matacq.getTriggerType() <<
std::dec <<
"\n";
65 std::cout <<
"DCC Length: " << matacq.getDccLen() <<
"\n";
66 std::cout <<
"Run number: " << matacq.getRunNum() <<
"\n";
67 std::cout <<
"Field 'DCC errors': " << std::hex <<
"0x" << matacq.getDccErrors() <<
std::dec <<
"\n";
69 if (matacq.getStatus()) {
70 std::cout <<
"Error in matacq data. Errot code: " << std::hex <<
"0x" << matacq.getStatus() <<
std::dec <<
"\n";
73 std::cout <<
"MATACQ data format version: " << matacq.getMatacqDataFormatVersion() <<
"\n";
74 std::cout <<
"Sampling frequency: " << matacq.getFreqGHz() <<
" GHz\n";
75 std::cout <<
"MATACQ channel count: " << matacq.getChannelCount() <<
"\n";
76 time_t timeStamp = matacq.getTimeStamp();
77 std::cout <<
"Data acquired on : " << ctime(&timeStamp);
79 const std::vector<MatacqTBRawEvent::ChannelData>&
channels = matacq.getChannelData();
81 std::cout <<
"-------------------------------------- Channel " <<
channels[
i].chId <<
": " << std::setw(4)
82 <<
channels[
i].nSamples <<
" samples --------------------------------------\n";
84 for (
int iSample = 0; iSample <
channels[
i].nSamples; ++iSample) {
86 std::cout << std::setw(4) <<
adc << ((iSample % 20 == 19) ?
"\n" :
" ");
89 std::cout <<
"==================================================" 90 "==================================================\n\n";
uint16_t *__restrict__ uint16_t const *__restrict__ adc