CSIS3300 Class Reference

#include <sis3300.h>

List of all members.

Public Types

enum  _ClockSource {
  Internal100Mhz = 0, Internal50Mhz = 1, Internal25Mhz = 2, Internal12_5Mhz = 3,
  Internal6_25Mhz = 4, Internal3_125Mhz = 5, ExternalFp = 6, ExternalP2 = 7
}
enum  _SampleSize {
  Sample128K = 0, Sample16K = 1, Sample4K = 2, Sample2K = 3,
  Sample1K = 4, Sample512 = 5, Sample256 = 6, Sample128 = 7
}
typedef enum CSIS3300::_ClockSource ClockSource
 the enum values match the bit field values
typedef enum CSIS3300::_SampleSize SampleSize

Public Member Functions

 CSIS3300 (unsigned long nBaseAddress, unsigned int nCrate=0)
 ~CSIS3300 ()
unsigned long getBaseAddress () const
unsigned long getPageSize () const
volatile unsigned long * getAddressRegister1 ()
volatile unsigned long * getAddressRegister2 ()
volatile unsigned long * getAddressRegister3 ()
volatile unsigned long * getAddressRegister4 ()
volatile unsigned long * getModuleBase ()
volatile unsigned long * getCsr ()
unsigned long getStatusRegister () const
 Get value of status register.
void setControlRegister (unsigned long value)
 Set the control register.
volatile const unsigned long * getModuleId () const
unsigned int getModelNumber () const
 Get the model number:.
unsigned int getFirmwareMajor () const
 Get the firmware major revlevel:.
unsigned int getFirmwareMinor () const
 Get the firmware minor rev level:.
volatile const unsigned long * getAcquisitionRegister () const
 Read access to the Acquisition register.
volatile unsigned long * getResetKeyRegister ()
volatile unsigned long * getStartKeyRegister ()
volatile unsigned long * getEventConfigRegister ()
volatile unsigned long * getStartDelayRegister ()
volatile unsigned long * getStopDelayRegister ()
volatile unsigned long * getEventDirectory1 ()
volatile unsigned long * getEventDirectory2 ()
volatile unsigned long * getEventDirectory3 ()
volatile unsigned long * getEventDirectory4 ()
void * getFd ()
void Reset ()
 Reset the module.
void SetClock (ClockSource eSource)
void SetStartDelay (bool Enable=false, unsigned int nClocks=0)
void SetStopDelay (bool Enable=false, unsigned int nClocks=0)
void GateMode (bool Enable=false)
void RandomClock (bool Enable=false)
void LemoStartStop (bool Enable=false)
void P2StartStop (bool Enable=false)
void HiRA_RCM (bool Enable=false)
void TriggerOnStop (bool Enable=true)
void SetSampleSize (SampleSize eSamples)
void EnableWrap (bool Enable=true)
unsigned int GetUserInput ()
void SetThresholds (bool *pLessThan, unsigned int *pValues)
CSIS3300::ClockSource getCurrentClockSource ()
bool isStartDelayEnabled ()
unsigned int getStartDelayClocks ()
bool isStopDelayEnabled ()
unsigned int getStopDelayClocks ()
unsigned int getThresholdValue (unsigned int channel) const
bool isLtThreshold (unsigned int channel) const
bool haveHiRAFirmware () const
void LightOn ()
void LightOff ()
void InitDaq ()
void Arm1 ()
void Arm2 ()
void DisArm1 ()
void DisArm2 ()
void StartSampling ()
void StopSampling ()
void EnableUserOut ()
void DisableUserOut ()
void StrobeUserOut (int time)
bool WaitUntilDone (int timeout)
unsigned long EventNumber (int bank)
unsigned int ReadGroup1 (void *pBuffer)
unsigned int ReadGroup2 (void *pBuffer)
unsigned int ReadGroup3 (void *pBuffer)
unsigned int ReadGroup4 (void *pBuffer)
unsigned int ReadAllGroups (void *pBuffer)
unsigned int ReadGroup1 (DAQWordBufferPtr &pBuffer)
unsigned int ReadGroup2 (DAQWordBufferPtr &pBuffer)
unsigned int ReadGroup3 (DAQWordBufferPtr &pBuffer)
unsigned int ReadGroup4 (DAQWordBufferPtr &pBuffer)
unsigned int ReadAllGroups (DAQWordBufferPtr &pBuffer)
void ClearDaq ()

Protected Member Functions

unsigned int ReadAGroup (DAQWordBufferPtr &pBuffer, volatile unsigned long *pAddressReg1, unsigned long pBase)
unsigned int ReadAGroup (void *pbuffer, volatile unsigned long *pAddressReg1, unsigned long pBase)
 For reading to normal memory buffers.

Private Member Functions

 CSIS3300 (const CSIS3300 &rhs)
CSIS3300operator= (const CSIS3300 &rhs)
int operator== (const CSIS3300 &rhs)
volatile unsigned long getGroup1Address ()
volatile unsigned long getGroup2Address ()
volatile unsigned long getGroup3Address ()
volatile unsigned long getGroup4Address ()

Private Attributes

unsigned long m_nBase
 Module abs. VME base.
volatile unsigned long * m_pCsrs
 CSR bank 0 - 0x3000.
volatile unsigned long * m_pEi1
 Event information for bank1.
volatile unsigned long * m_pEi2
 Event info for bank 2.
volatile unsigned long * m_pEi3
 Event info for bank 3.
volatile unsigned long * m_pEi4
 Event info for bank 4.
volatile unsigned long * m_pModuleId
 Module ID register.
