FACT++  1.0
void StartEvtBuild ( )

Definition at line 1545 of file EventBuilder.cc.

References Memory::allocated, READ_STRUCT::close(), factPrintf(), g_maxMem, gi_NumConnect, gj, i, Memory::inuse, MessageImp::kInfo, mainloop(), and NBOARDS.

Referenced by EventBuilderWrapper::StartThread().

1546 {
1547  factPrintf(MessageImp::kInfo, "Starting EventBuilder++");
1548 
1549  memset(gi_NumConnect, 0, NBOARDS*sizeof(*gi_NumConnect));
1550 
1551  memset(&gj, 0, sizeof(GUI_STAT));
1552 
1553  gj.usdMem = Memory::inuse;
1554  gj.totMem = Memory::allocated;
1555  gj.maxMem = g_maxMem;
1556 
1557 
1558  READ_STRUCT rd[NBOARDS];
1559 
1560  // This is only that every socket knows its id (maybe we replace that by arrays instead of an array of sockets)
1561  for (int i=0; i<NBOARDS; i++)
1562  rd[i].sockId = i;
1563 
1564  while (mainloop(rd));
1565 
1566  //must close all open sockets ...
1567  factPrintf(MessageImp::kInfo, "Close all sockets...");
1568 
1570 
1571  // Now all sockets get closed. This is not reflected in gi_NumConnect
1572  // The current workaround is to count all sockets as closed when the thread is not running
1573  factPrintf(MessageImp::kInfo, "EventBuilder++ closed");
1574 }
void factPrintf(int severity, const char *fmt,...)
int i
Definition: db_dim_client.c:21
uint gi_NumConnect[NBOARDS]
Definition: EventBuilder.cc:82
GUI_STAT gj
Definition: EventBuilder.cc:84
An info telling something which can be interesting to know.
Definition: MessageImp.h:17
size_t g_maxMem
Definition: EventBuilder.cc:76
uint64_t inuse
Definition: EventBuilder.cc:90
static void close()
bool mainloop(READ_STRUCT *rd)
#define NBOARDS
Definition: BasicGlCamera.h:4
uint64_t allocated
Definition: EventBuilder.cc:91

+ Here is the call graph for this function:

+ Here is the caller graph for this function: