Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
daq_device.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file daq_device.h
1 
2 // device_i.h
3 #ifndef __DAQ_DEVICE_H__
4 #define __DAQ_DEVICE_H__
5 
6 #include <SubevtStructures.h>
7 #include <SubevtConstants.h>
8 #include <iostream>
9 #include <iomanip>
10 #include <stdio.h>
11 #include "TriggerHandler.h"
12 
13 
16 int daq_getEventFormat();
17 
18 class daq_device {
19 
20 public:
21 
22  daq_device();
23 
24 
25  virtual ~daq_device();
26 
27 
28  virtual void identify(std::ostream& os = std::cout) const = 0;
29 
30  // the non-idl virtual functions
31  virtual int max_length(const int etype) const =0;
32 
33  // functions to do the work
34  virtual int init(){return 0;};
35  virtual int endrun(){return 0;};
36  virtual int rearm( const int etype){return 0;};
37  virtual int put_data(const int, int *, const int) =0;
38 
39  virtual int subeventid () const
40  {
41  return m_subeventid;
42  }
43 
44  static int formatPacketHdr(int * adr);
45 
46  protected:
49 
50 };
51 
52 
53 
54 #endif