-
Notifications
You must be signed in to change notification settings - Fork 0
/
TrDAQManager.hh
54 lines (47 loc) · 1.06 KB
/
TrDAQManager.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
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef DAQMANAGER_HH
#define DAQMANAGER_HH
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <string>
#include "TrReadout.hh"
#include "TrVMEModeChanger.hh"
#include "TrGenerator.hh"
#include "TrRunData.hh"
#include "TrSpillData.hh"
#include "TrSocketServer.hh"
#include <vector>
#include "CAENVMElib.h"
class TrDAQManager {
protected:
int host;
int status; /* 0=idle, 1=triggering, 2=readout, 3=building, 4=writing */
int connected;
int nSpills;
TrSocketServer socket;
TrGenerator generator;
TrRunData* dataBuffer;
std::vector<TrSpillData> currentSpills;
TrVMEModeChanger modeChanger;
std::map<std::string, int> goCommands;
void setStatus(int);
TrReadout readoutController;
std::string fileName;
public:
TrDAQManager(std::string);
int setNumberOfSpills(int);
int setTriggerMode();
int setReadoutMode();
int trigger(double);
int trigger();
int stopTrigger();
int waitForSpill();
int readout();
int build();
int write();
void go();
int getCommands();
int transmit();
TrRunData* getRunData();
};
#endif