forked from sPHENIX-Collaboration/rcdaq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdaq_device_command.cc
More file actions
59 lines (33 loc) · 840 Bytes
/
Copy pathdaq_device_command.cc
File metadata and controls
59 lines (33 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <iostream>
#include <daq_device_command.h>
#include <unistd.h>
#include <stdlib.h>
using namespace std;
daq_device_command::daq_device_command(const int eventtype
, const int subeventid
, const char *command
, const int verbose)
{
m_eventType = eventtype;
m_subeventid = subeventid;
_command = command;
_verbose = verbose;
}
daq_device_command::~daq_device_command()
{
}
// the put_data function
int daq_device_command::put_data(const int etype, int * adr, const int length )
{
if (etype != m_eventType ) // not our id
{
return 0;
}
system ( _command.c_str() );
return 0;
}
void daq_device_command::identify(std::ostream& os) const
{
os << "Command Device Event Type: " << m_eventType
<< " executing " << _command << endl;
}