volatile unsigned long * m_pCsr
 Control status register.
volatile unsigned long * m_pAcqReg
 Acquisition control register.
volatile unsigned long * m_pResetKey
 Module reset key register.
volatile unsigned long * m_pStart
 Start Key register.
volatile unsigned long * m_pStop
 Stop Key register.
volatile unsigned long * m_pEventConfig
 Global Event config register.
volatile unsigned long * m_pStartDelay
 Start delay register.
volatile unsigned long * m_pStopDelay
 Stop delay register.
volatile unsigned long * m_pAddressReg1
 Address register 1 (detect eov).
volatile unsigned long * m_pAddressReg2
 Address register 2 (detect eov).
volatile unsigned long * m_pAddressReg3
 Address register 3 (detect eov).
volatile unsigned long * m_pAddressReg4
 Address register 4 (detect eov).
volatile unsigned long * m_pEventDirectory1
 Ptr to the event directory.
volatile unsigned long * m_pEventDirectory2
 Ptr to the event directory.
volatile unsigned long * m_pEventDirectory3
 Ptr to the event directory.
volatile unsigned long * m_pEventDirectory4
 Ptr to the event directory.
volatile unsigned long * m_pBank1Buffers [4]
 Bank data memory.
volatile unsigned long * m_pThresholds [4]
 threshold registers.
void * m_nFd
 Fd open on the vme device driver.
ClockSource m_eClock
 Source of sampling clock.
bool m_fStartDelayEnabled
 true if start delay register is used.
unsigned int m_nStartDelayClocks
 clocks to load into start delay reg.
bool m_fStopDelayEnabled
 true if stop delay register is used.
unsigned int m_nStopDelayClocks
 clocks to load into stop delay register.
bool m_fGateMode
bool m_fRandomClock
 true if module in gate mode.
bool m_fLemoStartStop
 True if module is in Random Clock Mode.
bool m_fP2StartStop
bool m_fHiRA_RCM
bool m_fStopTrigger
 True if in HiRA Random Clock Mode.
SampleSize m_ePagesize
 True if stop is trigger. Size of acquisition page (enum).
unsigned int m_nPagesize
 Size of acquisition page in samples.
bool m_fPageWrap
 True if allowing data to wrap the pages.
bool m_fThresholdLt [8]
 True if chann threshold is a < threshold.
unsigned int m_nThresholds [8]
 ADC channel threshold values.


Detailed Description

Preliminary class to setup and read the SIS3300 flash adc. Supported functions are to:

Initialize the module to work in external trigger: Start or stop mode, single event mode with specified Clock source and sample size, and pre/post trigger delays.

This class does not support ADC thresholds, or multievent mode but they can be added later.

Author: R. Fox Modified by: M.A. Famiano for use with HiRA Modification History:

Definition at line 55 of file sis3300.h.


Member Typedef Documentation

typedef enum CSIS3300::_ClockSource CSIS3300::ClockSource

the enum values match the bit field values

typedef enum CSIS3300::_SampleSize CSIS3300::SampleSize


Member Enumeration Documentation

enum CSIS3300::_ClockSource

Enumerator:
Internal100Mhz 
Internal50Mhz 
Internal25Mhz 
Internal12_5Mhz 
Internal6_25Mhz 
Internal3_125Mhz 
ExternalFp 
ExternalP2 

Definition at line 57 of file sis3300.h.

enum CSIS3300::_SampleSize

Enumerator:
Sample128K 
Sample16K 
Sample4K 
Sample2K 
Sample1K 
Sample512 
Sample256 
Sample128 

Definition at line 67 of file sis3300.h.


Constructor & Destructor Documentation

CSIS3300::CSIS3300 ( unsigned long  nBaseAddress,
unsigned int  nCrate = 0 
)

Constructs an object which provides access to the SIS3300. The initial configuration of the module will be:

Parameters:
nBaseAddress - The VME base address of the module.

Definition at line 154 of file sis3300.cpp.

References Internal100Mhz, m_eClock, m_fThresholdLt, m_nBase, m_nFd, m_nThresholds, m_pAcqReg, m_pAddressReg1, m_pAddressReg2, m_pAddressReg3, m_pAddressReg4, m_pBank1Buffers, m_pCsr, m_pCsrs, m_pEi1, m_pEi2, m_pEi3, m_pEi4, m_pEventConfig, m_pEventDirectory1, m_pEventDirectory2, m_pEventDirectory3, m_pEventDirectory4, m_pModuleId, m_pResetKey, m_pStart, m_pStartDelay, m_pStop, m_pStopDelay, m_pThresholds, Sample128K, and SetSampleSize().

CSIS3300::CSIS3300 ( const CSIS3300 rhs  )  [private]

CSIS3300::~CSIS3300 (  ) 

Destroys the current sis3300. We do the following: 1. munmap 2. Ask the driver to forget the map.

Definition at line 307 of file sis3300.cpp.

References m_nFd, m_pCsrs, m_pEi1, m_pEi2, m_pEi3, m_pEi4, and m_pEventConfig.


Member Function Documentation

CSIS3300& CSIS3300::operator= ( const CSIS3300 rhs  )  [private]

int CSIS3300::operator== ( const CSIS3300 rhs  )  [private]

unsigned long CSIS3300::getBaseAddress (  )  const [inline]

Definition at line 147 of file sis3300.h.

References m_nBase.

Referenced by getGroup1Address(), getGroup2Address(), getGroup3Address(), and getGroup4Address().

unsigned long CSIS3300::getPageSize (  )  const [inline]

Definition at line 150 of file sis3300.h.

