![]() |
Belle II Software development
|
A class definition of an input module for Sequential ROOT I/O. More...
#include <DesSerCOPPER.h>
Public Member Functions | |
| DesSerCOPPER (const std::string &host_recv, int port_recv, const std::string &host_send, int port_send, int shmflag, const std::string &nodename, int nodeid, int finesse_bitflag) | |
| Constructor / Destructor. | |
| void | DataAcquisition () override |
| Module functions to be called from event process. | |
| int * | readOneEventFromCOPPERFIFO (const int entry, int *delete_flag, int *m_size_word) |
| Read one event from COPPER. | |
| void | openCOPPER () |
| open COPPER | |
| void | initializeCOPPER () |
| Module functions to be called from main process. | |
| int | readFD (int fd, char *buf, int data_size_byte, int delete_flag) |
| receive data | |
| void | initialize (bool close_listen=true) |
| int * | getPreAllocBuf () |
| Getbuffer. | |
| int * | getNewBuffer (int nwords, int *delete_flag) |
| Getbuffer. | |
| void | recordTime (int event, double *array) |
| store time info. | |
| unsigned int | calcSimpleChecksum (int *buf, int nwords) |
| calculate checksum | |
| void | clearNumUsedBuf () |
| void | RateMonitor (unsigned int nevt) |
| monitor rate | |
| int * | shmGet (int fd, int size_words) |
| Get shared memory. | |
| void | initializeNode () |
| Module functions to be called from main process. | |
| void | beginRun () |
| Module functions to be called from event process. | |
| void | endRun () |
| void | terminate () |
| int | sendByWriteV (RawDataBlockFormat *rawdblk) |
| void | Accept (bool close_listen=true) |
| void | fillSendHeaderTrailer (SendHeader *hdr, SendTrailer *trl, RawDataBlockFormat *rawdblk) |
| int | Send (int socket, char *buf, int size_bytes) |
| send buffer | |
Static Public Member Functions | |
| static void | printData (const int *buf, int nwords) |
| dump error data | |
| static double | getTimeSec () |
| store time info. | |
| static unsigned int | calcXORChecksum (const int *buf, int nwords) |
| calculate checksum | |
| static void | shmOpen (char *path_cfg, char *path_sta) |
| open shared memory | |
Public Attributes | |
| int | m_cpr_fd = 0 |
| file descripter for COPPER | |
| int | m_use_slot = 0 |
| bit flag of FINESSE slots to use | |
| int | m_finesse_bit_flag |
| bit flag of FINESSE slots to use | |
| int | max_nevt = 0 |
| double | max_seconds = 0.0 |
| time to stop a run | |
| int | m_compressionLevel = 0 |
| Compression Level. | |
| int | n_basf2evt = 0 |
| No. of sent events. | |
| int | m_prev_nevt = 0 |
| No. of prev sent events. | |
| std::string | m_dump_fname |
| dump filename | |
| FILE * | m_fp_dump = nullptr |
| dump file descripter | |
| int * | m_buffer = nullptr |
| buffer | |
| int * | m_bufary [NUM_PREALLOC_BUF] = {} |
| buffer | |
| timeval | m_t0 |
| double | m_recvd_totbytes = 0.0 |
| double | m_recvd_prev_totbytes = 0.0 |
| double | m_sent_totbytes = 0.0 |
| double | m_sent_prev_totbytes = 0.0 |
| int | m_ncycle = 0 |
| double | cur_time = 0.0 |
| for time monitoring | |
| double | m_start_time = 0.0 |
| double | m_prev_time = 0.0 |
| int | prev_event = 0 |
| int | m_num_usedbuf = 0 |
| std::string | m_nodename |
| Node Name for SLC. | |
| int | m_nodeid = 0 |
| Node ID for SLC. | |
| RunInfoBuffer | m_status |
| Run info buffer. | |
| unsigned int | m_exprunsubrun_no |
| run no. | |
| unsigned int | m_prev_exprunsubrun_no |
| run no. | |
| int | m_exp_no = 0 |
| exp no. | |
| int | m_data_type = 0 |
| data type | |
| int | m_trunc_mask = 0 |
| trunc mask | |
| int | m_shmflag = 0 |
| Use shared memory. | |
| int | m_shmfd_cfg = 0 |
| file descripter for shm | |
| int | m_shmfd_sta = 0 |
| file descripter for shm | |
| int | monitor_numeve = 0 |
| buffer for shared memory | |
| int | m_start_flag = 0 |
| start flag | |
| CprErrorMessage | print_err |
| wrapper for B2LOG system | |
| PreRawCOPPERFormat_v2 | m_pre_rawcpr |
| report status to SLC | |
| int * | m_cfg_buf = nullptr |
| buffer for shared memory | |
| int * | m_cfg_sta = nullptr |
| buffer for shared memory | |
| int | m_run_pause = 0 |
| flag to show that run-controller pauses a run | |
| int | m_run_error = 0 |
| flag to show that there is some errors with which DAQ cannot continue. | |
Protected Types | |
| enum | { COPPER = 1 , ROPC = 2 } |
Protected Attributes | |
| int | m_num_connections |
| check data contents | |
| std::vector< std::string > | m_hostname_from |
| Reciever basf2 Socket. | |
| std::vector< int > | m_port_from |
| port # to connect data sources | |
| std::vector< int > | m_socket_recv |
| int | event_diff = 0 |
| unsigned int | m_prev_copper_ctr = 0 |
| unsigned int | m_prev_evenum = 0 |
| int | m_socket_send = 0 |
| Reciever Socket. | |
| std::string | m_hostname_local |
| Destination Host. | |
| int | m_port_to = 0 |
| Destination port. | |
| std::string | p_method |
| EvtSocket. | |
| int | p_method_val = 0 |
| RawHeader_v2 | tmp_header |
| which format is used | |
A class definition of an input module for Sequential ROOT I/O.
Definition at line 27 of file DesSerCOPPER.h.
|
protectedinherited |
| DesSerCOPPER | ( | const std::string & | host_recv, |
| int | port_recv, | ||
| const std::string & | host_send, | ||
| int | port_send, | ||
| int | shmflag, | ||
| const std::string & | nodename, | ||
| int | nodeid, | ||
| int | finesse_bitflag ) |
Constructor / Destructor.
Definition at line 24 of file DesSerCOPPER.cc.
|
overridevirtual |
Definition at line 53 of file DesSerCOPPER.cc.
|
inherited |
Definition at line 365 of file DesSer.cc.
|
staticinherited |
|
inlineinherited |
|
overridevirtual |
Module functions to be called from event process.
Implements DesSer.
Definition at line 57 of file DesSerCOPPER.cc.
|
inherited |
Definition at line 171 of file DesSer.cc.
|
inherited |
Getbuffer.
Definition at line 77 of file DesSer.cc.
|
inherited |
Getbuffer.
Definition at line 57 of file DesSer.cc.
|
staticinherited |
|
inherited |
Definition at line 101 of file DesSer.cc.
| void initializeCOPPER | ( | ) |
Module functions to be called from main process.
Definition at line 450 of file DesSerCOPPER.cc.
| void openCOPPER | ( | ) |
open COPPER
Definition at line 505 of file DesSerCOPPER.cc.
|
staticinherited |
| int readFD | ( | int | fd, |
| char * | buf, | ||
| int | data_size_byte, | ||
| int | delete_flag ) |
receive data
Definition at line 545 of file DesSerCOPPER.cc.
| int * readOneEventFromCOPPERFIFO | ( | const int | entry, |
| int * | delete_flag, | ||
| int * | m_size_word ) |
Read one event from COPPER.
Definition at line 322 of file DesSerCOPPER.cc.
|
inherited |
|
inherited |
send buffer
Definition at line 329 of file DesSer.cc.
|
inherited |
Definition at line 227 of file DesSer.cc.
|
staticinherited |
open shared memory
Definition at line 681 of file DesSer.cc.
|
inherited |
|
inherited |
| int m_cpr_fd = 0 |
file descripter for COPPER
Definition at line 54 of file DesSerCOPPER.h.
| int m_finesse_bit_flag |
bit flag of FINESSE slots to use
Definition at line 60 of file DesSerCOPPER.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| int m_use_slot = 0 |
bit flag of FINESSE slots to use
Definition at line 57 of file DesSerCOPPER.h.
|
inherited |
|
protectedinherited |
|
inherited |
|
protectedinherited |