forked from sPHENIX-Collaboration/rcdaq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaq_device.h
54 lines (34 loc) · 932 Bytes
/
daq_device.h
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
// device_i.h
#ifndef __DAQ_DEVICE_H__
#define __DAQ_DEVICE_H__
#include <SubevtStructures.h>
#include <SubevtConstants.h>
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include "TriggerHandler.h"
int registerTriggerHandler(TriggerHandler *);
int clearTriggerHandler();
int daq_getEventFormat();
class daq_device {
public:
daq_device();
virtual ~daq_device();
virtual void identify(std::ostream& os = std::cout) const = 0;
// the non-idl virtual functions
virtual int max_length(const int etype) const =0;
// functions to do the work
virtual int init(){return 0;};
virtual int endrun(){return 0;};
virtual int rearm( const int etype){return 0;};
virtual int put_data(const int, int *, const int) =0;
virtual int subeventid () const
{
return m_subeventid;
}
static int formatPacketHdr(int * adr);
protected:
long m_subeventid;
long m_eventType;
};
#endif