20 std::cout <<
"****************************************************************\n";
21 std::cout <<
"********************** MATACQ decoder **************************\n";
22 std::cout <<
"****************************************************************\n";
25 for(
int i=0;
i <
max(100, (
int)data.
size()); ++
i){
27 << ((
i+1)%8?
" ":
"\n") ;
30 std::cout <<
"======================================================================\n";
31 #endif //MATACQ_DEBUG defined 37 #endif //MATACQ_DEBUG defined 39 const double ns = 1.e-9;
40 const double ps = 1.e-12;
41 double ts = ns/matacq.getFreqGHz();
43 ps*matacq.getTTrigPs():999.;
44 int version = matacq.getMatacqDataFormatVersion();
50 const std::vector<MatacqTBRawEvent::ChannelData>& chData = matacq.getChannelData();
51 for(
unsigned iCh=0; iCh < chData.size(); ++iCh){
53 samples.resize(chData[iCh].
nSamples);
54 copy(chData[iCh].samples, chData[iCh].samples+chData[iCh].nSamples,
56 int chId = chData[iCh].chId;
57 std::vector<int16_t>
empty;
59 matacqDigiCollection.
push_back(matacqDigi);
60 matacqDigiCollection.
back().swap(samples);
78 std::cout <<
"Error in matacq data. Errot code: " 87 std::cout <<
"Data acquired on : " << ctime(&timeStamp);
89 const std::vector<MatacqTBRawEvent::ChannelData>& channels = matacq.
getChannelData();
90 for(
unsigned i=0;
i< channels.size(); ++
i){
91 std::cout <<
"-------------------------------------- Channel " 93 <<
": " << std::setw(4) << channels[
i].nSamples
94 <<
" samples --------------------------------------\n";
96 for(
int iSample = 0; iSample<channels[
i].nSamples; ++iSample){
99 << ((iSample%20==19)?
"\n":
" ");
102 std::cout <<
"==================================================" 103 "==================================================\n\n";
int getTriggerType() const
void push_back(T const &t)
unsigned getEventId() const
size_t size() const
Lenght of the data buffer in bytes.
int getChannelCount() const
int32_t getStatus() const
int getMatacqDataFormatVersion() const
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
time_t getTimeStamp() const
constexpr size_t nSamples
unsigned getRunNum() const
char data[epos_bytes_allocation]
const std::vector< ChannelData > & getChannelData() const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
unsigned getDccLen() const
const_reference back() const