References m_nPagesize.

volatile unsigned long* CSIS3300::getAddressRegister1 (  )  [inline]

Definition at line 154 of file sis3300.h.

References m_pAddressReg1.

volatile unsigned long* CSIS3300::getAddressRegister2 (  )  [inline]

Definition at line 157 of file sis3300.h.

References m_pAddressReg2.

volatile unsigned long* CSIS3300::getAddressRegister3 (  )  [inline]

Definition at line 160 of file sis3300.h.

References m_pAddressReg3.

volatile unsigned long* CSIS3300::getAddressRegister4 (  )  [inline]

Definition at line 163 of file sis3300.h.

References m_pAddressReg4.

volatile unsigned long* CSIS3300::getModuleBase (  )  [inline]

This function is deprecated in favor of getStatusRegiseter() and setControlRegister() It exists only for compatibility with old code where the entire module was mapped:

Definition at line 172 of file sis3300.h.

References m_pCsrs.

volatile unsigned long* CSIS3300::getCsr (  )  [inline]

This function is deprecated in favor of getStatusRegiseter() and setControlRegister() It exists only for compatibility with old code where the entire module was mapped:

Definition at line 181 of file sis3300.h.

References m_pCsr.

unsigned long CSIS3300::getStatusRegister (  )  const [inline]

Get value of status register.

Definition at line 185 of file sis3300.h.

References m_pCsrs.

void CSIS3300::setControlRegister ( unsigned long  value  )  [inline]

Set the control register.

Definition at line 189 of file sis3300.h.

References m_pCsrs.

volatile const unsigned long* CSIS3300::getModuleId (  )  const [inline]

This function is deprecated in favor of:

Definition at line 198 of file sis3300.h.

References m_pModuleId.

unsigned int CSIS3300::getModelNumber (  )  const [inline]

Get the model number:.

Definition at line 202 of file sis3300.h.

References m_pModuleId.

unsigned int CSIS3300::getFirmwareMajor (  )  const [inline]

Get the firmware major revlevel:.

Definition at line 206 of file sis3300.h.

References m_pModuleId.

Referenced by haveHiRAFirmware().

unsigned int CSIS3300::getFirmwareMinor (  )  const [inline]

Get the firmware minor rev level:.

Definition at line 210 of file sis3300.h.

References m_pModuleId.

Referenced by haveHiRAFirmware().

volatile const unsigned long* CSIS3300::getAcquisitionRegister (  )  const [inline]

Read access to the Acquisition register.

Definition at line 215 of file sis3300.h.

References m_pAcqReg.

volatile unsigned long* CSIS3300::getResetKeyRegister (  )  [inline]

This function is deprecated in favor of the Reset function

Definition at line 221 of file sis3300.h.

References m_pResetKey.

volatile unsigned long* CSIS3300::getStartKeyRegister (  )  [inline]

Definition at line 224 of file sis3300.h.

References m_pStart.

volatile unsigned long* CSIS3300::getEventConfigRegister (  )  [inline]

Definition at line 227 of file sis3300.h.

References m_pEventConfig.

volatile unsigned long* CSIS3300::getStartDelayRegister (  )  [inline]

Definition at line 230 of file sis3300.h.

References m_pStartDelay.

volatile unsigned long* CSIS3300::getStopDelayRegister (  )  [inline]

Definition at line 233 of file sis3300.h.

References m_pStopDelay.

volatile unsigned long* CSIS3300::getEventDirectory1 (  )  [inline]

Definition at line 236 of file sis3300.h.

References m_pEventDirectory1.

volatile unsigned long* CSIS3300::getEventDirectory2 (  )  [inline]

Definition at line 240 of file sis3300.h.

References m_pEventDirectory2.

volatile unsigned long* CSIS3300::getEventDirectory3 (  )  [inline]

Definition at line 243 of file sis3300.h.

References m_pEventDirectory3.

volatile unsigned long* CSIS3300::getEventDirectory4 (  )  [inline]

Definition at line 246 of file sis3300.h.

References m_pEventDirectory4.

void* CSIS3300::getFd (  )  [inline]

Definition at line 249 of file sis3300.h.

References m_nFd.

volatile unsigned long CSIS3300::getGroup1Address (  )  [inline, private]

Definition at line 255 of file sis3300.h.

References getBaseAddress().

volatile unsigned long CSIS3300::getGroup2Address (  )  [inline, private]

Definition at line 258 of file sis3300.h.

References getBaseAddress().

volatile unsigned long CSIS3300::getGroup3Address (  )  [inline, private]

Definition at line 261 of file sis3300.h.

References getBaseAddress().

volatile unsigned long CSIS3300::getGroup4Address (  )  [inline, private]

Definition at line 264 of file sis3300.h.

References getBaseAddress().

void CSIS3300::Reset (  ) 

Reset the module.

Reset the module by writing a 0 to the reset key register. use this function instead of getting the pointer via getResetKeyRegister()

Definition at line 1179 of file sis3300.cpp.

References m_pResetKey.

void CSIS3300::SetClock ( ClockSource  eClock  ) 

Sets the clock sourc. The clock source is determined by the enumerator: ClockSource It can be a range of internal frequencies or it can be an external clock on the front panel or p2 connector.

Parameters:
eSource - clock source.

Definition at line 327 of file sis3300.cpp.

References m_eClock.

void CSIS3300::SetStartDelay ( bool  Enable = false,
unsigned int  nClocks = 0 
)

Sets the start delay: The start pulse is first delayed by a fixed number of clock pulses before being fed to the fadc logic: This allows the adc to be operated in a pre-trigger mode (trigger comes before actual signal).

