10#include "datatypes.hpp" 
   31  std::ostringstream oss(
"0800", std::ostringstream::ate);
 
   32  oss << std::hex << domid.
m_val;
 
   33  if (oss.tellp() != 12) {
 
   34    return stream << 
"undefined";
 
   37  std::string 
const no = oss.str();
 
   38  std::size_t 
const s = no.size();
 
   39  for (std::size_t i = 0; i < s; i += 2) {
 
   41      << char(std::toupper(no[i]))
 
   42      << char(std::toupper(no[i + 1]))
 
   43      << (i != s - 2 ? 
":" : 
"");
 
 
   51  , dom_map_type 
const& name_map
 
   57  if (! name_map.empty()) {
 
   58    dom_map_type::const_iterator 
const it
 
   61    if (it != name_map.end()) {
 
   62      name = 
" - " + it->second;
 
   69      << 
"DataType:          " << header.
dataType()           << 
'\n' 
   70      << 
"RunNumber:         " << header.
runNumber()          << 
'\n' 
   76      << 
"          " << UTCTime_h(header.
timeStamp(), valid) << 
'\n' 
   80      << 
"DOMStatus 1:       " << header.
domStatus(1) << 
'\n' 
   81      << 
"DOMStatus 2:       " << header.
domStatus(2);
 
   84    std::cout << 
" (trailer)\n";
 
   90      << 
"DOMStatus 3:       " << header.
domStatus(3) << 
'\n' 
   91      << 
"DOMStatus 4:       " << header.
domStatus(4) << std::endl;
 
 
   95    const char* 
const buffer,
 
   99  unsigned int const nhits =
 
  102  std::cout << 
"Number of hits: " << nhits << 
'\n';
 
  105    const int printing = 20 > nhits ? nhits : 20;
 
  106    const unsigned int n = max_col > 37 ? max_col / 37 : 1;
 
  108    for (
int i = 0; i < printing; ++i) {
 
  109      const hit_t* 
const hit = 
static_cast<const hit_t* const
>(
 
  110          static_cast<const void* const
>(buffer
 
  112            + i * 
sizeof(hit_t)));
 
  116        << std::setfill(
'0') << std::setw(2)
 
  121      if ((i + 1) % n == 0) {
 
 
  133    const char* 
const buffer
 
  138      static_cast<void const*
>(buffer));
 
  144    std::cout << 
"InfoWord: yes\n" 
  145              << *
static_cast<InfoWord const*
>(
static_cast<void const*
>(
 
  150    std::cout << 
"InfoWord: no\n";
 
 
  155    const char* 
const buffer
 
  159  const unsigned int n = max_col > 14 ? max_col / 14 : 1;
 
  161  for (
int i = 0; i < 31; ++i) {
 
  162    uint32_t 
const* 
const field = 
static_cast<uint32_t const*
>(
 
  168      << std::setfill(
'0') << std::setw(2)
 
  170      << std::setfill(
' ') << std::setw(6)
 
  171      << htonl(*field) << 
"  ";
 
  173    if ((i + 1) % n == 0) {
 
  180  ssize_t 
const minimum_size = 
sizeof(
CLBCommonHeader) + 
sizeof(
int) * 31;
 
  184      << 
"SlowControl data:\n" 
  185      << *
static_cast<SCData const*
>(
static_cast<void const*
>(
 
  186             buffer + minimum_size
 
 
static const size_t buffer_size
 
static const unsigned int ttdc
 
bool is_infoword(const void *const data)
 
void print_optical_data(const char *const buffer, ssize_t buffer_size, int max_col)
 
void print_acoustic_data(const char *const buffer, ssize_t buffer_size, int max_col)
 
std::ostream & operator<<(std::ostream &stream, DOMID_h const &domid)
 
void print_monitoring_data(const char *const buffer, ssize_t buffer_size, int max_col)
 
void print_header(CLBCommonHeader const &header, dom_map_type const &name_map)