Belle II Software development
hrelay2.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#include <stdio.h>
10#include <stdlib.h>
11#include <unistd.h>
12
13#include <daq/dqm/HistoRelay2.h>
14
15using namespace Belle2;
16using namespace std;
17
18int main(int argc, char** argv)
19{
20 if (argc < 4) {
21 printf("Usage : hrelay2 file dest port interval\n");
22 exit(-1);
23 }
24 string file = string(argv[1]);
25 string dest = string(argv[2]);
26 int port = atoi(argv[3]);
27 int interval = atoi(argv[4]);
28
29 HistoRelay2 hrelay2(file, dest, port);
30
31 for (;;) {
32 // printf("hrelay2 : collecting histograms\n");
33 if (hrelay2.collect()) {
34 sleep(1); // just short if file is just updated
35 } else {
36 sleep(interval);
37 }
38 }
39
40}
41
42
Abstract base class for different kinds of events.
STL namespace.