ICP  1
env_period_card.h
Go to the documentation of this file.
1 #ifndef ENV_PERIOD_CARD_H
2 #define ENV_PERIOD_CARD_H
3 
4 #include "dae2_card.h"
5 
7 {
8 public:
10  virtual ~EnvPeriodCardIntf() { }
11  virtual void printStatus(std::ostream& os, DAEstatus& status) = 0;
12 
13  // main period register
14  virtual int getCurrentPeriodNumber(DAEstatus& status) = 0; // 0 is first period
15  virtual bool inDwellPeriod(DAEstatus& status) = 0; // is current period a dwell
16  virtual int setNumberOfPeriods(isisU16_t n, DAEstatus& status) = 0; // numbered internally 0 to n-1
17  virtual int getNumberOfPeriods(DAEstatus& status) = 0;
18  virtual int getCurrentPeriodSequence(DAEstatus& status) = 0;
19 
20  // vetos
21 // int clearVetoCounters(DAEstatus& status);
22 
23  // extract trigger veto count
24 // int getExtractTriggerVetoCountLow(isisU16_t* value, DAEstatus& status);
25 // int getExtractTriggerVetoCountHigh(isisU16_t* value, DAEstatus& status);
26 // int getExtractTriggerVetoCount(isisU32_t* value, DAEstatus& status);
27 // int enableExtractTriggerVeto(DAEstatus& status);
28 // int disableExtractTriggerVeto(DAEstatus& status);
29  virtual int getMSModeVetoedFrames(isisU32_t* value, DAEstatus& status) = 0;
30 
31  virtual int resetPeriodCard(DAEstatus& status) = 0;
32  virtual int clearPeriodCounters(DAEstatus& status) = 0;
33 // int enable50HzVeto(DAEstatus& status);
34 // int disable50HzVeto(DAEstatus& status);
35 // int setInternalPeriodClockMode(DAEstatus& status);
36 // int setExternalPeriodClockMode(DAEstatus& status);
37  virtual int setSinglePeriodSequenceMode(DAEstatus& status) = 0;
38  virtual int setMultiplePeriodSequenceMode(int nseq, DAEstatus& status) = 0;
39  virtual bool isMultipleSequenceComplete(DAEstatus& status) = 0;
40 // int setInternalPeriodControlMode(DAEstatus& status);
41 // int setExternalPeriodControlMode(DAEstatus& status);
42  virtual int enablePeriodMode(bool external_mode, DAEstatus& status) = 0;
43  virtual int disablePeriodMode(DAEstatus& status) = 0;
44  virtual int enableMSMode(DAEstatus& status) = 0;
45  virtual int disableMSMode(DAEstatus& status) = 0;
46  virtual int endRunAfterSequenceCompletes(DAEstatus& status) = 0;
47  virtual bool isRunEndedAndSequenceComplete(DAEstatus& status) = 0;
48  virtual bool isEndRunAfterSequenceCompletesInProgress(DAEstatus& status) = 0;
49 
50  virtual int enableEventMode(DAEstatus& status) = 0;
51  virtual int disableEventMode(DAEstatus& status) = 0;
52 
53  virtual int programPERLUT(isisU16_t* dwell_flags, isisU16_t* frames, int nperiod, DAEstatus& status) = 0;
54  virtual int programOUTLUT(isisU32_t* outputs, int nperiod, DAEstatus& status) = 0;
55  virtual int readPERLUT(isisU16_t* dwell_flags, isisU16_t* frames, int nperiod, DAEstatus& status) = 0;
56  virtual int readOUTLUT(isisU32_t* outputs, int nperiod, DAEstatus& status) = 0;
57  virtual int getPeriodRawFrames(int period, isisU32_t* frames, DAEstatus& status) = 0;
58  virtual int getPeriodGoodFrames(int period, isisU32_t* frames, DAEstatus& status) = 0;
59  virtual int zeroPeriodFrameCounters(DAEstatus& status) = 0;
60  virtual int zeroPeriodProtonCounters(DAEstatus& status) = 0;
61  virtual int zeroPeriodExtraCounters(DAEstatus& status) = 0;
62  virtual int setPeriodControlBits(isisU32_t mask, bool preserve, DAEstatus& status) = 0;
63 
64 
65  virtual float getRawUAmpHoursPeriod(int period, DAEstatus& status) = 0;
66  virtual float getGoodUAmpHoursPeriod(int period, DAEstatus& status) = 0;
67  virtual int getRawPPPLowerPeriod(int period, isisU32_t* value, DAEstatus& status) = 0;
68  virtual int getRawPPPUpperPeriod(int period, isisU32_t* value, DAEstatus& status) = 0;
69  virtual int getGoodPPPLowerPeriod(int period, isisU32_t* value, DAEstatus& status) = 0;
70  virtual int getGoodPPPUpperPeriod(int period, isisU32_t* value, DAEstatus& status) = 0;
71 
72 // int startDataCollection(DAEstatus& status);
73 // int stopDataCollection(DAEstatus& status);
74  virtual void abortSequenceCompleteWait(DAEstatus& status) = 0;
75  virtual int setPeriodOutputDelay(isisU32_t delay, DAEstatus& status) = 0; // in microseconds
76 
77  virtual int setMuonPulse(int pulse, DAEstatus& status) = 0;
78 
79  virtual int enableDelayedStart(DAEstatus& status) = 0;
80  virtual int disableDelayedStart(DAEstatus& status) = 0;
81 //environment
82 
83 public:
84  virtual int startRun(DAEstatus& status) = 0;
85  virtual int stopRun(DAEstatus& status) = 0;
86  virtual int ClearFramesAndPPP(DAEstatus& status) = 0;
87  virtual int setFrameSync(FrameSync fs, DAEstatus& status) = 0;
88  virtual FrameSync getFrameSync(DAEstatus& status) = 0;
89  virtual bool isRunning(DAEstatus& status) = 0;
90  virtual int resetRunController(DAEstatus& status) = 0;
91  virtual int getRawFrames(isisU32_t* value, DAEstatus& status) = 0;
92  virtual int getGoodFrames(isisU32_t* value, DAEstatus& status) = 0;
93  virtual int getRawPPPLower(isisU32_t* value, DAEstatus& status) = 0;
94  virtual int getRawPPPUpper(isisU32_t* value, DAEstatus& status) = 0;
95  virtual int getRawPPP(isisU64_t* value, DAEstatus& status) = 0;
96  virtual int getGoodPPPLower(isisU32_t* value, DAEstatus& status) = 0;
97  virtual int getGoodPPPUpper(isisU32_t* value, DAEstatus& status) = 0;
98  virtual int getGoodPPP(isisU64_t* value, DAEstatus& status) = 0;
99  virtual int enableSMPVeto(DAEstatus& status) = 0;
100  virtual int enableExternalVeto(int veto_number, DAEstatus& status) = 0;
101  virtual int enableInternalVeto(DAEstatus& status) = 0;
102  virtual int enableFIFOVeto(DAEstatus& status) = 0;
103  virtual int enableFermiChopperVeto(int chopper_number, int delay, int width, DAEstatus& status) = 0;
104  virtual int enableTS2PulseVeto(DAEstatus& status) = 0;
105  virtual int enableISIS50HzVeto(DAEstatus& status) = 0;
106  virtual int syncFrameTimer(DAEstatus& status) = 0;
107  virtual int readFrameTimer(FILETIME& ft, DAEstatus& status) = 0;
108  virtual double frameTimerDrift(DAEstatus& status) = 0; // icp - dae
109 
110 
111  virtual int enableHardwarePeriods(DAEstatus& status) = 0;
112  virtual int disableHardwarePeriods(DAEstatus& status) = 0;
113  virtual int disableSMPVeto(DAEstatus& status) = 0;
114  virtual int disableExternalVeto(int veto_number, DAEstatus& status) = 0;
115  virtual int disableInternalVeto(DAEstatus& status) = 0;
116  virtual int disableFIFOVeto(DAEstatus& status) = 0;
117  virtual int disableFermiChopperVeto(int chopper_number, DAEstatus& status) = 0;
118  virtual int disableTS2PulseVeto(DAEstatus& status) = 0;
119  virtual int disableISIS50HzVeto(DAEstatus& status) = 0;
120 
121  virtual int getSMPVetoedFrames(isisU32_t* value, DAEstatus& status) = 0;
122  virtual int getExternalVetoedFrames(int veto_number, isisU32_t* value, DAEstatus& status) = 0;
123  virtual int getFIFOVetoedFrames(isisU32_t* value, DAEstatus& status) = 0;
124  virtual int getInternalVetoedFrames(isisU32_t* value, DAEstatus& status) = 0;
125  virtual int getFermiChopperVetoedFrames(int chopper_number, isisU32_t* value, DAEstatus& status) = 0;
126  virtual int getTS2PulseVetoedFrames(isisU32_t* value, DAEstatus& status) = 0;
127  virtual int getISIS50HzVetoedFrames(isisU32_t* value, DAEstatus& status) = 0;
128 
129 // int clearSMPVetoedFrames(DAEstatus& status);
130 // int clearExternalVetoedFrames(DAEstatus& status);
131 // int clearFIFOVetoedFrames(DAEstatus& status);
132 
133  virtual int setFrameSyncDelay(isisU32_t value, DAEstatus& status) = 0; // in us
134  virtual int getFrameSyncDelay(isisU32_t* value, DAEstatus& status) = 0; // in us
135  virtual float getRawUAmpHours(DAEstatus& status) = 0;
136  virtual float getGoodUAmpHours(DAEstatus& status) = 0;
137  virtual bool usingHardwarePeriods(DAEstatus& status) = 0;
138 
139  virtual int getFChopperVetoedFrames(int chopper_number, isisU32_t* value, DAEstatus& status) = 0;
140  virtual int enableFChopperVeto(int chopper_number, int delay, int width, DAEstatus& status) = 0; // in 20ns units
141  virtual int disableFChopperVeto(int chopper_number, DAEstatus& status) = 0;
142  virtual int printVetoDetails(std::ostream& os, DAEstatus& status) = 0;
143  virtual int whichVeto(std::ostream& os, DAEstatus& status) = 0;
144 
145  virtual int resetCardState(DAEstatus& status) = 0;
146 
147 };
148 
149 template <class EnvPeriodPolicy>
150 class EnvPeriodCard : public DAE2Card<EnvPeriodPolicy>, public EnvPeriodCardIntf
151 {
152 
153 private:
154  unsigned m_options;
155  enum EnvPCOptions
159  {
160  MSMode=0x1,
165  };
166 // enum EPCFrameSync { FrameSyncInternal = 0x0, FrameSyncSMP=0x1, FrameSyncTOF=0x2, FrameSyncMuon=0x3 };
168 // period card
170 public:
171 
172  EnvPeriodCard(int position, ISISVME* vme, DAEstatus& status);
173  void printStatus(std::ostream& os, DAEstatus& status);
174 
175  // main period register
176  int getCurrentPeriodNumber(DAEstatus& status); // 0 is first period
177  bool inDwellPeriod(DAEstatus& status); // is current period a dwell
178  int setNumberOfPeriods(isisU16_t n, DAEstatus& status); // numbered internally 0 to n-1
179  int getNumberOfPeriods(DAEstatus& status);
180  int getCurrentPeriodSequence(DAEstatus& status);
181 
182  // vetos
183 // int clearVetoCounters(DAEstatus& status);
184 
185  // extract trigger veto count
186 // int getExtractTriggerVetoCountLow(isisU16_t* value, DAEstatus& status);
187 // int getExtractTriggerVetoCountHigh(isisU16_t* value, DAEstatus& status);
188 // int getExtractTriggerVetoCount(isisU32_t* value, DAEstatus& status);
189 // int enableExtractTriggerVeto(DAEstatus& status);
190 // int disableExtractTriggerVeto(DAEstatus& status);
191  int getMSModeVetoedFrames(isisU32_t* value, DAEstatus& status);
192 
193  int resetPeriodCard(DAEstatus& status);
194  int clearPeriodCounters(DAEstatus& status);
195 // int enable50HzVeto(DAEstatus& status);
196 // int disable50HzVeto(DAEstatus& status);
197 // int setInternalPeriodClockMode(DAEstatus& status);
198 // int setExternalPeriodClockMode(DAEstatus& status);
200  int setMultiplePeriodSequenceMode(int nseq, DAEstatus& status);
202 // int setInternalPeriodControlMode(DAEstatus& status);
203 // int setExternalPeriodControlMode(DAEstatus& status);
204  int enablePeriodMode(bool external_mode, DAEstatus& status);
205  int disablePeriodMode(DAEstatus& status);
206  int enableMSMode(DAEstatus& status);
207  int disableMSMode(DAEstatus& status);
211 
212  int enableEventMode(DAEstatus& status);
213  int disableEventMode(DAEstatus& status);
214 
215  int programPERLUT(isisU16_t* dwell_flags, isisU16_t* frames, int nperiod, DAEstatus& status);
216  int programOUTLUT(isisU32_t* outputs, int nperiod, DAEstatus& status);
217  int readPERLUT(isisU16_t* dwell_flags, isisU16_t* frames, int nperiod, DAEstatus& status);
218  int readOUTLUT(isisU32_t* outputs, int nperiod, DAEstatus& status);
219  int getPeriodRawFrames(int period, isisU32_t* frames, DAEstatus& status);
220  int getPeriodGoodFrames(int period, isisU32_t* frames, DAEstatus& status);
221  int zeroPeriodFrameCounters(DAEstatus& status);
222  int zeroPeriodProtonCounters(DAEstatus& status);
223  int zeroPeriodExtraCounters(DAEstatus& status);
224  int setPeriodControlBits(isisU32_t mask, bool preserve, DAEstatus& status);
225 
226 
227 
228  float getRawUAmpHoursPeriod(int period, DAEstatus& status);
229  float getGoodUAmpHoursPeriod(int period, DAEstatus& status);
230  int getRawPPPLowerPeriod(int period, isisU32_t* value, DAEstatus& status);
231  int getRawPPPUpperPeriod(int period, isisU32_t* value, DAEstatus& status);
232  int getGoodPPPLowerPeriod(int period, isisU32_t* value, DAEstatus& status);
233  int getGoodPPPUpperPeriod(int period, isisU32_t* value, DAEstatus& status);
234 
235 // int startDataCollection(DAEstatus& status);
236 // int stopDataCollection(DAEstatus& status);
237  void abortSequenceCompleteWait(DAEstatus& status);
238  int setPeriodOutputDelay(isisU32_t delay, DAEstatus& status); // in microseconds
239 
240  int setMuonPulse(int pulse, DAEstatus& status);
241 
242  int enableDelayedStart(DAEstatus& status);
243  int disableDelayedStart(DAEstatus& status);
244 
245 protected:
246  int setVetoRegisterBits(isisU32_t mask, bool preserve, DAEstatus& status);
247  int clearVetoRegisterBits(isisU32_t mask, DAEstatus& status);
248 
249  int clearPeriodControlBits(isisU32_t mask, DAEstatus& status);
250  int setAndClearPeriodControlBits(isisU32_t mask, bool preserve, DAEstatus& status);
251  int getRawFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus& status);
252  int getGoodFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus& status);
253  int getPeriodRequestedFrames(int period, isisU32_t* frames, DAEstatus& status);
254  int getRequestedFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus& status);
255 
256 // lookup table access register
257  int lookupAccessOUTLUT(DAEstatus& status);
258  int lookupAccessPERLUT(DAEstatus& status);
259  int lookupFinished(DAEstatus& status);
260 
262 // environment card
264 //environment
265 
266 public:
267  int startRun(DAEstatus& status);
268  int stopRun(DAEstatus& status);
269  int ClearFramesAndPPP(DAEstatus& status);
270  int setFrameSync(FrameSync fs, DAEstatus& status);
272  bool isRunning(DAEstatus& status);
273  int resetRunController(DAEstatus& status);
274  int getRawFrames(isisU32_t* value, DAEstatus& status);
275  int getGoodFrames(isisU32_t* value, DAEstatus& status);
276  int getRawPPPLower(isisU32_t* value, DAEstatus& status);
277  int getRawPPPUpper(isisU32_t* value, DAEstatus& status);
278  int getRawPPP(isisU64_t* value, DAEstatus& status);
279  int getGoodPPPLower(isisU32_t* value, DAEstatus& status);
280  int getGoodPPPUpper(isisU32_t* value, DAEstatus& status);
281  int getGoodPPP(isisU64_t* value, DAEstatus& status);
282  int enableSMPVeto(DAEstatus& status);
283  int enableExternalVeto(int veto_number, DAEstatus& status);
284  int enableInternalVeto(DAEstatus& status);
285  int enableFIFOVeto(DAEstatus& status);
286  int enableFermiChopperVeto(int chopper_number, int delay, int width, DAEstatus& status);
287  int enableTS2PulseVeto(DAEstatus& status);
288  int enableISIS50HzVeto(DAEstatus& status);
289  int syncFrameTimer(DAEstatus& status);
290  int readFrameTimer(FILETIME& ft, DAEstatus& status);
291  double frameTimerDrift(DAEstatus& status); // icp - dae
292 
293 
294  int enableHardwarePeriods(DAEstatus& status);
295  int disableHardwarePeriods(DAEstatus& status);
296  int disableSMPVeto(DAEstatus& status);
297  int disableExternalVeto(int veto_number, DAEstatus& status);
298  int disableInternalVeto(DAEstatus& status);
299  int disableFIFOVeto(DAEstatus& status);
300  int disableFermiChopperVeto(int chopper_number, DAEstatus& status);
301  int disableTS2PulseVeto(DAEstatus& status);
302  int disableISIS50HzVeto(DAEstatus& status);
303 
304  int getSMPVetoedFrames(isisU32_t* value, DAEstatus& status);
305  int getExternalVetoedFrames(int veto_number, isisU32_t* value, DAEstatus& status);
306  int getFIFOVetoedFrames(isisU32_t* value, DAEstatus& status);
307  int getInternalVetoedFrames(isisU32_t* value, DAEstatus& status);
308  int getFermiChopperVetoedFrames(int chopper_number, isisU32_t* value, DAEstatus& status);
309  int getTS2PulseVetoedFrames(isisU32_t* value, DAEstatus& status);
310  int getISIS50HzVetoedFrames(isisU32_t* value, DAEstatus& status);
311 
312 // int clearSMPVetoedFrames(DAEstatus& status);
313 // int clearExternalVetoedFrames(DAEstatus& status);
314 // int clearFIFOVetoedFrames(DAEstatus& status);
315 
316  int setFrameSyncDelay(isisU32_t value, DAEstatus& status); // in us
317  int getFrameSyncDelay(isisU32_t* value, DAEstatus& status); // in us
318  float getRawUAmpHours(DAEstatus& status);
319  float getGoodUAmpHours(DAEstatus& status);
320  bool usingHardwarePeriods(DAEstatus& status);
321 
322  int getFChopperVetoedFrames(int chopper_number, isisU32_t* value, DAEstatus& status);
323  int enableFChopperVeto(int chopper_number, int delay, int width, DAEstatus& status); // in 20ns units
324  int disableFChopperVeto(int chopper_number, DAEstatus& status);
325  int printVetoDetails(std::ostream& os, DAEstatus& status);
326  int whichVeto(std::ostream& os, DAEstatus& status);
327 
328  virtual int resetCardState(DAEstatus& status);
329 
330  virtual int position() const { return DAE2Card<EnvPeriodPolicy>::position(); }
331  virtual std::string daeDevice() const { return DAE2Card<EnvPeriodPolicy>::daeDevice(); }
332 
333 protected:
334  int setRunControlBits(isisU32_t mask, bool preserve, DAEstatus& status);
335  int clearRunControlBits(isisU32_t mask, DAEstatus& status);
336  int setAndClearRunControlBits(isisU32_t mask, bool preserve, DAEstatus& status);
337  int clearPPP(DAEstatus& status);
338  int updateOptions(DAEstatus& status);
340  {
341  m_options |= opts;
342  }
344  {
345  m_options &= ~opts;
346  }
348  {
349  return ((m_options & opts) != 0 ? true : false);
350  }
351  int processFermiChopperVeto(int chopper_number, boost::function<int(isisU32_t, DAEstatus&)> func, DAEstatus& status);
352  int computeTimeOffsetDelay(isisU32_t& delay, DAEstatus& status);
353 };
354 
355 #endif /* ENV_PERIOD_CARD_H */
int enableEventMode(DAEstatus &status)
int processFermiChopperVeto(int chopper_number, boost::function< int(isisU32_t, DAEstatus &)> func, DAEstatus &status)
virtual int getGoodFrames(isisU32_t *value, DAEstatus &status)=0
virtual int getRawFrames(isisU32_t *value, DAEstatus &status)=0
int disablePeriodMode(DAEstatus &status)
int setVetoRegisterBits(isisU32_t mask, bool preserve, DAEstatus &status)
virtual int resetPeriodCard(DAEstatus &status)=0
int getPeriodGoodFrames(int period, isisU32_t *frames, DAEstatus &status)
virtual int zeroPeriodFrameCounters(DAEstatus &status)=0
int disableSMPVeto(DAEstatus &status)
int endRunAfterSequenceCompletes(DAEstatus &status)
virtual int disableSMPVeto(DAEstatus &status)=0
virtual int clearPeriodCounters(DAEstatus &status)=0
virtual int getMSModeVetoedFrames(isisU32_t *value, DAEstatus &status)=0
int enableISIS50HzVeto(DAEstatus &status)
int enableExternalVeto(int veto_number, DAEstatus &status)
int disableTS2PulseVeto(DAEstatus &status)
virtual int enableHardwarePeriods(DAEstatus &status)=0
int getSMPVetoedFrames(isisU32_t *value, DAEstatus &status)
virtual std::string daeDevice() const
virtual int enablePeriodMode(bool external_mode, DAEstatus &status)=0
virtual int getGoodPPPLowerPeriod(int period, isisU32_t *value, DAEstatus &status)=0
int whichVeto(std::ostream &os, DAEstatus &status)
keeps a static variable count of last values, should be safe as only one environment card ...
virtual int getRawPPPLowerPeriod(int period, isisU32_t *value, DAEstatus &status)=0
int clearVetoRegisterBits(isisU32_t mask, DAEstatus &status)
int getRawPPPUpperPeriod(int period, isisU32_t *value, DAEstatus &status)
int resetRunController(DAEstatus &status)
virtual int disableDelayedStart(DAEstatus &status)=0
int disableDelayedStart(DAEstatus &status)
virtual int getISIS50HzVetoedFrames(isisU32_t *value, DAEstatus &status)=0
int getInternalVetoedFrames(isisU32_t *value, DAEstatus &status)
int disableExternalVeto(int veto_number, DAEstatus &status)
virtual int getFermiChopperVetoedFrames(int chopper_number, isisU32_t *value, DAEstatus &status)=0
virtual bool isEndRunAfterSequenceCompletesInProgress(DAEstatus &status)=0
int clearPeriodControlBits(isisU32_t mask, DAEstatus &status)
virtual float getGoodUAmpHours(DAEstatus &status)=0
unsigned long isisU32_t
Definition: isisvme_types.h:8
int readPERLUT(isisU16_t *dwell_flags, isisU16_t *frames, int nperiod, DAEstatus &status)
double frameTimerDrift(DAEstatus &status)
return drift in microseconds, icp - dae
virtual bool isRunning(DAEstatus &status)=0
virtual int setMultiplePeriodSequenceMode(int nseq, DAEstatus &status)=0
int getRawPPPLowerPeriod(int period, isisU32_t *value, DAEstatus &status)
int getPeriodRawFrames(int period, isisU32_t *frames, DAEstatus &status)
virtual int disablePeriodMode(DAEstatus &status)=0
int enableFermiChopperVeto(int chopper_number, int delay, int width, DAEstatus &status)
virtual int enableExternalVeto(int veto_number, DAEstatus &status)=0
int getGoodFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus &status)
virtual int syncFrameTimer(DAEstatus &status)=0
int setMuonPulse(int pulse, DAEstatus &status)
int getRawFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus &status)
int clearPeriodCounters(DAEstatus &status)
int disableMSMode(DAEstatus &status)
virtual ~EnvPeriodCardIntf()
int enableMSMode(DAEstatus &status)
bool usingHardwarePeriods(DAEstatus &status)
int lookupFinished(DAEstatus &status)
virtual int startRun(DAEstatus &status)=0
int getRawPPPLower(isisU32_t *value, DAEstatus &status)
virtual int setSinglePeriodSequenceMode(DAEstatus &status)=0
int getPeriodRequestedFrames(int period, isisU32_t *frames, DAEstatus &status)
virtual float getRawUAmpHours(DAEstatus &status)=0
int getGoodPPPLower(isisU32_t *value, DAEstatus &status)
void setOptions(EnvPCOptions opts)
int disableInternalVeto(DAEstatus &status)
virtual int ClearFramesAndPPP(DAEstatus &status)=0
virtual int enableDelayedStart(DAEstatus &status)=0
int getRawPPP(isisU64_t *value, DAEstatus &status)
int getExternalVetoedFrames(int veto_number, isisU32_t *value, DAEstatus &status)
float getGoodUAmpHoursPeriod(int period, DAEstatus &status)
int disableFChopperVeto(int chopper_number, DAEstatus &status)
int enableFIFOVeto(DAEstatus &status)
virtual int getGoodPPPUpperPeriod(int period, isisU32_t *value, DAEstatus &status)=0
The period card is running in Muon MS Mode.
int updateOptions(DAEstatus &status)
void printStatus(std::ostream &os, DAEstatus &status)
FrameSync getFrameSync(DAEstatus &status)
int disableFermiChopperVeto(int chopper_number, DAEstatus &status)
float getRawUAmpHoursPeriod(int period, DAEstatus &status)
virtual int whichVeto(std::ostream &os, DAEstatus &status)=0
unsigned m_options
virtual bool isMultipleSequenceComplete(DAEstatus &status)=0
virtual int getGoodPPPUpper(isisU32_t *value, DAEstatus &status)=0
int getGoodPPPUpperPeriod(int period, isisU32_t *value, DAEstatus &status)
int disableHardwarePeriods(DAEstatus &status)
bool isMultipleSequenceComplete(DAEstatus &status)
int zeroPeriodFrameCounters(DAEstatus &status)
int getMSModeVetoedFrames(isisU32_t *value, DAEstatus &status)
virtual int disableMSMode(DAEstatus &status)=0
virtual int printVetoDetails(std::ostream &os, DAEstatus &status)=0
EnvPeriodCard(int position, ISISVME *vme, DAEstatus &status)
virtual float getRawUAmpHoursPeriod(int period, DAEstatus &status)=0
virtual int disableFIFOVeto(DAEstatus &status)=0
int getGoodPPPLowerPeriod(int period, isisU32_t *value, DAEstatus &status)
int setRunControlBits(isisU32_t mask, bool preserve, DAEstatus &status)
virtual int getCurrentPeriodSequence(DAEstatus &status)=0
virtual int enableTS2PulseVeto(DAEstatus &status)=0
int syncFrameTimer(DAEstatus &status)
int enableTS2PulseVeto(DAEstatus &status)
int zeroPeriodProtonCounters(DAEstatus &status)
virtual int enableEventMode(DAEstatus &status)=0
int setFrameSyncDelay(isisU32_t value, DAEstatus &status)
void clearOptions(EnvPCOptions opts)
virtual int enableFChopperVeto(int chopper_number, int delay, int width, DAEstatus &status)=0
int disableEventMode(DAEstatus &status)
int resetPeriodCard(DAEstatus &status)
virtual int getExternalVetoedFrames(int veto_number, isisU32_t *value, DAEstatus &status)=0
int setMultiplePeriodSequenceMode(int nseq, DAEstatus &status)
virtual int zeroPeriodExtraCounters(DAEstatus &status)=0
virtual int endRunAfterSequenceCompletes(DAEstatus &status)=0
virtual int getRawPPPUpperPeriod(int period, isisU32_t *value, DAEstatus &status)=0
int readOUTLUT(isisU32_t *outputs, int nperiod, DAEstatus &status)
virtual int disableExternalVeto(int veto_number, DAEstatus &status)=0
virtual int getInternalVetoedFrames(isisU32_t *value, DAEstatus &status)=0
virtual int getGoodPPPLower(isisU32_t *value, DAEstatus &status)=0
int programPERLUT(isisU16_t *dwell_flags, isisU16_t *frames, int nperiod, DAEstatus &status)
bool isRunEndedAndSequenceComplete(DAEstatus &status)
virtual int programPERLUT(isisU16_t *dwell_flags, isisU16_t *frames, int nperiod, DAEstatus &status)=0
virtual int enableISIS50HzVeto(DAEstatus &status)=0
unsigned short isisU16_t
Definition: isisvme_types.h:7
do not check SRAM areas after zeroing - workaround for broken cards
virtual int resetRunController(DAEstatus &status)=0
int setNumberOfPeriods(isisU16_t n, DAEstatus &status)
int setPeriodControlBits(isisU32_t mask, bool preserve, DAEstatus &status)
int getCurrentPeriodSequence(DAEstatus &status)
FrameSync
Definition: isiscrpt_types.h:5
virtual int setNumberOfPeriods(isisU16_t n, DAEstatus &status)=0
int getFrameSyncDelay(isisU32_t *value, DAEstatus &status)
int lookupAccessOUTLUT(DAEstatus &status)
virtual int getFrameSyncDelay(isisU32_t *value, DAEstatus &status)=0
float getRawUAmpHours(DAEstatus &status)
virtual int disableISIS50HzVeto(DAEstatus &status)=0
int enableDelayedStart(DAEstatus &status)
virtual int readPERLUT(isisU16_t *dwell_flags, isisU16_t *frames, int nperiod, DAEstatus &status)=0
int enableInternalVeto(DAEstatus &status)
bool isRunning(DAEstatus &status)
virtual int getRawPPPLower(isisU32_t *value, DAEstatus &status)=0
virtual int getFIFOVetoedFrames(isisU32_t *value, DAEstatus &status)=0
virtual int resetCardState(DAEstatus &status)=0
virtual int disableInternalVeto(DAEstatus &status)=0
int enableFChopperVeto(int chopper_number, int delay, int width, DAEstatus &status)
virtual int programOUTLUT(isisU32_t *outputs, int nperiod, DAEstatus &status)=0
virtual int getSMPVetoedFrames(isisU32_t *value, DAEstatus &status)=0
virtual int disableEventMode(DAEstatus &status)=0
int startRun(DAEstatus &status)
std::string daeDevice() const
Definition: dae2_card.cpp:13
virtual bool usingHardwarePeriods(DAEstatus &status)=0
ULONG64 isisU64_t
Definition: isisvme_types.h:10
virtual int getTS2PulseVetoedFrames(isisU32_t *value, DAEstatus &status)=0
virtual int enableMSMode(DAEstatus &status)=0
int enablePeriodMode(bool external_mode, DAEstatus &status)
virtual int disableTS2PulseVeto(DAEstatus &status)=0
virtual int stopRun(DAEstatus &status)=0
virtual int disableHardwarePeriods(DAEstatus &status)=0
virtual int readOUTLUT(isisU32_t *outputs, int nperiod, DAEstatus &status)=0
virtual int enableInternalVeto(DAEstatus &status)=0
virtual bool isRunEndedAndSequenceComplete(DAEstatus &status)=0
int getCurrentPeriodNumber(DAEstatus &status)
int setPeriodOutputDelay(isisU32_t delay, DAEstatus &status)
int getGoodPPPUpper(isisU32_t *value, DAEstatus &status)
int getGoodPPP(isisU64_t *value, DAEstatus &status)
virtual FrameSync getFrameSync(DAEstatus &status)=0
int position() const
Definition: dae2_card.h:72
virtual int setFrameSyncDelay(isisU32_t value, DAEstatus &status)=0
virtual void printStatus(std::ostream &os, DAEstatus &status)=0
virtual int enableFIFOVeto(DAEstatus &status)=0
int getFChopperVetoedFrames(int chopper_number, isisU32_t *value, DAEstatus &status)
int setFrameSync(FrameSync fs, DAEstatus &status)
virtual int enableFermiChopperVeto(int chopper_number, int delay, int width, DAEstatus &status)=0
int stopRun(DAEstatus &status)
virtual void abortSequenceCompleteWait(DAEstatus &status)=0
virtual int disableFChopperVeto(int chopper_number, DAEstatus &status)=0
int printVetoDetails(std::ostream &os, DAEstatus &status)
int computeTimeOffsetDelay(isisU32_t &delay, DAEstatus &status)
compute the delay in reading or writing a value in DAE time units (20ns)
virtual int setPeriodOutputDelay(isisU32_t delay, DAEstatus &status)=0
virtual int getFChopperVetoedFrames(int chopper_number, isisU32_t *value, DAEstatus &status)=0
virtual int setMuonPulse(int pulse, DAEstatus &status)=0
virtual int getRawPPP(isisU64_t *value, DAEstatus &status)=0
int setAndClearPeriodControlBits(isisU32_t mask, bool preserve, DAEstatus &status)
virtual int getRawPPPUpper(isisU32_t *value, DAEstatus &status)=0
int getISIS50HzVetoedFrames(isisU32_t *value, DAEstatus &status)
float getGoodUAmpHours(DAEstatus &status)
The frame counters should be rotated right. This is a workaround for 1 frame per periods.
int disableFIFOVeto(DAEstatus &status)
int setSinglePeriodSequenceMode(DAEstatus &status)
virtual int getNumberOfPeriods(DAEstatus &status)=0
int clearRunControlBits(isisU32_t mask, DAEstatus &status)
int disableISIS50HzVeto(DAEstatus &status)
int ClearFramesAndPPP(DAEstatus &status)
int lookupAccessPERLUT(DAEstatus &status)
virtual int getPeriodGoodFrames(int period, isisU32_t *frames, DAEstatus &status)=0
int getFermiChopperVetoedFrames(int chopper_number, isisU32_t *value, DAEstatus &status)
void abortSequenceCompleteWait(DAEstatus &status)
virtual int position() const
int clearPPP(DAEstatus &status)
virtual int getCurrentPeriodNumber(DAEstatus &status)=0
virtual int zeroPeriodProtonCounters(DAEstatus &status)=0
int getNumberOfPeriods(DAEstatus &status)
bool checkOptions(EnvPCOptions opts)
int getFIFOVetoedFrames(isisU32_t *value, DAEstatus &status)
int getRawPPPUpper(isisU32_t *value, DAEstatus &status)
int enableHardwarePeriods(DAEstatus &status)
int getTS2PulseVetoedFrames(isisU32_t *value, DAEstatus &status)
virtual int getPeriodRawFrames(int period, isisU32_t *frames, DAEstatus &status)=0
virtual int setFrameSync(FrameSync fs, DAEstatus &status)=0
int getRequestedFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus &status)
virtual float getGoodUAmpHoursPeriod(int period, DAEstatus &status)=0
int zeroPeriodExtraCounters(DAEstatus &status)
virtual bool inDwellPeriod(DAEstatus &status)=0
int readFrameTimer(FILETIME &ft, DAEstatus &status)
virtual int readFrameTimer(FILETIME &ft, DAEstatus &status)=0
virtual int disableFermiChopperVeto(int chopper_number, DAEstatus &status)=0
int programOUTLUT(isisU32_t *outputs, int nperiod, DAEstatus &status)
virtual int getGoodPPP(isisU64_t *value, DAEstatus &status)=0
virtual double frameTimerDrift(DAEstatus &status)=0
virtual int enableSMPVeto(DAEstatus &status)=0
bool isEndRunAfterSequenceCompletesInProgress(DAEstatus &status)
virtual int resetCardState(DAEstatus &status)
virtual int setPeriodControlBits(isisU32_t mask, bool preserve, DAEstatus &status)=0
int enableSMPVeto(DAEstatus &status)
int setAndClearRunControlBits(isisU32_t mask, bool preserve, DAEstatus &status)
bool inDwellPeriod(DAEstatus &status)