Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
daq_device_pluginexample.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file daq_device_pluginexample.h
1 #ifndef __DAQ_DEVICE_PLUGINEXAMPLE__
2 #define __DAQ_DEVICE_PLUGINEXAMPLE__
3 
4 
5 
6 #include <daq_device.h>
7 #include <pulserTriggerHandler.h>
8 #include <iostream>
9 
10 
11 
12 // this is part of the example how to build a plugin.
13 // It consists of a (silly) daq_device class (which creates a
14 // packet of type ID4EVT where channel i has the value i), and
15 // the actual "plugin" part, a plugabble class called
16 // example_plugin, which inherits from RCDAQPlugin.
17 
18 // Also note that the plugin class can support more than one
19 // daq_device (here we have only one).
20 
22 
23 public:
24 
25  daq_device_pluginexample (const int eventtype
26  , const int subeventid
27  , const int n_words=32
28  , const int trigger_enabled=0);
29 
30 
32 
33 
34  void identify(std::ostream& os = std::cout) const;
35 
36  int max_length(const int etype) const;
37 
38  // functions to do the work
39 
40  int put_data(const int etype, int * adr, const int length);
41 
42  int init();
43 
44  int rearm( const int etype);
45 
46 protected:
48  unsigned int number_of_words;
50 
51 };
52 
53 
54 #endif