Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dune-raw-data
dune-raw-data
Overlays
ToyFragment.cc
Go to the documentation of this file.
1
#include "
dune-raw-data/Overlays/ToyFragment.hh
"
2
3
#include "cetlib_except/exception.h"
4
5
namespace
{
6
7
// JCF, 9/29/14
8
// pop_count() is currently unused; under the new compiler (gcc // 4.9.1 as opposed to 4.8.2) this registers as an error // (-Werror=unused-function) so I've commented it out for now
9
10
// unsigned int pop_count (unsigned int n) {
11
// unsigned int c;
12
// for (c = 0; n; c++) n &= n - 1;
13
// return c;
14
// }
15
}
16
17
void
dune::ToyFragment::checkADCData
(
int
daq_adc_bits)
const
{
18
dune::ToyFragment::adc_t
const
* adcPtr(
findBadADC
(daq_adc_bits));
19
if
(adcPtr !=
dataEnd
()) {
20
throw
cet::exception
(
"IllegalADCVal"
)
21
<<
"Illegal value of ADC word #"
22
<< (adcPtr -
dataBegin
())
23
<<
": 0x"
24
<<
std::hex
25
<< *adcPtr
26
<<
"."
;
27
}
28
}
29
30
std::ostream &
dune::operator <<
(std::ostream & os,
ToyFragment
const
&
f
) {
31
os <<
"ToyFragment event size: "
32
<< f.
hdr_event_size
()
33
<<
", run number: "
34
<< f.
hdr_run_number
()
35
<<
"\n"
;
36
37
return
os;
38
}
39
keras_to_tensorflow.f
f
Definition:
keras_to_tensorflow.py:162
dune::ToyFragment::adc_t
uint16_t adc_t
Definition:
ToyFragment.hh:30
dune::operator<<
std::ostream & operator<<(std::ostream &out, CTBFragment const &f)
Definition:
CTBFragment.cc:6
dune::ToyFragment::findBadADC
adc_t const * findBadADC(int daq_adc_bits) const
Definition:
ToyFragment.hh:118
hex
QTextStream & hex(QTextStream &s)
Definition:
qtextstream.cpp:2024
ToyFragment.hh
dune::ToyFragment::dataEnd
adc_t const * dataEnd() const
Definition:
ToyFragment.hh:107
dune::ToyFragment::hdr_event_size
Header::event_size_t hdr_event_size() const
Definition:
ToyFragment.hh:92
dune::ToyFragment
Definition:
ToyFragment.hh:21
dune::ToyFragment::dataBegin
adc_t const * dataBegin() const
Definition:
ToyFragment.hh:102
dune::ToyFragment::checkADCData
void checkADCData(int daq_adc_bits) const
Definition:
ToyFragment.cc:17
dune::ToyFragment::hdr_run_number
Header::run_number_t hdr_run_number() const
Definition:
ToyFragment.hh:93
fhicl::exception
cet::coded_exception< error, detail::translate > exception
Definition:
exception.h:33
Generated by
1.8.11