Belle II Software development
sock2rb.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <string>
9
10#include <stdio.h>
11#include <stdlib.h>
12
13#include "daq/rfarm/event/Sock2Rb.h"
14
15using namespace Belle2;
16using namespace std;
17
18int main(int argc, char** argv)
19{
20 // Retrieve RingBuffer name[1], and port number[2]
21 if (argc < 2) {
22 printf("sock2rb : rbufname, port\n");
23 exit(-1);
24 }
25
26 Sock2Rb sr(string(argv[1]), atoi(argv[2]));
27
28 for (;;) {
29 int stat = sr.ReceiveEvent();
30 // printf ( "sock2rb received : %d\n", stat );
31 if (stat <= 0) break;
32 }
33 exit(0);
34}
35
36
37
Abstract base class for different kinds of events.
STL namespace.