DABC (Data Acquisition Backbone Core)  2.9.9
Data Structures | Enumerations | Functions | Variables
hldprint.cxx File Reference
#include <cstdio>
#include <cstring>
#include <map>
#include <vector>
#include <algorithm>
#include <ctime>
#include "hadaq/api.h"
#include "dabc/Url.h"
#include "dabc/api.h"

Go to the source code of this file.

Data Structures

struct  SubevStat
 

Enumerations

enum  { NumTdcErr = 6 }
 
enum  {
  newkind_TMDT = 0x80000000 , newkind_Mask3 = 0xE0000000 , newkind_HDR = 0x20000000 , newkind_TRL = 0x00000000 ,
  newkind_EPOC = 0x60000000 , newkind_Mask4 = 0xF0000000 , newkind_TMDS = 0x40000000 , newkind_Mask6 = 0xFC000000 ,
  newkind_TBD = 0x50000000 , newkind_Mask8 = 0xFF000000 , newkind_HSTM = 0x54000000 , newkind_HSTL = 0x55000000 ,
  newkind_HSDA = 0x56000000 , newkind_HSDB = 0x57000000 , newkind_CTA = 0x58000000 , newkind_CTB = 0x59000000 ,
  newkind_TEMP = 0x5A000000 , newkind_BAD = 0x5B000000 , newkind_Mask9 = 0xFF800000 , newkind_TTRM = 0x5C000000 ,
  newkind_TTRL = 0x5C800000 , newkind_TTCM = 0x5D000000 , newkind_TTCL = 0x5D800000 , newkind_Mask7 = 0xFE000000 ,
  newkind_TMDR = 0x5E000000
}
 
enum  TdcErrorsKind {
  tdcerr_MissHeader = 0x0001 , tdcerr_MissCh0 = 0x0002 , tdcerr_MissEpoch = 0x0004 , tdcerr_NoData = 0x0008 ,
  tdcerr_Sequence = 0x0010 , tdcerr_ToT = 0x0020
}
 
enum  TdcMessageKind {
  tdckind_Reserved = 0x00000000 , tdckind_Header = 0x20000000 , tdckind_Debug = 0x40000000 , tdckind_Epoch = 0x60000000 ,
  tdckind_Mask = 0xe0000000 , tdckind_Hit = 0x80000000 , tdckind_Hit1 = 0xa0000000 , tdckind_Hit2 = 0xc0000000 ,
  tdckind_Calibr = 0xe0000000
}
 
enum  TrbDecodeKind { decode_SingleSubev = 0x8 }
 

Functions

unsigned BubbleCheck (unsigned *bubble, int &p1, int &p2)
 
double coarse_tmlen (5.)
 
const char * getCol (const char *col_name)
 
bool is_adc (unsigned id)
 
bool is_cts (unsigned id)
 
bool is_hub (unsigned id)
 
bool is_newtdc (unsigned id)
 
bool is_tdc (unsigned id)
 
int main (int argc, char *argv[])
 
void PrintAdcData (hadaq::RawSubevent *sub, unsigned ix, unsigned len, unsigned prefix)
 
void PrintBubble (unsigned *bubble, unsigned len=0)
 
void PrintBubbleBinary (unsigned *bubble, int p1=-1, int p2=-1)
 
bool PrintBubbleData (hadaq::RawSubevent *sub, unsigned ix, unsigned len, unsigned prefix)
 
void PrintCtsData (hadaq::RawSubevent *sub, unsigned ix, unsigned len, unsigned prefix)
 
void PrintMonitorData (hadaq::RawSubevent *sub)
 
void PrintTdc4Data (hadaq::RawSubevent *sub, unsigned ix, unsigned len, unsigned prefix)
 
void PrintTdcData (hadaq::RawSubevent *sub, unsigned ix, unsigned len, unsigned prefix, unsigned &errmask, SubevStat *substat=nullptr)
 
const char * TdcErrName (int cnt)
 
double tot_limit (20.)
 
double tot_shift (20.)
 
int usage (const char *errstr=nullptr)
 

Variables

unsigned adcmask = 0
 
bool autoid = false
 
bool bubble_mode {false}
 
unsigned BUBBLE_SIZE = 19
 
const char * col_BLACK = "\033[30m"
 
const char * col_BLUE = "\033[34m"
 
const char * col_CYAN = "\033[36m"
 
const char * col_GREEN = "\033[32m"
 
const char * col_MAGENTA = "\033[35m"
 
const char * col_RED = "\033[31m"
 
const char * col_RESET = "\033[0m"
 
const char * col_WHITE = "\033[37m"
 
const char * col_YELLOW = "\033[33m"
 
std::vector< unsigned > ctsids
 
const char * debug_name [32]
 
bool dostat = false
 
bool epoch_per_channel {false}
 
unsigned fine_max = 491
 
unsigned fine_max4 = 350
 
unsigned fine_min = 31
 
