22 cout <<
"****************************************************************\n";
23 cout <<
"********************** MATACQ decoder **************************\n";
24 cout <<
"****************************************************************\n";
25 cout <<
"FEDRawData: \n";
26 char oldPad =
cout.fill(
'0');
27 for(
int i=0;
i <
max(100, (
int)data.
size()); ++
i){
29 << ((
i+1)%8?
" ":
"\n") ;
32 cout <<
"======================================================================\n";
33 #endif //MATACQ_DEBUG defined 35 matacqDigiCollection);
41 printData(
cout, matacq);
42 #endif //MATACQ_DEBUG defined 44 const double ns = 1.e-9;
45 const double ps = 1.e-12;
55 const vector<MatacqRawEvent::ChannelData>& chData = matacq.
getChannelData();
56 for(
unsigned iCh=0; iCh < chData.size(); ++iCh){
58 samples.resize(chData[iCh].
nSamples);
59 copy(chData[iCh].samples, chData[iCh].samples+chData[iCh].nSamples,
61 int chId = chData[iCh].chId;
62 vector<int16_t>
empty;
64 #if (defined(ECAL_MATACQ_DIGI_VERS) && (ECAL_MATACQ_DIGI_VERS >= 2)) 80 #endif //matacq digi version >=2 81 matacqDigiCollection.
push_back(matacqDigi);
82 matacqDigiCollection.
back().swap(samples);
88 cout <<
"Event id (lv1): " 90 cout <<
"FOV: " << hex <<
"0x" << matacq.
getFov() <<
dec <<
"\n";
91 cout <<
"BX id: " << hex <<
"0x" << matacq.
getBxId() <<
dec <<
"\n";
92 cout <<
"Trigger type: " 96 cout <<
"Field 'DCC errors': " 100 cout <<
"Error in matacq data. Errot code: " 106 cout <<
"Sampling frequency: " << matacq.
getFreqGHz() <<
" GHz\n";
109 cout <<
"Data acquired on : " << ctime(&timeStamp);
111 const vector<MatacqRawEvent::ChannelData>& channels = matacq.
getChannelData();
112 for(
unsigned i=0;
i< channels.size(); ++
i){
113 cout <<
"-------------------------------------- Channel " 115 <<
": " << setw(4) << channels[
i].nSamples
116 <<
" samples --------------------------------------\n";
118 for(
int iSample = 0; iSample<channels[
i].nSamples; ++iSample){
120 cout << setw(4) << adc
121 << ((iSample%20==19)?
"\n":
" ");
124 cout <<
"==================================================" 125 "==================================================\n\n";
timeval timeStamp() const
static unsigned getRunNum(unsigned char *data, size_t size)
static unsigned getOrbitId(unsigned char *data, size_t size)
void push_back(T const &t)
std::vector< int > vernier() const
int32_t getStatus() const
int attenuation_dB() const
size_t size() const
Lenght of the data buffer in bytes.
unsigned getDccLen() const
int getChannelCount() const
int getMatacqDataFormatVersion() const
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
int getTriggerType() const
constexpr size_t nSamples
int getAttenuation_dB() const
unsigned getEventId() const
int getLaserPower() const
char data[epos_bytes_allocation]
time_t getTimeStamp() const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
const std::vector< ChannelData > & getChannelData() const
std::vector< int > getVernier() const
const_reference back() const