9#include <rawdata/modules/CheckErrorEvent.h>
29 B2INFO(
"CheckErrorEvent: Constructor done.");
35CheckErrorEventModule::~CheckErrorEventModule()
41 B2INFO(
"CheckErrorEvent: initialize() started.");
47 B2INFO(
"CheckErrorEvent: initialize() done.");
58 printf(
"Packet CRC error : block %d ent %d eve %.12u node %.8x\n", i, j,
62 printf(
"Packet EVE error : block %d ent %d eve %.12u node %.8x\n", i, j,
73 printf(
"Event CRC error %d CPRs %d Events (obtained by checking each Raw*** header)\n",
77 printf(
"Event CRC error %d Events (obtained by checking EventMetaData. it should be equal to the above value. )\n",
88 for (
int i = 0; i < raw_datablkarray.
getEntries(); i++) {
89 for (
int j = 0; j < raw_datablkarray[ i ]->GetNumEntries(); j++) {
90 int* temp_buf = raw_datablkarray[ i ]->GetBuffer(j);
91 int nwords = raw_datablkarray[ i ]->GetBlockNwords(j);
95 if (raw_datablkarray[ i ]->CheckFTSWID(j)) {
97 }
else if (raw_datablkarray[ i ]->CheckTLUID(j)) {
102 temp_raw_copper.
SetBuffer(temp_buf, nwords, delete_flag, num_nodes, num_events);
110 for (
int i = 0; i < raw_cprarray.
getEntries(); i++) {
115 for (
int i = 0; i < raw_svdarray.
getEntries(); i++) {
120 for (
int i = 0; i < raw_cdcarray.
getEntries(); i++) {
125 for (
int i = 0; i < raw_toparray.
getEntries(); i++) {
130 for (
int i = 0; i < raw_aricharray.
getEntries(); i++) {
135 for (
int i = 0; i < raw_klmarray.
getEntries(); i++) {
140 for (
int i = 0; i < raw_eclarray.
getEntries(); i++) {
145 for (
int i = 0; i < raw_trgarray.
getEntries(); i++) {
153 if (evtmetadata->getErrorFlag()) {
154 printf(
"EventMeta Error %.8x : exp %d run %d sub %d eve %d\n",
155 evtmetadata->getErrorFlag(),
156 evtmetadata->getExperiment(), evtmetadata->getRun(),
157 evtmetadata->getSubrun(), evtmetadata->getEvent());
void checkCRCError(RawCOPPER *rawcpr, int i)
Check if a RawCOPPER object contains CRC error flag in RawCOPPER header/trailer.
int m_eventCRCerr_evtmetadata
virtual void initialize() override
initialization
virtual void event() override
event module
virtual void terminate() override
termination
CheckErrorEventModule()
Constructor / Destructor.
void setDescription(const std::string &description)
Sets the description of the module.
Module to get data from DataStore and send it to another network node.
int n_basf2evt
No. of sent events.
The Raw COPPER class This class stores data received by COPPER via belle2linkt Data from all detector...
void SetBuffer(int *bufin, int nwords, int delete_flag, int num_events, int num_nodes) OVERRIDE_CPP17
set buffer ( delete_flag : m_buffer is freeed( = 0 )/ not freeed( = 1 ) in Destructer )
virtual int GetNumEntries()
get # of data blocks = (# of nodes)*(# of events)
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.
Type-safe access to single objects in the data store.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
unsigned int GetEveNo(int n)
get subrun #(8bit)
int GetEventCRCError(int n)
check CRC event Error
int GetPacketCRCError(int n)
check CRC packet Error
unsigned int GetNodeID(int n)
get node-ID from data
Abstract base class for different kinds of events.