1 #ifndef ENV_PERIOD_CARD_H
2 #define ENV_PERIOD_CARD_H
149 template <
class EnvPeriodPolicy>
349 return ((
m_options & opts) != 0 ?
true :
false);
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
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
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
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)
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
virtual bool usingHardwarePeriods(DAEstatus &status)=0
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
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)