Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-02 08:21:01

0001 #ifndef __DAQ_DEVICE_PLUGINEXAMPLE__
0002 #define __DAQ_DEVICE_PLUGINEXAMPLE__
0003 
0004 
0005 
0006 #include <daq_device.h>
0007 #include <pulserTriggerHandler.h>
0008 #include <iostream>
0009 
0010 
0011 // this is part of the example how to build a plugin.
0012 // It consists of a (silly) daq_device class (which creates a 
0013 // packet of type ID4EVT where channel i has the value i), and
0014 // the actual "plugin" part, a plugabble class called 
0015 // gauss_plugin, which inherits from RCDAQPlugin.
0016 
0017 // Also note that the plugin class can support more than one 
0018 // daq_device (here we have only one). 
0019 
0020 class simpleRandom;
0021 
0022 
0023 class daq_device_gauss : public  daq_device {
0024 
0025 public:
0026 
0027   daq_device_gauss (const int eventtype
0028             , const int subeventid
0029             , const int trigger_enabled=0);
0030 
0031 
0032   ~daq_device_gauss();
0033 
0034 
0035   void identify(std::ostream& os = std::cout) const;
0036 
0037   int max_length(const int etype) const;
0038 
0039   // functions to do the work
0040 
0041   int put_data(const int etype, int * adr, const int length);
0042 
0043   int init();
0044 
0045   int rearm( const int etype);
0046 
0047 protected:
0048 
0049 
0050 
0051   subevtdata_ptr sevt;
0052   float _mean;
0053   float _sigma;
0054   pulserTriggerHandler *th;
0055   simpleRandom *R;
0056 
0057 };
0058 
0059 
0060 #endif