Newer
Older
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
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef THcConfigEvtHandler_
#define THcConfigEvtHandler_
/////////////////////////////////////////////////////////////////////
//
// THcConfigEvtHandler
// For more details see the implementation file.
// This handles hall C's event type 125.
// author Robert Michaels (rom@jlab.org)
//
/////////////////////////////////////////////////////////////////////
#include "THaEvtTypeHandler.h"
#include <string>
#include <vector>
#include <map>
class THcConfigEvtHandler : public THaEvtTypeHandler {
public:
THcConfigEvtHandler(const char* name, const char* description);
virtual ~THcConfigEvtHandler();
virtual Int_t Analyze(THaEvData *evdata);
virtual void AddEventType(Int_t evtype);
virtual void PrintConfig();
virtual Int_t GetNSA(Int_t crate);
virtual Int_t GetNSB(Int_t crate);
virtual Int_t GetNPED(Int_t crate);
virtual EStatus Init( const TDatime& run_time);
// Float_t GetData(const std::string& tag);
private:
// std::map<std::string, Float_t> theDataMap;
std::vector<std::string> dataKeys;
UInt_t NVars;
Double_t *dvars;
typedef struct {
struct FADC250 {
Int_t present;
Int_t daq_level;
Int_t threshold;
Int_t mode;
Int_t window_lat;
Int_t window_width;
Int_t nsb;
Int_t nsa;
Int_t np;
Int_t nped;
Int_t maxped;
Int_t nsat;
Int_t nmodules;
Int_t blocklevel;
std::map<Int_t, Int_t *> thresholds;
} FADC250;
struct CAEN1190 {
Int_t present;
Int_t resolution;
Int_t timewindow_offset;
Int_t timewindow_width;
} CAEN1190;
//CrateInfo : FADC250.nmodules(0),CAEN1190.present(0) {}
} CrateInfo_t;
std::map<Int_t, CrateInfo_t *> CrateInfoMap;
THcConfigEvtHandler(const THcConfigEvtHandler& fh);
THcConfigEvtHandler& operator=(const THcConfigEvtHandler& fh);
ClassDef(THcConfigEvtHandler,0) // Hall C event type 125
};
#endif