forked from AxFoundation/redax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathV1495.hh
42 lines (35 loc) · 1.15 KB
/
V1495.hh
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
#ifndef _V1495_HH_
#define _V1495_HH_
#include <memory>
#include <map>
//Register address definitions taken from XENON1T m_veto class in kodiaq
//https://github.com/coderdj/kodiaq and XENON1T DAQ m_veto config files
/*
#define V1495_ModuleReset 0x800A
#define V1495_MaskInA 0x1020
#define V1495_MaskInB 0x1024
#define V1495_MaskInD 0x1028
#define V1495_MajorityThreshold 0x1014
#define V1495_CoincidenceWidth 0x1010
#define V1495_CTRL 0x1018
*/
class MongoLog;
class Options;
class V1495{
public:
V1495(std::shared_ptr<MongoLog>&, std::shared_ptr<Options>&, int, int, unsigned);
virtual ~V1495();
virtual int Arm(std::map<std::string, int>&);
// Functions for a child class to implement
virtual int BeforeSINStart() {return 0;}
virtual int AfterSINStart() {return 0;}
virtual int BeforeSINStop() {return 0;}
virtual int AfterSINStop() {return 0;}
protected:
int WriteReg(unsigned int, unsigned int);
int fBoardHandle, fBID;
unsigned int fBaseAddress;
std::shared_ptr<Options> fOptions;
std::shared_ptr<MongoLog> fLog;
};
#endif