unsigned fine_min4 = 28
 
unsigned fullid = 0
 
unsigned hubmask = 0
 
std::vector< unsigned > hubs
 
unsigned idrange = 0xff
 
std::vector< unsigned > newtdcs
 
bool only_errors {false}
 
int onlych = -1
 
unsigned onlymonitor = 0
 
unsigned onlynew = 0
 
unsigned onlyraw = 0
 
unsigned onlytdc = 0
 
bool printraw = false
 
bool printsub = false
 
bool reconnect = false
 
bool showrate = false
 
unsigned skip_msgs_in_tdc = 0
 
std::vector< unsigned > tdcs
 
bool use_400mhz {false}
 
bool use_calibr {true}
 
bool use_colors {true}
 

Enumeration Type Documentation

◆ TrbDecodeKind

Enumerator
decode_SingleSubev 

Definition at line 92 of file hldprint.cxx.

◆ TdcMessageKind

Enumerator
tdckind_Reserved 
tdckind_Header 
tdckind_Debug 
tdckind_Epoch 
tdckind_Mask 
tdckind_Hit 
tdckind_Hit1 
tdckind_Hit2 
tdckind_Calibr 

Definition at line 96 of file hldprint.cxx.

◆ anonymous enum

anonymous enum
Enumerator
NumTdcErr 

Definition at line 108 of file hldprint.cxx.

◆ TdcErrorsKind

Enumerator
tdcerr_MissHeader 
tdcerr_MissCh0 
tdcerr_MissEpoch 
tdcerr_NoData 
tdcerr_Sequence 
tdcerr_ToT 

Definition at line 110 of file hldprint.cxx.

◆ anonymous enum

anonymous enum
Enumerator
newkind_TMDT 
newkind_Mask3 
newkind_HDR 
newkind_TRL 
newkind_EPOC 
newkind_Mask4 
newkind_TMDS 
newkind_Mask6 
newkind_TBD 
newkind_Mask8 
newkind_HSTM 
newkind_HSTL 
newkind_HSDA 
newkind_HSDB 
newkind_CTA 
newkind_CTB 
newkind_TEMP 
newkind_BAD 
newkind_Mask9 
newkind_TTRM 
newkind_TTRL 
newkind_TTCM 
newkind_TTCL 
newkind_Mask7 
newkind_TMDR 

Definition at line 406 of file hldprint.cxx.

Function Documentation

◆ usage()

int usage ( const char *  errstr = nullptr)

Definition at line 28 of file hldprint.cxx.

◆ TdcErrName()

const char* TdcErrName ( int  cnt)

Definition at line 130 of file hldprint.cxx.

◆ tot_limit()

double tot_limit ( 20.  )

◆ tot_shift()

double tot_shift ( 20.  )

◆ coarse_tmlen()

double coarse_tmlen ( 5.  )

◆ getCol()

const char* getCol ( const char *  col_name)

Definition at line 176 of file hldprint.cxx.

◆ BubbleCheck()

unsigned BubbleCheck ( unsigned *  bubble,
int &  p1,
int &  p2 
)

Definition at line 218 of file hldprint.cxx.

◆ PrintBubble()

void PrintBubble ( unsigned *  bubble,
unsigned  len = 0 
)

Definition at line 305 of file hldprint.cxx.

◆ PrintBubbleBinary()

void PrintBubbleBinary ( unsigned *  bubble,
int  p1 = -1,
int  p2 = -1 
)

Definition at line 321 of file hldprint.cxx.

◆ PrintBubbleData()

bool PrintBubbleData ( hadaq::RawSubevent sub,
unsigned  ix,
unsigned  len,
unsigned  prefix 
)

Definition at line 344 of file hldprint.cxx.

◆ PrintTdc4Data()

void PrintTdc4Data ( hadaq::RawSubevent sub,
unsigned  ix,
unsigned  len,
unsigned  prefix 
)

Definition at line 444 of file hldprint.cxx.

◆ PrintTdcData()

void PrintTdcData ( hadaq::RawSubevent sub,
unsigned  ix,
unsigned  len,
unsigned  prefix,
unsigned &  errmask,
SubevStat substat = nullptr 
)

Definition at line 608 of file hldprint.cxx.

◆ PrintCtsData()

void PrintCtsData ( hadaq::RawSubevent sub,
unsigned  ix,
unsigned  len,
unsigned  prefix 
)

Definition at line 852 of file hldprint.cxx.

◆ PrintAdcData()

void PrintAdcData ( hadaq::RawSubevent sub,
unsigned  ix,
unsigned  len,
unsigned  prefix 
)

Definition at line 959 of file hldprint.cxx.

◆ PrintMonitorData()

void PrintMonitorData ( hadaq::RawSubevent sub)

Definition at line 977 of file hldprint.cxx.

◆ is_cts()

bool is_cts ( unsigned  id)

Definition at line 998 of file hldprint.cxx.