Parameters:
Enable [false] - If true the start delay is enabled, by default, or if false, the start delay is disabled.
nClocks [0] - Number of clocks by which to delay the delivery of the start clock.

Definition at line 342 of file sis3300.cpp.

References m_fStartDelayEnabled, and m_nStartDelayClocks.

void CSIS3300::SetStopDelay ( bool  Enable = false,
unsigned int  nClocks = 0 
)

Sets the stop delay. The stop pulse is first delayed by a fixed number of clock pulses before being fed into the fadc logic. This allows the adc to be operated in a post trigger mode (trigger comes after the actual signal). To operate in post trigger mode:

  1. Set trigger on stop
  2. enable wrap
  3. Disable gate mode,
  4. Disable HiRA Random Clock Mode,
  5. Send the trigger into the stop input.
  6. set the stop delay appropriately to sample the segment of the signal you want to see.
  7. programmatically issue the start.

Definition at line 363 of file sis3300.cpp.

References m_fStopDelayEnabled, and m_nStopDelayClocks.

void CSIS3300::GateMode ( bool  Enable = false  ) 

Enables or disables gate mode. In gate mode, the module will start on the falling edge of Start and stop on the rising edge. Note that the pre-post trigger modes are pretty useless in gatemode.

Parameters:
Enable [false] - If true gate mode is enabled.

Definition at line 376 of file sis3300.cpp.

References m_fGateMode.

void CSIS3300::RandomClock ( bool  Enable = false  ) 

Enables or disables random clock mode. In this mode, the sampling is based on an arbitrary and external random clock. (See SIS3300 Manual). Note that pipelining must be taken into account, and the module must be disarmed during a read, and then re-armed after.

Parameters:
Enable [false] - If true random clock mode is enabled.

Definition at line 390 of file sis3300.cpp.

References m_fRandomClock.

void CSIS3300::LemoStartStop ( bool  Enable = false  ) 

Enables or disables the lemo start/stop inputs.

Parameters:
Enable [false] - if true, lemo start /stop inputs are enabled.

Definition at line 399 of file sis3300.cpp.

References m_fLemoStartStop.

void CSIS3300::P2StartStop ( bool  Enable = false  ) 

Enables ore disables the P2 start/stop input.

Definition at line 407 of file sis3300.cpp.

References m_fP2StartStop.

void CSIS3300::HiRA_RCM ( bool  Enable = false  ) 

Enables or disables the special HiRA Random Clock mode. In this mode, individual LEMO inputs act as independent clock inputs for corresponding independent ADC inputs.

Parameters:
Enable [false] - If true HiRA Random Clock is enabled.
Exceptions:
string If the module does not have the hira firmware installed a string exception describing this is thrown:

Definition at line 423 of file sis3300.cpp.

References haveHiRAFirmware(), and m_fHiRA_RCM.

void CSIS3300::TriggerOnStop ( bool  Enable = true  ) 

Sets the trigger mode to trigger on stop.. If enabled, the module triggers when the stop pulse occurs. This is usually only used in a post trigger mode.

Parameters:
Enabel [true] - If true trigger on stop is used otherwise trigger on start.

Definition at line 439 of file sis3300.cpp.

References m_fStopTrigger.

void CSIS3300::SetSampleSize ( SampleSize  ePagesize  ) 

Sets the number of samples in an event. This is reflected by both m_ePagessize and m_nPagesize.

Parameters:
ePagesize - One of the possible values of the enumerator SampleSize indicating the number of samples in an event.

Definition at line 450 of file sis3300.cpp.

References K, m_ePagesize, m_nPagesize, Sample128, Sample128K, Sample16K, Sample1K, Sample256, Sample2K, Sample4K, and Sample512.

Referenced by CSIS3300().

void CSIS3300::EnableWrap ( bool  Enable = true  ) 

Enable the page wrap. In page wrap mode, there is no implied stop when an event page is full. The event just wraps around to the start of the event in the event buffer. This is used in post trigger mode: In that mode, you manually start acquisition and let the samples come in until the delayed stop stops acquisition. At that time the module contains a set of points prior to and after the actual stop time.

Parameters:
Enable [true] - If true enables the wrap, if false, disables.

Definition at line 507 of file sis3300.cpp.

References m_fPageWrap.

unsigned int CSIS3300::GetUserInput (  ) 

Get User Input. Checks the status of the user input port. /return 0 - NIM Low. /return 1 - NIM High.

Definition at line 748 of file sis3300.cpp.

References m_pCsrs, and SRUserInputCondition.

void CSIS3300::SetThresholds ( bool *  pLessthan,
unsigned int *  pValues 
)

Sets the adc trigger thresholds. Each channel has a threshold register. If the digitized value exceeds the threshold in any channel, a trigger output is generated. This allows the ADC's to operate in free run self triggered mode. For each channel the caller must provide a flag, which if true, indicates the trigger fires for signals less than the threshold, or if false, indicates the trigger fires for signals greater than the threshold. For each channel, the caller must provide a threshold value. Note that for bipolar input adc's zero level is 0x800.

Parameters:
pLessThan - Array of 8 flages which if true cause the corresponding channel's threshold to be a "less than" trigger.
pValues - Array of 8 12 bit values which provide the thresholds. the top bites of each value will be discarded.

Definition at line 580 of file sis3300.cpp.

References m_fThresholdLt, and m_nThresholds.

CSIS3300::ClockSource CSIS3300::getCurrentClockSource (  ) 

Returns the current clock source as the enumerated value.

