Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
rcdaq.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file rcdaq.h
1
#ifndef __RCDAQ_H__
2
#define __RCDAQ_H__
3
4
#include <iostream>
5
#include <pthread.h>
6
7
class
daq_device
;
8
9
void
sig_handler
(
int
i
);
10
11
12
void
set_eventsizes
();
13
14
void
*
writebuffers
(
void
* arg);
15
void
*
EventLoop
(
void
*arg);
16
17
//int daq_end();
18
int
Command
(
const
int
command);
19
20
char
*
obtain_pidfilename
();
21
22
int
switch_buffer
();
23
int
device_init
();
24
int
device_endrun
();
25
int
readout
(
const
int
etype);
26
int
rearm
(
const
int
etype);
27
int
rcdaq_init
(
const
int
, pthread_mutex_t &M );
28
int
add_readoutdevice
(
daq_device
*d);
29
30
int
daq_begin
(
const
int
irun,std::ostream&
os
= std::cout );
31
int
daq_begin_immediate
(
const
int
irun, std::ostream&
os
);
32
void
*
daq_begin_thread
(
void
*arg);
33
34
35
int
daq_end_immediate
(std::ostream&
os
= std::cout);
36
int
daq_end_interactive
(std::ostream&
os
);
37
int
daq_end
(std::ostream&
os
= std::cout);
38
39
int
daq_fake_trigger
(
const
int
n
,
const
int
waitinterval);
40
41
int
daq_write_runnumberfile
(
const
int
run
);
42
43
int
daq_set_runnumberfile
(
const
char
*
file
,
const
int
flag);
44
int
daq_set_runnumberApp
(
const
char
*
file
,
const
int
flag);
45
46
int
daq_set_filerule
(
const
char
*rule);
47
48
int
daq_setruntype
(
const
char
*
type
, std::ostream&
os
= std::cout);
49
int
daq_getruntype
(
const
int
flag, std::ostream&
os
= std::cout);
50
int
daq_define_runtype
(
const
char
*
type
,
const
char
* rule);
51
int
daq_list_runtypes
(
const
int
flag, std::ostream&
os
= std::cout );
52
std::string
&
daq_get_filerule
();
53
54
55
int
daq_open
(std::ostream&
os
= std::cout);
56
int
daq_shutdown
(
const
unsigned
long
servernumber
,
const
unsigned
long
versionnumber,
const
int
pid_fd
,
57
std::ostream&
os
= std::cout);
58
std::string
&
get_current_filename
();
59
int
daq_close
(std::ostream&
os
= std::cout);
60
int
is_open
();
61
62
int
daq_set_server
(
const
char
*hostname,
const
int
port, std::ostream&
os
= std::cout);
63
int
is_server_open
();
64
int
daq_server_close
(std::ostream&
os
= std::cout);
65
int
get_serverflag
();
66
67
int
daq_set_compression
(
const
int
flag, std::ostream&
os
= std::cout);
68
69
70
int
daq_set_name
(
const
char
*
name
);
71
int
daq_get_name
(std::ostream&
os
= std::cout);
72
std::string
daq_get_myname
();
73
74
int
daq_set_mqtt_host
(
const
char
* host,
const
int
port, std::ostream&
os
);
75
int
daq_get_mqtt_host
(std::ostream&
os
);
76
77
//int daq_open_sqlstream(const char *name);
78
//int daq_close_sqlstream();
79
//int get_sqlfd();
80
81
int
daq_generate_json
(
const
int
flag);
82
83
double
daq_get_mb_per_second
();
84
double
daq_get_events_per_second
();
85
86
int
daq_list_readlist
(std::ostream&
os
= std::cout );
87
int
daq_clear_readlist
(std::ostream&
os
= std::cout);
88
std::string
&
get_current_filename
();
89
std::string
&
daq_get_filerule
();
90
91
int
daq_status
(
const
int
flag, std::ostream&
os
= std::cout );
92
int
daq_running
();
93
int
daq_status_plugin
(
const
int
flag =0, std::ostream&
os
= std::cout );
94
95
int
daq_setmaxevents
(
const
int
n
, std::ostream&
os
);
96
int
daq_setmaxvolume
(
const
int
n_mb, std::ostream&
os
);
97
int
daq_setrolloverlimit
(
const
int
n_gb, std::ostream&
os
);
98
99
int
daq_setmaxbuffersize
(
const
int
n_mb, std::ostream&
os
);
100
101
int
daq_setadaptivebuffering
(
const
int
usecs, std::ostream&
os
);
102
103
int
daq_set_eloghandler
(
const
char
*host,
const
int
port,
const
char
*logname);
104
105
int
daq_load_plugin
(
const
char
*
sharedlib
, std::ostream&
os
);
106
107
int
daq_wait_for_begin_done
();
108
int
daq_wait_for_actual_end
();
109
110
// functions for the webserver
111
112
int
daq_webcontrol
(
const
int
port,std::ostream&
os
= std::cout );
113
114
int
daq_getlastfilename
(std::ostream&
os
= std::cout );
115
int
daq_getlastevent_number
(std::ostream&
os
= std::cout );
116
117
118
int
get_runnumber
();
119
int
get_oldrunnumber
();
120
int
get_eventnumber
();
121
double
get_runvolume
();
122
int
get_runduration
();
123
int
get_openflag
();
124
125
int
daq_setEventFormat
(
const
int
f
, std::ostream&
os
= std::cout );
126
int
daq_getEventFormat
();
127
int
daq_setRunControlMode
(
const
int
flag, std::ostream&
os
= std::cout );
128
int
daq_getRunControlMode
(std::ostream&
os
= std::cout);
129
130
int
getRunNumberFromApp
();
131
132
133
#define MG_REQUEST_NAME 1
134
#define MG_REQUEST_SPEED 2
135
// more defs to come in the future
136
137
138
139
#endif
rcdaq
blob
master
rcdaq.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:48
using
1.8.2 with
sPHENIX GitHub integration