#include <CSIS3600.h>
class CSIS3600 {CSIS3600(unsigned long base, int crate = 0) throws std::string;
void Reset();
const void LightLed();
const void ClearLed();
const bool isLedLit();
const void SetLatchMode();
const void SetCoincidenceMode();
const bool isLatchMode();
const void EnableExternalClear();
const void DisableExternalClear();
const bool ExternalClearEnabled();
const void EnableExternalNext();
const void DisableExternalNext();
const bool ExternalNextEnabled();
void SetFastClearWindow(int ns);
const int GetFastClearWindow();
const void Enable();
const void Disable()();
const void Clock();
const void StartLatch();
const void EndLatch();
const bool DataReady();
const void ClearData();
const unsigned long Read() throws throws std::string;
const unsigned int Read(void* pBuffer, int nLongs);
}
This class provides low level support for the SIS 3600 multievent latch. The module can act either as a pure latch or as a coincidence register. A latch stores the inputs presented to it on the falling edge of a gate while coincidence registers, store 1's for all inputs that have had true values for the duration of the input gate.
Creates an instance of a CSIS3600
class. This object will allow you to manipulate the SIS 3600
module that has the base address base
in
VME crate number crate
. If the
crate
is not supplied, it defaults to 0
which is suitable for single crate systems.
Performs a module soft reset.
Turns on the U led on the module. This LED is available for application specific signalling.
Turns off the U led on the module.
Returns true if the U LED is lit.
Requests that the module operate in latch mode. In latch mode,
inputs that are asserted will be transferred to the event memory
when the next event signal transitions to asserted.
See also SetCoincidenceMode
.
Places the module in coincidence mode. In coincidence mode, signals that are asserteed during the length the gate is present are transmitted to the event memory as one, otherwise as zero.
Returns true if the module has been set in latch mode. If the module is in coincidence mode, this will return false.
Enables the external fast clear input. This is used in conjunction with the fast clear window to allow events to be rejected prior to transferring them to the fifo. A fast clear signal that arrives within the fast clear window of the end(?) of the gate discards the event prior to transfer.
Disables the module external fast clear input. Transitions to asserted on this line will have no impact on the operation of the module, regardess of their timing relative to the fast clear window.
Returns true if the external fast clear is enabled.
Enables the external next input to act either as a latch or coincidence window depending on the mode of the module.
Disables the external next input. When external next is disabled, data can only be latched by a programmatic latch.
Returns true if the external next signal is enabled.
Sets the fast clear window in nano seconds. Note that there is a granularity to the fast clear window width. See section 7.4 of the SIS 3600 manual.
Returns the value of the fast clear window in ns. Due to the granularity of the fast clear window, it's not strange to set a fast clear window and then ask the card what the fast clear window actually turned out to be.
Enables the module's ability to clock in new events.
Disables the module's ability to clock in new events.
Clocks in the next event. If the module is in latch mode, it is pretty easy to see that the data presented to the module at the time the function is called is loaded into the FIFO as the next event. It is not clear from the manual documentation what it means to call this whe the module is in coincidence mode. My guess is that there is a finite width to the internal clock generated by this function, and the width of that signal determines the coincidence window.
Begins a latch operation. In coincidence mode this allows a (long) software timed coincidence window to be programmed. Calling this starts the window.
Ends a software timed latch (load next event) window.
Returns true if the module has data in its FIFO.
Clears any data that may be hanging around in the FIFO.
Reads an event (one longword) from the FIFO of the module and returns it as the function value. If there are no events in the FIFO, the function throws an exception of type std::string.
Reads at most nLongs
from the event FIFO to the
buffer pointed to by pBuffer
. Returns the number of
longwords that were actually read. This can be less than nLongs
or even 0 if there fewer than nLongs
in the module's FIFO