Definition at line 517 of file sis3300.cpp.

References m_eClock.

bool CSIS3300::isStartDelayEnabled (  ) 

Returns:

Definition at line 527 of file sis3300.cpp.

References m_fStartDelayEnabled.

unsigned int CSIS3300::getStartDelayClocks (  ) 

Returns the number of clocks in the start delay.

Note:
If the start delay is disabled, this number is meaningless.

Definition at line 548 of file sis3300.cpp.

References m_nStartDelayClocks.

bool CSIS3300::isStopDelayEnabled (  ) 

Returns

Definition at line 537 of file sis3300.cpp.

References m_fStopDelayEnabled.

unsigned int CSIS3300::getStopDelayClocks (  ) 

Returns the number of clocks in the stop delay.

Note:
If the stop delay is disabled, this number is meaningless.

Definition at line 560 of file sis3300.cpp.

References m_nStopDelayClocks.

unsigned int CSIS3300::getThresholdValue ( unsigned int  channel  )  const [inline]

Definition at line 295 of file sis3300.h.

References m_nThresholds.

bool CSIS3300::isLtThreshold ( unsigned int  channel  )  const [inline]

Definition at line 298 of file sis3300.h.

References m_fThresholdLt.

bool CSIS3300::haveHiRAFirmware (  )  const

Return true if the module has the HiRA firmware installed.

Definition at line 1187 of file sis3300.cpp.

References getFirmwareMajor(), getFirmwareMinor(), and HIRAFWMAJOR.

Referenced by HiRA_RCM().

void CSIS3300::LightOn (  ) 

Light On. Turns the User Led On.

Definition at line 698 of file sis3300.cpp.

References m_pCsrs.

void CSIS3300::LightOff (  ) 

Light Off. Turns the User Led Off.

Definition at line 706 of file sis3300.cpp.

References m_pCsrs.

void CSIS3300::InitDaq (  ) 

Initializes the data module for data acquisition. Until this member is called, none of the modules registeres have been touched. This member examines the member data and programs the module accordingly.

Definition at line 594 of file sis3300.cpp.

References CREnableTriggerOutput, CRLedOff, CRNormalTriggerOutput, CRTriggerOnArmed, CRTriggerOnArmedAndStarted, CRUserOutputOff, DAQClockSetShiftCount, DAQEnableGateMode, DAQEnableHiRARCM, DAQEnableLemoStartStop, DAQEnableP2StartStop, DAQEnableRandomClock, DAQSampleBank1On, DAQStartDelayOn, DAQStopDelayOn, ECFGPageSizeShiftCount, ECFGRandomClock, ECFGWrapMask, m_eClock, m_ePagesize, m_fGateMode, m_fHiRA_RCM, m_fLemoStartStop, m_fP2StartStop, m_fPageWrap, m_fRandomClock, m_fStartDelayEnabled, m_fStopDelayEnabled, m_fStopTrigger, m_fThresholdLt, m_nStartDelayClocks, m_nStopDelayClocks, m_nThresholds, m_pAcqReg, m_pCsr, m_pEventConfig, m_pResetKey, m_pStartDelay, m_pStopDelay, m_pThresholds, THRChannelShift, and THRLt.

void CSIS3300::Arm1 (  ) 

Arms the module for write to sample on Bank 1.

Definition at line 859 of file sis3300.cpp.

References DAQSampleBank1On, and m_pAcqReg.

void CSIS3300::Arm2 (  ) 

Arms the module for write to sample on Bank 2.

Definition at line 869 of file sis3300.cpp.

References DAQSampleBank2On, and m_pAcqReg.

void CSIS3300::DisArm1 (  ) 

Disarms the module for write to sample on Bank 1. In this case, the internal digitization and read is then controlled via the internal clock. This is important in the case of a random external clock or gated mode.

Definition at line 838 of file sis3300.cpp.

References DAQSampleBank1Off, and m_pAcqReg.

void CSIS3300::DisArm2 (  ) 

Disarms the module for write to sample on Bank 2. The utility is similar to that for disarming Bank 1.

Definition at line 849 of file sis3300.cpp.

References DAQSampleBank2Off, and m_pAcqReg.

void CSIS3300::StartSampling (  ) 

Starts sampling. This is used in stop trigger mode. In that case, sampling could be manually started and then stopped due to an external signal (e.g. posttrigger).

Definition at line 759 of file sis3300.cpp.

References m_pStart.

void CSIS3300::StopSampling (  ) 

Stops sampling. This is used in stop trigger mode. In that case, sampling could be manually started and then stopped due to an external signal (e.g. posttrigger).

Definition at line 770 of file sis3300.cpp.

References m_pStop.

void CSIS3300::EnableUserOut (  ) 

User Out Enable. Enables the User Output (Trigger Out Off).

Definition at line 715 of file sis3300.cpp.

References m_pCsrs.

void CSIS3300::DisableUserOut (  ) 

User Out Disable. Disables the User Output (Trigger Out On).

Definition at line 724 of file sis3300.cpp.

References m_pCsrs.

void CSIS3300::StrobeUserOut ( int  time  ) 

User Out Strobe. Strobes the User Output for time microseconds. User Out must be enabled.

Parameters:
time - Length of Strobed pulse in microseconds.

Definition at line 735 of file sis3300.cpp.

References m_pCsrs.

bool CSIS3300::WaitUntilDone ( int  timeout  ) 

Waits until data taking for an event is done. This happens when the system becomes diarmed, as evidenced by the fact that the memory bank1 sample clock is no longer enabled.

