-
Notifications
You must be signed in to change notification settings - Fork 1
/
testInput.cpp
64 lines (50 loc) · 1.38 KB
/
testInput.cpp
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
55
56
57
58
59
60
61
62
63
64
/*****************************************
myReadOut.cpp
-------------
Dream DAQ program.
Version 2014: 25/11/2014
*****************************************/
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/times.h>
#include <unistd.h>
#include <stdint.h>
#include <cmath>
#include <ctime>
#include <climits>
#include <cerrno>
#include <csignal>
#include <cstdlib>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
#include "myFIFO-IO.h"
#include "sigHandler.h"
#include "myModules.h"
#include "myVme.h" // VME Base class
#include "myV513.h" // CAEN V513 I/O REG
v513 ion(0xa00000,"/V2718/cvA24_U_DATA/1");
/****************************************/
int32_t main(int32_t argc, char** argv)
/****************************************/
{
uint32_t nnn = ion.readInputRegister();
cout << "InputRegister 0x" << hex << nnn << dec
<< " isT1T2Trig " << ((nnn&1)&&true)
<< " isHWBusy " << ((nnn&2)&&true)
<< " isInSpill " << ((nnn&4)&&true)
<< " isPedTrig " << ((nnn&8)&&true) << endl;
while(1)
{
nnn = ion.readInputRegister();
cout << "InputRegister() 0x" << hex << nnn << dec
<< " isT1T2Trig " << ((nnn&1)&&true)
<< " isHWBusy " << ((nnn&2)&&true)
<< " isInSpill " << ((nnn&4)&&true) << endl;
sleep(1);
}
return 0;
}