16#include <framework/core/Module.h>
17#include <framework/datastore/StoreObjPtr.h>
18#include <framework/datastore/StoreArray.h>
19#include <framework/dataobjects/EventMetaData.h>
21#include <daq/slc/readout/RunInfoBuffer.h>
22#include <daq/rawdata/CprErrorMessage.h>
23#include <daq/rawdata/modules/DAQConsts.h>
25#include <rawdata/dataobjects/RawDataBlock.h>
51 void event()
override;
57 virtual void dumpData(
char* buf,
int size);
60 virtual void printData(
int* buf,
int nwords);
108 virtual int*
getNewBuffer(
int nwords,
int* delete_flag);
113 double m_prev_totbytes;
120 double time_array0[1000];
121 double time_array1[1000];
122 double time_array2[1000];
123 double time_array3[1000];
124 double time_array4[1000];
125 double time_array5[1000];
143 virtual void clearNumUsedBuf()
150 void RateMonitor(
unsigned int nevt,
int subrun = -1,
int run = -1);
188 void shmOpen(
char* path_cfg,
char* path_sta);
191 int*
shmGet(
int fd,
int size_words);
221 virtual void openRunPauseNshm();
224 virtual int checkRunPause();
227 virtual int checkRunRecovery();
231 virtual void resumeRun();
234 virtual void pauseRun();
237 virtual void waitResume();
240 void callCheckRunPause(std::string& err_str);
243 int CheckConnection(
int socket);
A class definition of an input module for Sequential ROOT I/O.
unsigned int calcSimpleChecksum(int *buf, int nwords)
calculate checksum
void shmOpen(char *path_cfg, char *path_sta)
open shared memory
void RateMonitor(unsigned int nevt, int subrun=-1, int run=-1)
monitor rate
unsigned int m_prev_exprunsubrun_no
run no.
void initialize() override
Module functions to be called from main process.
unsigned int calcXORChecksum(int *buf, int nwords)
calculate checksum
std::string m_nodename
Node name.
virtual int * getPreAllocBuf()
Getbuffer.
int * shmGet(int fd, int size_words)
Get shared memory.
void event() override
Module functions to be called from main process.
int m_start_flag
start flag
int BUF_SIZE_WORD
size of buffer for one event (word)
int m_shmfd_cfg
file descripter for shm
static RunInfoBuffer g_status
buffer class to communicate with NSM client
int checkData(char *buf, int prev_eve, int *cur_eve)
check data
void terminate() override
This method is called at the end of the event processing.
int n_basf2evt
No. of sent events.
int m_trunc_mask
trunc mask
DeSerializerModule()
Constructor / Destructor.
CprErrorMessage print_err
wrapper for B2LOG system
int m_shmfd_sta
file descripter for shm
virtual void dumpData(char *buf, int size)
dump binary data
virtual void printData(int *buf, int nwords)
dump error data
virtual int * getNewBuffer(int nwords, int *delete_flag)
Getbuffer.
double cur_time
for time monitoring
std::string m_dump_fname
dump filename
int m_shmflag
Use shared memory.
int monitor_numeve
buffer for shared memory
int m_prev_nevt
No. of prev sent events.
void recordTime(int event, double *array)
store time info.
int m_compressionLevel
Compression Level.
int * m_bufary[NUM_PREALLOC_BUF]
buffer
unsigned int m_exprunsubrun_no
run no.
virtual void printASCIIData(int *buf, int nwords)
dump error data
virtual void openOutputFile()
Module functions to be called from event process.
double max_seconds
time to stop a run
FILE * m_fp_dump
dump file descripter
int m_nodeid
Node(PC or COPPER) ID.
double getTimeSec()
store time info.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.