#include <stdio.h>
#include <signal.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include "midas.h"
#include "tmfe.h"
Go to the source code of this file.
|
| static void | usage () |
| |
| int | main (int argc, char *argv[]) |
| |
◆ main()
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 89 of file tmfe_example_multithread.cxx.
90{
91 setbuf(stdout, NULL);
92 setbuf(stderr, NULL);
93
94 signal(SIGPIPE, SIG_IGN);
95
96 std::vector<std::string> eq_args;
97
98
99
100
101
102
103
104
105
107
110 fprintf(stderr,
"Cannot connect to MIDAS, error \"%s\", bye.\n", result.
error_message.c_str());
111 return 1;
112 }
113
114
115
117 eq->fEqConfEventID = 1;
118 eq->fEqConfLogHistory = 1;
119 eq->fEqConfPeriodMilliSec = 1000;
120 eq->fEqConfBuffer =
"SYSTEM";
121
123 eq->EqSetStatus(
"Starting...",
"white");
124
126
127
128
129
130
131
132
133
134
136
138
139
140 eq->EqSetStatus(
"Started...",
"white");
141
144 }
145
147
148 return 0;
149}
static std::string GetThreadId()
return identification of this thread
void AddRpcHandler(TMFeRpcHandlerInterface *)
TMFeResult Connect(const char *progname=NULL, const char *hostname=NULL, const char *exptname=NULL)
std::atomic_bool fShutdownRequested
shutdown was requested by Ctrl-C or by RPC command
std::string error_message
◆ usage()