Parameters:
timeout - Number of loop passes to take while waiting.
Returns:
bool - True if the wait resulted in a done module.

Definition at line 786 of file sis3300.cpp.

References DAQBusyStatus, DAQSampleBank1Off, DAQSampleBank2Off, m_pAcqReg, and m_pAddressReg1.

unsigned long CSIS3300::EventNumber ( int  bank  ) 

Returns the number digitized addresses (events) in a memory bank.

Definition at line 809 of file sis3300.cpp.

References m_pAddressReg1, m_pAddressReg2, m_pAddressReg3, and m_pAddressReg4.

unsigned int CSIS3300::ReadGroup1 ( void *  pBuffer  ) 

Definition at line 1098 of file sis3300.cpp.

References m_nBase, m_pAddressReg1, m_pEventDirectory1, and ReadAGroup().

Referenced by ReadAllGroups().

unsigned int CSIS3300::ReadGroup2 ( void *  pBuffer  ) 

Definition at line 1120 of file sis3300.cpp.

References m_nBase, m_pAddressReg1, m_pEventDirectory2, and ReadAGroup().

Referenced by ReadAllGroups().

unsigned int CSIS3300::ReadGroup3 ( void *  pBuffer  ) 

Definition at line 1143 of file sis3300.cpp.

References m_nBase, m_pAddressReg1, m_pEventDirectory3, and ReadAGroup().

Referenced by ReadAllGroups().

unsigned int CSIS3300::ReadGroup4 ( void *  pBuffer  ) 

Definition at line 1166 of file sis3300.cpp.

References m_nBase, m_pAddressReg1, m_pEventDirectory4, and ReadAGroup().

Referenced by ReadAllGroups().

unsigned int CSIS3300::ReadAllGroups ( void *  pBuffer  ) 

Definition at line 1057 of file sis3300.cpp.

References ReadGroup1(), ReadGroup2(), ReadGroup3(), and ReadGroup4().

unsigned int CSIS3300::ReadGroup1 ( DAQWordBufferPtr &  pBuffer  ) 

Read the first group of adc's This comprises channel 0, 1

Parameters:
pBuffer - A DAQWordBufferPtr which points to the buffer.
Note:
pBuffer is updated to reflect the data read.
Returns:
The number of words read in.

Definition at line 1089 of file sis3300.cpp.

References m_nBase, m_pAddressReg1, m_pEventDirectory1, and ReadAGroup().

unsigned int CSIS3300::ReadGroup2 ( DAQWordBufferPtr &  pBuffer  ) 

Read the second group of adc's This comprises channel 2,3

Parameters:
pBuffer - A DAQWordBufferPtr which points to the buffer.
Note:
pBuffer is updated to reflect the data read.
Returns:
The number of words read in.

Definition at line 1112 of file sis3300.cpp.

References m_nBase, m_pAddressReg1, m_pEventDirectory2, and ReadAGroup().

unsigned int CSIS3300::ReadGroup3 ( DAQWordBufferPtr &  pBuffer  ) 

Read the third group of adc's This comprises channel 4,5

Parameters:
pBuffer - A DAQWordBufferPtr which points to the buffer.
Note:
pBuffer is updated to reflect the data read.
Returns:
The number of words read in.

Definition at line 1135 of file sis3300.cpp.

References m_nBase, m_pAddressReg1, m_pEventDirectory3, and ReadAGroup().

unsigned int CSIS3300::ReadGroup4 ( DAQWordBufferPtr &  pBuffer  ) 

Read the fourth group of adc's This comprises channel 6,7

Parameters:
pBuffer - A DAQWordBufferPtr which points to the buffer.
Note:
pBuffer is updated to reflect the data read.
Returns:
The number of words read in.

Definition at line 1158 of file sis3300.cpp.

References m_nBase, m_pAddressReg1, m_pEventDirectory4, and ReadAGroup().

unsigned int CSIS3300::ReadAllGroups ( DAQWordBufferPtr &  pBuffer  ) 

Reads all data groups. The groups are read in numerical order. Note that within each group, the adc's are interspersed as they are in the event memory.

Parameters:
pBuffer - a DAQWordBufferPtr passed by reference which describes where the data should be stored.
Note:
pBuffer is updated to reflect the data read in.
Returns:
The number of words read is returned.

Definition at line 1043 of file sis3300.cpp.

References ReadGroup1(), ReadGroup2(), ReadGroup3(), and ReadGroup4().

void CSIS3300::ClearDaq (  ) 

Clears the Module. This case that means re-enabling the Bank 1 sampling bit in the DAQ register.

Definition at line 825 of file sis3300.cpp.

References DAQSampleBank1On, and m_pAcqReg.

unsigned int CSIS3300::ReadAGroup ( DAQWordBufferPtr &  pBuffer,
volatile unsigned long *  pAddressReg,
unsigned long  nBase 
) [protected]

Utility function to read a full event. This breaks into three cases:

  1. m_fPageWrap false. In this case, the event directory entry determines the end of the event as well as the number of samples. Note that we assume that the wrap bit in the event directory allows us to differentiate between 0 samples and 128Ksamples.
    1. m_fPageWrap true, but the event directory wrap bit is false. Again, the number of samples is determined by the address pointer.
    2. m_fPageWrap true and event directory wrap bit is true. In this case, a full m_nPagesize samples have been taken and the address pointer indicates the start of event. The data procede circularly in the first m_nPagesize words of the buffer memory since we don't support multi-event mode yet.

Parameters:
pBuffer - Points to the target buffer.
pAddressReg - Pointer to the address index register.
pBase - Pointer to the start of event memory.
Note:
  • Event memory can only be read as longwords, but the event buffer is a word buffer
  • The event pointer will be updated to reflect the words read in..
