Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
daq_device_command.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file daq_device_command.cc
1 
2 
3 #include <iostream>
4 
5 #include <daq_device_command.h>
6 
7 #include <unistd.h>
8 #include <stdlib.h>
9 
10 using namespace std;
11 
13  , const int subeventid
14  , const char *command
15  , const int verbose)
16 
17 {
18 
19  m_eventType = eventtype;
20  m_subeventid = subeventid;
21  _command = command;
22  _verbose = verbose;
23 
24 
25 }
26 
28 {
29 }
30 
31 
32 
33 // the put_data function
34 
35 int daq_device_command::put_data(const int etype, int * adr, const int length )
36 {
37 
38 
39  if (etype != m_eventType ) // not our id
40  {
41  return 0;
42  }
43 
44  system ( _command.c_str() );
45 
46  return 0;
47 
48 }
49 
50 
51 void daq_device_command::identify(std::ostream& os) const
52 {
53 
54  os << "Command Device Event Type: " << m_eventType
55  << " executing " << _command << endl;
56 
57 }
58 
59