◆ is_hub()

bool is_hub ( unsigned  id)

Definition at line 1003 of file hldprint.cxx.

◆ is_tdc()

bool is_tdc ( unsigned  id)

Definition at line 1014 of file hldprint.cxx.

◆ is_newtdc()

bool is_newtdc ( unsigned  id)

Definition at line 1032 of file hldprint.cxx.

◆ is_adc()

bool is_adc ( unsigned  id)

Definition at line 1045 of file hldprint.cxx.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 1050 of file hldprint.cxx.

Variable Documentation

◆ col_RESET

const char* col_RESET = "\033[0m"

Definition at line 120 of file hldprint.cxx.

◆ col_BLACK

const char* col_BLACK = "\033[30m"

Definition at line 121 of file hldprint.cxx.

◆ col_RED

const char* col_RED = "\033[31m"

Definition at line 122 of file hldprint.cxx.

◆ col_GREEN

const char* col_GREEN = "\033[32m"

Definition at line 123 of file hldprint.cxx.

◆ col_YELLOW

const char* col_YELLOW = "\033[33m"

Definition at line 124 of file hldprint.cxx.

◆ col_BLUE

const char* col_BLUE = "\033[34m"

Definition at line 125 of file hldprint.cxx.

◆ col_MAGENTA

const char* col_MAGENTA = "\033[35m"

Definition at line 126 of file hldprint.cxx.

◆ col_CYAN

const char* col_CYAN = "\033[36m"

Definition at line 127 of file hldprint.cxx.

◆ col_WHITE

const char* col_WHITE = "\033[37m"

Definition at line 128 of file hldprint.cxx.

◆ fine_min

unsigned fine_min = 31

Definition at line 172 of file hldprint.cxx.

◆ fine_max

unsigned fine_max = 491

Definition at line 172 of file hldprint.cxx.

◆ fine_min4

unsigned fine_min4 = 28

Definition at line 172 of file hldprint.cxx.

◆ fine_max4

unsigned fine_max4 = 350

Definition at line 172 of file hldprint.cxx.

◆ skip_msgs_in_tdc

unsigned skip_msgs_in_tdc = 0

Definition at line 172 of file hldprint.cxx.

◆ bubble_mode

bool bubble_mode {false}

Definition at line 173 of file hldprint.cxx.

◆ only_errors

bool only_errors {false}

Definition at line 173 of file hldprint.cxx.

◆ use_colors

bool use_colors {true}

Definition at line 173 of file hldprint.cxx.

◆ epoch_per_channel

bool epoch_per_channel {false}

Definition at line 173 of file hldprint.cxx.

◆ use_calibr

bool use_calibr {true}

Definition at line 173 of file hldprint.cxx.

◆ use_400mhz

bool use_400mhz {false}

Definition at line 173 of file hldprint.cxx.

◆ onlych

int onlych = -1

Definition at line 174 of file hldprint.cxx.

◆ debug_name

const char* debug_name[32]

Definition at line 181 of file hldprint.cxx.

◆ BUBBLE_SIZE

unsigned BUBBLE_SIZE = 19

Definition at line 216 of file hldprint.cxx.

◆ printraw

bool printraw = false

Definition at line 994 of file hldprint.cxx.

◆ printsub

bool printsub = false

Definition at line 994 of file hldprint.cxx.

◆ showrate

bool showrate = false

Definition at line 994 of file hldprint.cxx.

◆ reconnect

bool reconnect = false

Definition at line 994 of file hldprint.cxx.

◆ dostat

bool dostat = false

Definition at line 994 of file hldprint.cxx.

◆ autoid

bool autoid = false

Definition at line 994 of file hldprint.cxx.

◆ idrange

unsigned idrange = 0xff

Definition at line 995 of file hldprint.cxx.

◆ onlytdc

unsigned onlytdc = 0

Definition at line 995 of file hldprint.cxx.

◆ onlynew

unsigned onlynew = 0

Definition at line 995 of file hldprint.cxx.

◆ onlyraw

unsigned onlyraw = 0

Definition at line 995 of file hldprint.cxx.

◆ hubmask

unsigned hubmask = 0

Definition at line 995 of file hldprint.cxx.

◆ fullid

unsigned fullid = 0

Definition at line 995 of file hldprint.cxx.

◆ adcmask

unsigned adcmask = 0

Definition at line 995 of file hldprint.cxx.

◆ onlymonitor

unsigned onlymonitor = 0

Definition at line 995 of file hldprint.cxx.

◆ hubs

std::vector<unsigned> hubs

Definition at line 996 of file hldprint.cxx.

◆ tdcs

std::vector<unsigned> tdcs

Definition at line 996 of file hldprint.cxx.

◆ ctsids

std::vector<unsigned> ctsids

Definition at line 996 of file hldprint.cxx.

◆ newtdcs

std::vector<unsigned> newtdcs

Definition at line 996 of file hldprint.cxx.