Returns the number of words read.

Definition at line 998 of file sis3300.cpp.

References m_nPagesize.

Referenced by ReadGroup1(), ReadGroup2(), ReadGroup3(), and ReadGroup4().

unsigned int CSIS3300::ReadAGroup ( void *  pbuffer,
volatile unsigned long *  pAddressReg,
unsigned long  nBase 
) [protected]

For reading to normal memory buffers.

Utility function to read a full event. This breaks into three cases:

  1. m_fPageWrap false. In this case, the event directory entry determines the end of the event as well as the number of samples. Note that we assume that the wrap bit in the event directory allows us to differentiate between 0 samples and 128Ksamples.
    1. m_fPageWrap true, but the event directory wrap bit is false. Again, the number of samples is determined by the address pointer.
    2. m_fPageWrap true and event directory wrap bit is true. In this case, a full m_nPagesize samples have been taken and the address pointer indicates the start of event. The data procede circularly in the first m_nPagesize words of the buffer memory since we don't support multi-event mode yet.

Parameters:
pBuffer - Points to the target buffer (ordinary memory. the caller must ensure this is at least a page long.
pAddressReg - Pointer to the address index register.
nBase - Pointer to the start of event memory.
Note:
  • Event memory can only be read as longwords, but the event buffer is a word buffer
  • The event pointer will be updated to reflect the words read in..
Returns the number of words read.

Definition at line 904 of file sis3300.cpp.

References EDIREndEventMask(), EDIRWrapFlag(), m_nFd, and m_nPagesize.


Member Data Documentation

unsigned long CSIS3300::m_nBase [private]

Module abs. VME base.

Definition at line 79 of file sis3300.h.

Referenced by CSIS3300(), getBaseAddress(), ReadGroup1(), ReadGroup2(), ReadGroup3(), and ReadGroup4().

volatile unsigned long* CSIS3300::m_pCsrs [private]

CSR bank 0 - 0x3000.

Definition at line 81 of file sis3300.h.

Referenced by CSIS3300(), DisableUserOut(), EnableUserOut(), getModuleBase(), getStatusRegister(), GetUserInput(), LightOff(), LightOn(), setControlRegister(), StrobeUserOut(), and ~CSIS3300().

volatile unsigned long* CSIS3300::m_pEi1 [private]

Event information for bank1.

Definition at line 82 of file sis3300.h.

Referenced by CSIS3300(), and ~CSIS3300().

volatile unsigned long* CSIS3300::m_pEi2 [private]

Event info for bank 2.

Definition at line 83 of file sis3300.h.

Referenced by CSIS3300(), and ~CSIS3300().

volatile unsigned long* CSIS3300::m_pEi3 [private]

Event info for bank 3.

Definition at line 84 of file sis3300.h.

Referenced by CSIS3300(), and ~CSIS3300().

volatile unsigned long* CSIS3300::m_pEi4 [private]

Event info for bank 4.

Definition at line 85 of file sis3300.h.

Referenced by CSIS3300(), and ~CSIS3300().

volatile unsigned long* CSIS3300::m_pModuleId [private]

Module ID register.

Definition at line 87 of file sis3300.h.

Referenced by CSIS3300(), getFirmwareMajor(), getFirmwareMinor(), getModelNumber(), and getModuleId().

volatile unsigned long* CSIS3300::m_pCsr [private]

Control status register.

Definition at line 88 of file sis3300.h.

Referenced by CSIS3300(), getCsr(), and InitDaq().

volatile unsigned long* CSIS3300::m_pAcqReg [private]

Acquisition control register.

Definition at line 89 of file sis3300.h.

Referenced by Arm1(), Arm2(), ClearDaq(), CSIS3300(), DisArm1(), DisArm2(), getAcquisitionRegister(), InitDaq(), and WaitUntilDone().

volatile unsigned long* CSIS3300::m_pResetKey [private]

Module reset key register.

Definition at line 90 of file sis3300.h.

Referenced by CSIS3300(), getResetKeyRegister(), InitDaq(), and Reset().

volatile unsigned long* CSIS3300::m_pStart [private]

Start Key register.

Definition at line 91 of file sis3300.h.

Referenced by CSIS3300(), getStartKeyRegister(), and StartSampling().

volatile unsigned long* CSIS3300::m_pStop [private]

Stop Key register.

Definition at line 92 of file sis3300.h.

Referenced by CSIS3300(), and StopSampling().

volatile unsigned long* CSIS3300::m_pEventConfig [private]

Global Event config register.

Definition at line 93 of file sis3300.h.

Referenced by CSIS3300(), getEventConfigRegister(), InitDaq(), and ~CSIS3300().

volatile unsigned long* CSIS3300::m_pStartDelay [private]

Start delay register.

Definition at line 94 of file sis3300.h.

Referenced by CSIS3300(), getStartDelayRegister(), and InitDaq().

volatile unsigned long* CSIS3300::m_pStopDelay [private]

Stop delay register.

Definition at line 95 of file sis3300.h.

Referenced by CSIS3300(), getStopDelayRegister(), and InitDaq().

volatile unsigned long* CSIS3300::m_pAddressReg1 [private]

Address register 1 (detect eov).

Definition at line 96 of file sis3300.h.

Referenced by CSIS3300(), EventNumber(), getAddressRegister1(), ReadGroup1(), ReadGroup2(), ReadGroup3(), ReadGroup4(), and WaitUntilDone().

volatile unsigned long* CSIS3300::m_pAddressReg2 [private]

Address register 2 (detect eov).

Definition at line 97 of file sis3300.h.

Referenced by CSIS3300(), EventNumber(), and getAddressRegister2().

volatile unsigned long* CSIS3300::m_pAddressReg3 [private]

Address register 3 (detect eov).

Definition at line 98 of file sis3300.h.

Referenced by CSIS3300(), EventNumber(), and getAddressRegister3().

volatile unsigned long* CSIS3300::m_pAddressReg4 [private]

Address register 4 (detect eov).

Definition at line 99 of file sis3300.h.

Referenced by CSIS3300(), EventNumber(), and getAddressRegister4().

volatile unsigned long* CSIS3300::m_pEventDirectory1 [private]

Ptr to the event directory.

Definition at line 100 of file sis3300.h.

Referenced by CSIS3300(), getEventDirectory1(), and ReadGroup1().

volatile unsigned long* CSIS3300::m_pEventDirectory2 [private]

Ptr to the event directory.

Definition at line 101 of file sis3300.h.

Referenced by CSIS3300(), getEventDirectory2(), and ReadGroup2().

volatile unsigned long* CSIS3300::m_pEventDirectory3 [private]

Ptr to the event directory.

Definition at line 102 of file sis3300.h.

Referenced by CSIS3300(), getEventDirectory3(), and ReadGroup3().

volatile unsigned long* CSIS3300::m_pEventDirectory4 [private]

Ptr to the event directory.

Definition at line 103 of file sis3300.h.

Referenced by CSIS3300(), getEventDirectory4(), and ReadGroup4().

volatile unsigned long* CSIS3300::m_pBank1Buffers[4] [private]

Bank data memory.

Definition at line 104 of file sis3300.h.

Referenced by CSIS3300().

volatile unsigned long* CSIS3300::m_pThresholds[4] [private]

threshold registers.

Definition at line 105 of file sis3300.h.

Referenced by CSIS3300(), and InitDaq().

void* CSIS3300::m_nFd [private]

Fd open on the vme device driver.

Definition at line 109 of file sis3300.h.

Referenced by CSIS3300(), getFd(), ReadAGroup(), and ~CSIS3300().

ClockSource CSIS3300::m_eClock [private]

Source of sampling clock.

Definition at line 110 of file sis3300.h.

Referenced by CSIS3300(), getCurrentClockSource(), InitDaq(), and SetClock().

bool CSIS3300::m_fStartDelayEnabled [private]

true if start delay register is used.

Definition at line 111 of file sis3300.h.

Referenced by InitDaq(), isStartDelayEnabled(), and SetStartDelay().

unsigned int CSIS3300::m_nStartDelayClocks [private]

clocks to load into start delay reg.

Definition at line 112 of file sis3300.h.

Referenced by getStartDelayClocks(), InitDaq(), and SetStartDelay().

bool CSIS3300::m_fStopDelayEnabled [private]

true if stop delay register is used.

Definition at line 113 of file sis3300.h.

Referenced by InitDaq(), isStopDelayEnabled(), and SetStopDelay().

unsigned int CSIS3300::m_nStopDelayClocks [private]

clocks to load into stop delay register.

Definition at line 114 of file sis3300.h.

Referenced by getStopDelayClocks(), InitDaq(), and SetStopDelay().

bool CSIS3300::m_fGateMode [private]

Definition at line 116 of file sis3300.h.

Referenced by GateMode(), and InitDaq().

bool CSIS3300::m_fRandomClock [private]

true if module in gate mode.

Definition at line 117 of file sis3300.h.

Referenced by InitDaq(), and RandomClock().

bool CSIS3300::m_fLemoStartStop [private]

True if module is in Random Clock Mode.

Definition at line 118 of file sis3300.h.

Referenced by InitDaq(), and LemoStartStop().

bool CSIS3300::m_fP2StartStop [private]

Definition at line 119 of file sis3300.h.

Referenced by InitDaq(), and P2StartStop().

bool CSIS3300::m_fHiRA_RCM [private]

Definition at line 121 of file sis3300.h.

Referenced by HiRA_RCM(), and InitDaq().

bool CSIS3300::m_fStopTrigger [private]

True if in HiRA Random Clock Mode.

Definition at line 122 of file sis3300.h.

Referenced by InitDaq(), and TriggerOnStop().

SampleSize CSIS3300::m_ePagesize [private]

True if stop is trigger. Size of acquisition page (enum).

Definition at line 123 of file sis3300.h.

Referenced by InitDaq(), and SetSampleSize().

unsigned int CSIS3300::m_nPagesize [private]

Size of acquisition page in samples.

Definition at line 124 of file sis3300.h.

Referenced by getPageSize(), ReadAGroup(), and SetSampleSize().

bool CSIS3300::m_fPageWrap [private]

True if allowing data to wrap the pages.

Definition at line 125 of file sis3300.h.

Referenced by EnableWrap(), and InitDaq().

bool CSIS3300::m_fThresholdLt[8] [private]

True if chann threshold is a < threshold.

Definition at line 126 of file sis3300.h.

Referenced by CSIS3300(), InitDaq(), isLtThreshold(), and SetThresholds().

unsigned int CSIS3300::m_nThresholds[8] [private]

ADC channel threshold values.

Definition at line 127 of file sis3300.h.

Referenced by CSIS3300(), getThresholdValue(), InitDaq(), and SetThresholds().


The documentation for this class was generated from the following files:
Generated on Wed Sep 17 08:38:11 2008 for NSCL Device support. by  doxygen 1.5.1