Last change
on this file since 25 was 22, checked in by ogrimm, 16 years ago |
First commit of drsdaq program
|
File size:
1.7 KB
|
Line | |
---|
1 | #ifndef HVFEEDBACK_H_SEEN
|
---|
2 | #define HVFEEDBACK_H_SEEN
|
---|
3 |
|
---|
4 | #define BUF_LENGTH 1000
|
---|
5 |
|
---|
6 | #include <stdlib.h>
|
---|
7 |
|
---|
8 | #include "RawDataCTX.h"
|
---|
9 | #include "DAQReadout.h"
|
---|
10 |
|
---|
11 | enum FBState {FB_Off, FB_Active, FB_Targets, FB_ResponseFirst, FB_ResponseSecond};
|
---|
12 |
|
---|
13 | class HVFeedback {
|
---|
14 |
|
---|
15 | class DAQReadout *m;
|
---|
16 | class PixelMap *PixMap;
|
---|
17 | FBState FBMode;
|
---|
18 |
|
---|
19 | float (*Average)[kNumberOfChips][kNumberOfChannels];
|
---|
20 | float (*Response)[kNumberOfChips][kNumberOfChannels];
|
---|
21 | float (*Target)[kNumberOfChips][kNumberOfChannels];
|
---|
22 | float (*Buffer)[kNumberOfChips][kNumberOfChannels];
|
---|
23 |
|
---|
24 | unsigned int NumAverages; // Events to take before feedback acts
|
---|
25 | unsigned int Count; // Number of currently integrated events
|
---|
26 |
|
---|
27 | float Gain; // Feedback gain
|
---|
28 | float Voltage1, Voltage2; // for response measurement
|
---|
29 | int SocketDescriptor;
|
---|
30 | char TextBuf[BUF_LENGTH];
|
---|
31 |
|
---|
32 | int fLedTrigBoard;
|
---|
33 | int fLedTrigChip;
|
---|
34 | int fLedTrigChannel;
|
---|
35 | int fLedTrigSample;
|
---|
36 | float fLedTrigThreshold;
|
---|
37 | int fLedSignalSample;
|
---|
38 | int fLedBaselineSample;
|
---|
39 | int fDefaultNumAverage;
|
---|
40 | char fHVControlServer[BUF_LENGTH];
|
---|
41 | int fHVControlPort;
|
---|
42 | int fMaxCmdAckDelay;
|
---|
43 |
|
---|
44 | public:
|
---|
45 | HVFeedback(class DAQReadout*, char*);
|
---|
46 | ~HVFeedback();
|
---|
47 |
|
---|
48 | bool ProcessEvent();
|
---|
49 | void SetTarget(int, int, int, float);
|
---|
50 | void GetTargets();
|
---|
51 | void SetGain(float);
|
---|
52 | float GetGain();
|
---|
53 | void SetNumAverages(unsigned int);
|
---|
54 | unsigned int GetNumAverages();
|
---|
55 | void SetFBMode(FBState);
|
---|
56 | FBState GetFBMode();
|
---|
57 | unsigned int GetCurrentCount();
|
---|
58 | void MeasureResponse(float, float);
|
---|
59 | void GetResponse();
|
---|
60 | void ClearAverages();
|
---|
61 | bool WriteHVCommand(char *, ...);
|
---|
62 | void PrintConfig();
|
---|
63 | };
|
---|
64 |
|
---|
65 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.