ICP  1
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
DetectorCard< DetCardPolicy > Class Template Reference

#include <detector_card.h>

Inheritance diagram for DetectorCard< DetCardPolicy >:
Inheritance graph

Public Member Functions

int readHistogramMemory (unsigned long start, isisU32_t *buffer, int len, DAEstatus &status)
 
bool readHistogramMemoryWrapped (unsigned long start, isisU32_t *buffer, uint32_t len, DAEstatus &status)
 return true is memory wrapped during read More...
 
int writeHistogramMemory (unsigned long start, isisU32_t *buffer, int len, DAEstatus &status)
 
isisU32_t sumHistogramMemory (DAEstatus &status)
 
int clearHistogramMemoryStart (DAEstatus &status)
 
bool isClearHistogramMemoryComplete (DAEstatus &status)
 
int readPOSLUTMemory (unsigned long start, isisU32_t *buffer, int len, DAEstatus &status)
 
int writePOSLUTMemory (unsigned long start, isisU32_t *buffer, int len, DAEstatus &status)
 
int clearPOSLUTMemory (DAEstatus &status, unsigned long start=0, int len=65536)
 
int readTCGLUTMemory (unsigned long start, isisU32_t *buffer, int len, DAEstatus &status)
 
int writeTCGLUTMemory (unsigned long start, isisU32_t *buffer, int len, DAEstatus &status)
 
int readDescriptorTimeBinLimitRegister (isisU32_t *value, DAEstatus &status)
 
int writeDescriptorTimeBinLimitRegister (isisU32_t value, DAEstatus &status)
 
int readTCGTimeBinLimitRegister (isisU32_t *value, DAEstatus &status)
 
int writeTCGTimeBinLimitRegister (isisU32_t value, DAEstatus &status)
 
 DetectorCard (int position, ISISVME *vme, int *specmap_array, int specmap_len, DAEstatus &status)
 
virtual int getNTimeChannels (isisU32_t *ntc, DAEstatus &status)
 
virtual int setNTimeChannels (isisU32_t ntc, DAEstatus &status)
 
int getSpectrumSize (isisU32_t *value, DAEstatus &status)
 
int readSpectrum (int spec, isisU32_t *buffer, int nbuffer, DAEstatus &status)
 read DAE2 spectrum More...
 
int readDAE1Spectrum (int dae1_spec, isisU32_t *buffer, int nbuffer, DAEstatus &status)
 
int readDAE1Spectra (isisU32_t *buffer, int nbuffer, const int spec_to_crpt_offset[], int spec_start, int nspec, int period, int persize, DAEstatus &status)
 reads into buffer the spectra on this card that are in the range considered More...
 
virtual int setTimeChannels (isisU32_t *tcb, int ntc, DAEstatus &status)
 
virtual int getTimeChannels (isisU32_t *tcb, int ntc, DAEstatus &status)
 
virtual ~DetectorCard ()
 
virtual int programDAE1POSLUT (int crat[], int modn[], int mpos[], int spec[], int ndet, int nperiods, int dae1persize, DAEstatus &status)
 
int findDAE1Spectrum (int dae1_spectrum, DAEstatus &) const
 
int findDAE2Spectrum (int dae2_spectrum, DAEstatus &) const
 
const int * getDAE2SpecMap ()
 
int readAllDAE1Spectra (isisU32_t *buffer, int nbuffer, const int spec_to_crpt_offset[], int persize, DAEstatus &status)
 
virtual int programPOSLUT (int cards[], int dims[], int pos_start[], int npos[], int spec[], int spec_step[], int nblocks, int nperiods, int dae1persize, DAEstatus &status)
 
int fillAddmap (Addmap *addmap, int len, DAEstatus &status)
 
virtual void printStatus (std::ostream &os, DAEstatus &status)
 
void printSpecmap (std::ostream &os)
 
void printTimeChannels (std::ostream &os, int start=0, int end=-1)
 
void printPOSLUT (std::ostream &os, DAEstatus &status)
 
virtual int readPOSLUT (DAEstatus &status)
 
unsigned long memorySize ()
 
int loadDAE2SpecmapFromArray (int *array, int len, DAEstatus &status)
 
int saveDAE2SpecmapToArray (int *array, int offset, int len, DAEstatus &status)
 
virtual int changePeriod (int period, DAEstatus &status)
 
virtual int changeNumberOfPeriods (int nperiod, DAEstatus &status)
 
virtual int setPeriodType (bool hardware_periods, bool single_daq_period, DAEstatus &status)
 
int enableDIMVetos (isisU16_t dim_mask, DAEstatus &status)
 
int getDIMVetos (isisU16_t *dim_mask, DAEstatus &status)
 dim mask for vetos that are enabled More...
 
int disableDIMVetos (DAEstatus &status)
 
int clearVetoOccurredFlag (DAEstatus &status)
 
int readDIMVetoOccurredFlag (isisU16_t *dim_mask, DAEstatus &status)
 
int getCurrentHardwarePeriod (isisU32_t *period, DAEstatus &status)
 
int getTotalCounts (isisU32_t *counts, DAEstatus &status)
 
int clearTotalCountsRegister (DAEstatus &status)
 
int getFrameSyncDelay (isisU32_t *value, DAEstatus &status)
 
int setFrameSyncDelay (isisU32_t value, DAEstatus &status)
 
int fillWithTestPattern (unsigned long pattern, DAEstatus &status)
 
int checkTestPattern (unsigned long pattern, DAEstatus &status)
 
int whichVeto (std::ostream &os, DAEstatus &status)
 
int setEventCollectionMode (bool enable, DAEstatus &status)
 set up for event or histogram mode More...
 
uint32_t getNewEvents (isisU32_t *buffer, uint32_t maxlen, uint64_t &num_unread, bool &run_ended, DAEstatus &status)
 
uint64_t nNewEventWords (DAEstatus &status)
 determine how many words there are to read that correspond to complete frames of events More...
 
void updateDAEEventLastRead (DAEstatus &status)
 called when all events returned by getNewEvents() have been safely processed More...
 
isisU32_t getLastAddressRead ()
 
void setLastAddressRead (isisU32_t addr)
 
int eventSourceID () const
 
int highspec () const
 
int enableVeto (DetectorCardVeto veto, DAEstatus &status)
 
int disableVeto (DetectorCardVeto veto, DAEstatus &status)
 
bool isVetoEnabled (DetectorCardVeto veto, DAEstatus &status)
 
bool hasVetoOccurred (DetectorCardVeto veto, DAEstatus &status)
 
int printVetoStatus (std::ostream &os, bool triggered_only, DAEstatus &status)
 
virtual int resetCardState (DAEstatus &status)
 
void setCardMode (DetectorCardMode mode)
 
int position () const
 
std::string daeDevice () const
 
- Public Member Functions inherited from DAE2Card< DetCardPolicy >
 DAE2Card (int position, ISISVME *vme, DAEstatus &status)
 
int setRegisterBits (unsigned long address, isisU32_t mask, bool preserve, DAEstatus &status, bool little_endian=false)
 
int clearRegisterBits (unsigned long address, isisU32_t mask, DAEstatus &status, bool little_endian=false)
 
int setAndClearRegisterBits (unsigned long address, isisU32_t mask, bool preserve, DAEstatus &status, bool little_endian=false)
 
int setAndClearRegisterBits (const unused_t &address, isisU32_t mask, bool preserve, DAEstatus &status, bool little_endian=false)
 
int changeRegisterBits (unsigned long address, isisU32_t mask, bool set, bool check, DAEstatus &status, bool little_endian=false)
 
bool registerBitsSet (unsigned long address, isisU32_t mask, DAEstatus &status, bool little_endian=false)
 
bool registerBitsClear (unsigned long address, isisU32_t mask, DAEstatus &status, bool little_endian=false)
 
int readRegister (unsigned long address, isisU32_t *value, DAEstatus &status, bool little_endian=false, bool retry=true)
 
int readRegister (unsigned long address, isisU16_t *value, DAEstatus &status, bool little_endian=false, bool retry=true)
 
int readRegister (const unused_t &address, isisU32_t *value, DAEstatus &status, bool little_endian=false, bool retry=true)
 
int writeRegister (unsigned long address, isisU32_t value, DAEstatus &status, bool little_endian=false)
 
int writeRegister (const unused_t &address, isisU32_t value, DAEstatus &status, bool little_endian=false)
 
int writeRegister16 (unsigned long address, isisU16_t value, DAEstatus &status, bool little_endian=false)
 
int writeRegister16 (const unused_t &address, isisU16_t value, DAEstatus &status, bool little_endian=false)
 
int readRegister16As32 (unsigned long address0, unsigned long address1, isisU32_t *value, DAEstatus &status, bool little_endian=false)
 
int writeRegister32As16 (unsigned long address0, unsigned long address1, isisU32_t value, DAEstatus &status, bool little_endian=false)
 
int position () const
 
std::string daeDevice () const
 
std::string getFirmwareVersionAsString (DAEstatus &status)
 
virtual ~DAE2Card ()
 
void printRegister (const char *name, unsigned long address, std::ostream &os, bool print_bits_set=false)
 
int readMemory (unsigned long address, typename T *buffer, int len, ISISVME::TransferProps props, DAEstatus &status)
 
int readMemoryChunked (unsigned long address, T *buffer, int len, int chunk_len, ISISVME::TransferProps props, DAEstatus &status)
 
int writeMemory (unsigned long address, T *buffer, int len, uint64_t read_check_mask, ISISVME::TransferProps props, DAEstatus &status)
 
int zeroMemory (unsigned long start, int len, uint64_t read_check_mask, ISISVME::TransferProps props, DAEstatus &status)
 
- Public Member Functions inherited from DAE2CardIntf
 DAE2CardIntf ()
 
virtual ~DAE2CardIntf ()
 
- Public Member Functions inherited from DetectorCardIntf
 DetectorCardIntf ()
 
virtual ~DetectorCardIntf ()
 
virtual void setCardMode (DetectorCardMode mode)=0
 

Protected Types

enum  DetectorCardOptions {
  None =0x0, HardwarePeriods =0x1, VetoLogging =0x2, TotalCounts =0x4,
  DelayedFrameSync =0x8, EventMode =0x10, Muon32Channel =0x20
}
 
typedef DetectorCard
< DetCardPolicy > 
MyDetectorCard
 

Protected Member Functions

int printVetoStatus (DetectorCardVeto veto, std::ostream &os, bool triggered_only, DAEstatus &status)
 
uint32_t getVetoMask (DetectorCardVeto veto)
 for use with DAE2DetCardPolicy::DCVETOENABLE and DAE2DetCardPolicy::DCVETOFLAG - see DAEEventHeaderInfo More...
 
const char * getVetoName (DetectorCardVeto veto)
 
int setTCGAccessRegister (isisU32_t mask, DAEstatus &status)
 
int readTCGAccessRegister (isisU32_t *value, DAEstatus &status)
 
int setAndClearTCGAccessRegister (isisU32_t mask, DAEstatus &status)
 
int recreateDAE1Specmap (DAEstatus &status)
 
int setPeriodSize (int per_size, DAEstatus &status)
 
int setPeriodCounter (int period, DAEstatus &status)
 
bool isEventMode (DAEstatus &status)
 
virtual int programDAE1POSLUTDataDae (DAEstatus &status)
 
- Protected Member Functions inherited from DAE2Card< DetCardPolicy >
virtual unsigned long makeAddress (unsigned long address)
 
void reverseEndian (isisU32_t *value)
 
void reverseEndian (isisU16_t *value)
 
std::string loggingPrefix () const
 
- Protected Member Functions inherited from ISIS::Base
 Base (const std::string &logger_name="UNKNOWN")
 
void setLoggerName (const std::string &logger_name)
 
virtual ~Base ()
 
void setThisLoggerLevel (int level)
 

Protected Attributes

unsigned long m_memsize
 histogram memory in bytes More...
 
int m_highspec
 highest DAE2 spectrum used More...
 
std::vector< int > m_dae1specmap
 dae2spec = m_dae1specmap[dae1spec] More...
 
std::vector< int > m_dae2specmap
 dae1spec = m_dae2specmap[dae2spec] More...
 
isisU32_tm_poslut
 temp workspace for POSLUT programming More...
 
int m_nperiods
 number of software/DAQ periods More...
 
int m_dae1persize
 number of dae1 spectra in a period More...
 
int m_dae2persize
 number of spectra in a dae2 period More...
 
int m_hardware_periods
 are we using hardware periods? More...
 
DetectorCardMode m_mode
 
CardOptions m_options
 
CRITICAL_SECTION m_critical
 
DetectorCardRegisters
< DetCardPolicy > 
m_reg
 
isisU16_t m_wrap_counter
 number of times memory wrapped in event mode More...
 
isisU32_t m_last_address_read
 last memory addess read in event mode More...
 
- Protected Attributes inherited from DAE2Card< DetCardPolicy >
int m_position
 
ISISVMEm_vme
 
- Protected Attributes inherited from ISIS::Base
Poco::Logger * m_logger
 
Poco::LogStream * m_logstr
 
Poco::Mutex m_logger_lock
 

Additional Inherited Members

- Public Types inherited from DAE2CardIntf
enum  CardType {
  EmptySlot = 0, UnknownCard = 1, EnvCard = 2, EnvPeriodCard = 3,
  NeutronDetectorCard = 4, MuonDetectorCard = 5, MuonPeriodCard = 6
}
 
- Public Types inherited from DetectorCardIntf
enum  DetectorCardMode { ModeUnknown =0x0, ModeNeutronData =0x1, ModeSEData =0x2 }
 
enum  DetectorCardVeto { FrameOverflowVeto =0x1, MemoryFullVeto =0x2, FIFOLateVeto =0x4 }
 
- Static Public Member Functions inherited from DAE2Card< DetCardPolicy >
static bool isCardPresent (int position, ISISVME *vme, DAEstatus &status)
 
static CardType getCardType (int position, ISISVME *vme, DAEstatus &dstatus)
 
static unsigned long makeAddress (int position, unsigned long address)
 
- Static Public Attributes inherited from DetectorCardIntf
static const int NOSPECTRUM = -1
 
static const int SPECTRUM_PLACEHOLDER = -2
 
- Static Protected Member Functions inherited from DAE2Card< DetCardPolicy >
static int getFirmwareVersion (int position, ISISVME *vme, firmware_version *fw, DAEstatus &status)
 
static const char * yesNoStr (bool b)
 
- Static Protected Member Functions inherited from ISIS::Base
static void setAllLoggerLevel (int level)
 

Detailed Description

template<class DetCardPolicy>
class DetectorCard< DetCardPolicy >

Definition at line 6 of file detector_card.h.

Member Typedef Documentation

template<class DetCardPolicy>
typedef DetectorCard<DetCardPolicy> DetectorCard< DetCardPolicy >::MyDetectorCard
protected

Definition at line 165 of file detector_card.h.

Member Enumeration Documentation

template<class DetCardPolicy>
enum DetectorCard::DetectorCardOptions
protected
Enumerator
None 
HardwarePeriods 
VetoLogging 
TotalCounts 
DelayedFrameSync 
EventMode 
Muon32Channel 

Definition at line 157 of file detector_card.h.

Constructor & Destructor Documentation

template<class DetCardPolicy >
DetectorCard< DetCardPolicy >::DetectorCard ( int  position,
ISISVME vme,
int *  specmap_array,
int  specmap_len,
DAEstatus status 
)
template<class DetCardPolicy >
DetectorCard< DetCardPolicy >::~DetectorCard ( )
virtual

Definition at line 1468 of file detector_card.cpp.

Member Function Documentation

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::changeNumberOfPeriods ( int  nperiod,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::changePeriod ( int  period,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::checkTestPattern ( unsigned long  pattern,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::clearHistogramMemoryStart ( DAEstatus status)
virtual

Implements DetectorCardIntf.

Definition at line 912 of file detector_card.cpp.

References isRegisterUsed().

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::clearPOSLUTMemory ( DAEstatus status,
unsigned long  start = 0,
int  len = 65536 
)
virtual

Implements DetectorCardIntf.

Definition at line 868 of file detector_card.cpp.

References memory_check, and ISISVME::TransferLUTSpace.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::clearTotalCountsRegister ( DAEstatus status)
virtual
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::clearVetoOccurredFlag ( DAEstatus status)
virtual

Implements DetectorCardIntf.

Definition at line 1381 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::VetoLogging.

template<class DetCardPolicy>
std::string DetectorCard< DetCardPolicy >::daeDevice ( ) const
inlinevirtual

Implements DAE2CardIntf.

Definition at line 251 of file detector_card.h.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::disableDIMVetos ( DAEstatus status)
virtual

Implements DetectorCardIntf.

Definition at line 1368 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::VetoLogging.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::disableVeto ( DetectorCardVeto  veto,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1450 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::enableDIMVetos ( isisU16_t  dim_mask,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1355 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::VetoLogging.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::enableVeto ( DetectorCardVeto  veto,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1444 of file detector_card.cpp.

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::eventSourceID ( ) const
inlinevirtual

Implements DetectorCardIntf.

Definition at line 237 of file detector_card.h.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::fillAddmap ( Addmap addmap,
int  len,
DAEstatus status 
)
virtual

this does not work for multiple time regimes as nchan is not thae same for each card it has been superceeded by readAllDAE1Spectra()

Implements DetectorCardIntf.

Definition at line 412 of file detector_card.cpp.

References DAEstatus::addInfoVa(), DAEstatus::addVa(), Addmap::card, Addmap::dae1add, Addmap::dae2add, Addmap::dc, ERRTYPE_INVCARD, FAC_DETCARD, Addmap::len, SEV_ERROR, and Addmap::spec.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::fillWithTestPattern ( unsigned long  pattern,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1620 of file detector_card.cpp.

References MAKE_TEST_PATTERN, and ISISVME::Success.

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::findDAE1Spectrum ( int  dae1_spectrum,
DAEstatus  
) const
inlinevirtual

Implements DetectorCardIntf.

Definition at line 195 of file detector_card.h.

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::findDAE2Spectrum ( int  dae2_spectrum,
DAEstatus  
) const
inlinevirtual

Implements DetectorCardIntf.

Definition at line 196 of file detector_card.h.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::getCurrentHardwarePeriod ( isisU32_t period,
DAEstatus status 
)
virtual
template<class DetCardPolicy>
const int* DetectorCard< DetCardPolicy >::getDAE2SpecMap ( )
inlinevirtual

Implements DetectorCardIntf.

Definition at line 197 of file detector_card.h.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::getDIMVetos ( isisU16_t dim_mask,
DAEstatus status 
)
virtual

dim mask for vetos that are enabled

Implements DetectorCardIntf.

Definition at line 1338 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::VetoLogging.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::getFrameSyncDelay ( isisU32_t value,
DAEstatus status 
)
virtual
template<class DetCardPolicy>
isisU32_t DetectorCard< DetCardPolicy >::getLastAddressRead ( )
inlinevirtual

Implements DetectorCardIntf.

Definition at line 235 of file detector_card.h.

template<class DetCardPolicy >
uint32_t DetectorCard< DetCardPolicy >::getNewEvents ( isisU32_t buffer,
uint32_t  maxlen,
uint64_t &  num_unread,
bool &  run_ended,
DAEstatus status 
)
virtual

reads all pending events into supplied buffer updates the "last_read_address" held by the detector card, but not that held by the dae. The program processing the events must call updateDAEEventLastRead() when the events are safely processed/on disk so the DAE will know it can continue. if the dae_last_read != icp_last_read we know there has been e.g. a program crash

Implements DetectorCardIntf.

Definition at line 1788 of file detector_card.cpp.

References DAEEventList::checkEventHeader(), DAE_EVENT_HEADER_WORDS, DAEEventList::isEndRunHeader(), LOGSTR_DEBUG, LOGSTR_INFORMATION, LOGSTR_NOTICE, and LOGSTR_WARNING.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::getNTimeChannels ( isisU32_t ntc,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Reimplemented in MuonDetectorCard.

Definition at line 190 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::getSpectrumSize ( isisU32_t value,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 183 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::getTimeChannels ( isisU32_t tcb,
int  ntc,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Reimplemented in MuonDetectorCard.

Definition at line 404 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::getTotalCounts ( isisU32_t counts,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
uint32_t DetectorCard< DetCardPolicy >::getVetoMask ( DetectorCardVeto  veto)
protected
template<class DetCardPolicy >
const char * DetectorCard< DetCardPolicy >::getVetoName ( DetectorCardVeto  veto)
protected

Definition at line 1428 of file detector_card.cpp.

template<class DetCardPolicy >
bool DetectorCard< DetCardPolicy >::hasVetoOccurred ( DetectorCardVeto  veto,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1462 of file detector_card.cpp.

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::highspec ( ) const
inlinevirtual

Implements DetectorCardIntf.

Definition at line 238 of file detector_card.h.

template<class DetCardPolicy >
bool DetectorCard< DetCardPolicy >::isClearHistogramMemoryComplete ( DAEstatus status)
virtual
template<class DetCardPolicy >
bool DetectorCard< DetCardPolicy >::isEventMode ( DAEstatus status)
protected

Definition at line 17 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::EventMode.

template<class DetCardPolicy >
bool DetectorCard< DetCardPolicy >::isVetoEnabled ( DetectorCardVeto  veto,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1456 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::loadDAE2SpecmapFromArray ( int *  array,
int  len,
DAEstatus status 
)
virtual
template<class DetCardPolicy>
unsigned long DetectorCard< DetCardPolicy >::memorySize ( )
inlinevirtual

Implements DetectorCardIntf.

Definition at line 208 of file detector_card.h.

template<class DetCardPolicy >
uint64_t DetectorCard< DetCardPolicy >::nNewEventWords ( DAEstatus status)
virtual

determine how many words there are to read that correspond to complete frames of events

Implements DetectorCardIntf.

Definition at line 1889 of file detector_card.cpp.

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::position ( ) const
inlinevirtual

Implements DAE2CardIntf.

Definition at line 250 of file detector_card.h.

template<class DetCardPolicy >
void DetectorCard< DetCardPolicy >::printPOSLUT ( std::ostream &  os,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 139 of file detector_card.cpp.

template<class DetCardPolicy >
void DetectorCard< DetCardPolicy >::printSpecmap ( std::ostream &  os)
virtual

Implements DetectorCardIntf.

Definition at line 117 of file detector_card.cpp.

template<class DetCardPolicy >
void DetectorCard< DetCardPolicy >::printStatus ( std::ostream &  os,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
void DetectorCard< DetCardPolicy >::printTimeChannels ( std::ostream &  os,
int  start = 0,
int  end = -1 
)
virtual

Implements DetectorCardIntf.

Definition at line 155 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::DelayedFrameSync.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::printVetoStatus ( std::ostream &  os,
bool  triggered_only,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 82 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::printVetoStatus ( DetectorCardVeto  veto,
std::ostream &  os,
bool  triggered_only,
DAEstatus status 
)
protected

Definition at line 105 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::programDAE1POSLUT ( int  crat[],
int  modn[],
int  mpos[],
int  spec[],
int  ndet,
int  nperiods,
int  dae1persize,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::programDAE1POSLUTDataDae ( DAEstatus status)
protectedvirtual

Definition at line 1959 of file detector_card.cpp.

References DAEstatus::addInfoVa(), and FAC_DETCARD.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::programPOSLUT ( int  cards[],
int  dims[],
int  pos_start[],
int  npos[],
int  spec[],
int  spec_step[],
int  nblocks,
int  nperiods,
int  dae1persize,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Reimplemented in MuonDetectorCard.

Definition at line 521 of file detector_card.cpp.

References DAEstatus::addInfo(), DAEstatus::addVa(), ERRTYPE_INVCARD, FAC_DETCARD, and SEV_ERROR.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readAllDAE1Spectra ( isisU32_t buffer,
int  nbuffer,
const int  spec_to_crpt_offset[],
int  persize,
DAEstatus status 
)
virtual

this will read all DAE1 spectra EXCEPT for spectrum 0, which is left out for complications caused by multiple time regimes if in event mode, does nothing

Implements DetectorCardIntf.

Definition at line 293 of file detector_card.cpp.

References DAEstatus::add(), ERRTYPE_INVCARD, FAC_DETCARD, findConsecutive(), SEV_ERROR, and ISISVME::Success.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readDAE1Spectra ( isisU32_t buffer,
int  nbuffer,
const int  spec_to_crpt_offset[],
int  spec_start,
int  nspec,
int  period,
int  persize,
DAEstatus status 
)
virtual

reads into buffer the spectra on this card that are in the range considered

Implements DetectorCardIntf.

Definition at line 232 of file detector_card.cpp.

References DAEstatus::add(), ERRTYPE_INVCARD, FAC_DETCARD, findConsecutive(), SEV_ERROR, and ISISVME::Success.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readDAE1Spectrum ( int  dae1_spec,
isisU32_t buffer,
int  nbuffer,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 204 of file detector_card.cpp.

References DAEstatus::addInfoVa(), and FAC_DETCARD.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readDescriptorTimeBinLimitRegister ( isisU32_t value,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 964 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::DelayedFrameSync.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readDIMVetoOccurredFlag ( isisU16_t dim_mask,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1395 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::VetoLogging.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readHistogramMemory ( unsigned long  start,
isisU32_t buffer,
int  len,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
bool DetectorCard< DetCardPolicy >::readHistogramMemoryWrapped ( unsigned long  start,
isisU32_t buffer,
uint32_t  len,
DAEstatus status 
)
virtual

return true is memory wrapped during read

Implements DetectorCardIntf.

Definition at line 1864 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readPOSLUT ( DAEstatus status)
virtual

Implements DetectorCardIntf.

Reimplemented in MuonDetectorCard.

Definition at line 455 of file detector_card.cpp.

References DAEstatus::addInfo(), and FAC_DETCARD.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readPOSLUTMemory ( unsigned long  start,
isisU32_t buffer,
int  len,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 846 of file detector_card.cpp.

References ISISVME::TransferLUTSpace.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readSpectrum ( int  spec,
isisU32_t buffer,
int  nbuffer,
DAEstatus status 
)
virtual

read DAE2 spectrum

Implements DetectorCardIntf.

Definition at line 379 of file detector_card.cpp.

References DAEstatus::addInfoVa(), and FAC_DETCARD.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readTCGAccessRegister ( isisU32_t value,
DAEstatus status 
)
protected

Definition at line 905 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readTCGLUTMemory ( unsigned long  start,
isisU32_t buffer,
int  len,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 876 of file detector_card.cpp.

References ISISVME::TransferLUTSpace.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::readTCGTimeBinLimitRegister ( isisU32_t value,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 996 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::recreateDAE1Specmap ( DAEstatus status)
protected
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::resetCardState ( DAEstatus status)
virtual

This emulates Kelvin Gascoyne's ClearDC.bat to reset the state of a detector card

Register write:

MANTALK 0 card(hex) address(hex) data(hex) <count(hex) <step(hex)>>

*  mantalk 0 %1 40000 C0000000
*  mantalk 0 %1 80000 0 20000
*  mantalk 0 %1 0 0 E
*  mantalk 0 %1 40010 0
*  mantalk 0 %1 40080 0 2
* 

Implements DetectorCardIntf.

Reimplemented in MuonDetectorCard.

Definition at line 1924 of file detector_card.cpp.

References LOGSTR_INFORMATION, ISISVME::Success, ISISVME::TransferIORegisterSpace, and ISISVME::TransferLUTSpace.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::saveDAE2SpecmapToArray ( int *  array,
int  offset,
int  len,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1161 of file detector_card.cpp.

References DAEstatus::add(), ERRTYPE_INVCARD, FAC_DETCARD, and SEV_ERROR.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setAndClearTCGAccessRegister ( isisU32_t  mask,
DAEstatus status 
)
protected

Definition at line 899 of file detector_card.cpp.

template<class DetCardPolicy >
void DetectorCard< DetCardPolicy >::setCardMode ( DetectorCardMode  mode)

Definition at line 1944 of file detector_card.cpp.

References LOGSTR_ERROR.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setEventCollectionMode ( bool  enable,
DAEstatus status 
)
virtual

set up for event or histogram mode

Implements DetectorCardIntf.

Definition at line 1733 of file detector_card.cpp.

References ISISVME::Error, DetectorCard< DetCardPolicy >::EventMode, LOGSTR_DEBUG, and ISISVME::Success.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setFrameSyncDelay ( isisU32_t  value,
DAEstatus status 
)
virtual
template<class DetCardPolicy>
void DetectorCard< DetCardPolicy >::setLastAddressRead ( isisU32_t  addr)
inlinevirtual

Implements DetectorCardIntf.

Definition at line 236 of file detector_card.h.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setNTimeChannels ( isisU32_t  ntc,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 197 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setPeriodCounter ( int  period,
DAEstatus status 
)
protected
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setPeriodSize ( int  per_size,
DAEstatus status 
)
protected
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setPeriodType ( bool  hardware_periods,
bool  single_daq_period,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setTCGAccessRegister ( isisU32_t  mask,
DAEstatus status 
)
protected

Definition at line 893 of file detector_card.cpp.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::setTimeChannels ( isisU32_t tcb,
int  ntc,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Reimplemented in MuonDetectorCard.

Definition at line 397 of file detector_card.cpp.

template<class DetCardPolicy >
isisU32_t DetectorCard< DetCardPolicy >::sumHistogramMemory ( DAEstatus status)
virtual
template<class DetCardPolicy >
void DetectorCard< DetCardPolicy >::updateDAEEventLastRead ( DAEstatus status)
virtual

called when all events returned by getNewEvents() have been safely processed

Implements DetectorCardIntf.

Definition at line 1765 of file detector_card.cpp.

References LOGSTR_DEBUG, and LOGSTR_WARNING.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::whichVeto ( std::ostream &  os,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::writeDescriptorTimeBinLimitRegister ( isisU32_t  value,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 981 of file detector_card.cpp.

References DetectorCard< DetCardPolicy >::DelayedFrameSync.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::writeHistogramMemory ( unsigned long  start,
isisU32_t buffer,
int  len,
DAEstatus status 
)
virtual
template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::writePOSLUTMemory ( unsigned long  start,
isisU32_t buffer,
int  len,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 860 of file detector_card.cpp.

References memory_check, and ISISVME::TransferLUTSpace.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::writeTCGLUTMemory ( unsigned long  start,
isisU32_t buffer,
int  len,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 885 of file detector_card.cpp.

References memory_check, and ISISVME::TransferLUTSpace.

template<class DetCardPolicy >
int DetectorCard< DetCardPolicy >::writeTCGTimeBinLimitRegister ( isisU32_t  value,
DAEstatus status 
)
virtual

Implements DetectorCardIntf.

Definition at line 1005 of file detector_card.cpp.

Member Data Documentation

template<class DetCardPolicy>
CRITICAL_SECTION DetectorCard< DetCardPolicy >::m_critical
protected

Definition at line 161 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::m_dae1persize
protected

number of dae1 spectra in a period

Definition at line 154 of file detector_card.h.

template<class DetCardPolicy>
std::vector<int> DetectorCard< DetCardPolicy >::m_dae1specmap
protected

dae2spec = m_dae1specmap[dae1spec]

Definition at line 148 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::m_dae2persize
protected

number of spectra in a dae2 period

Definition at line 155 of file detector_card.h.

template<class DetCardPolicy>
std::vector<int> DetectorCard< DetCardPolicy >::m_dae2specmap
protected

dae1spec = m_dae2specmap[dae2spec]

Definition at line 149 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::m_hardware_periods
protected

are we using hardware periods?

Definition at line 156 of file detector_card.h.

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::m_highspec
protected

highest DAE2 spectrum used

Definition at line 147 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy>
isisU32_t DetectorCard< DetCardPolicy >::m_last_address_read
protected

last memory addess read in event mode

Definition at line 164 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy>
unsigned long DetectorCard< DetCardPolicy >::m_memsize
protected

histogram memory in bytes

Definition at line 146 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy>
DetectorCardMode DetectorCard< DetCardPolicy >::m_mode
protected

Definition at line 159 of file detector_card.h.

template<class DetCardPolicy>
int DetectorCard< DetCardPolicy >::m_nperiods
protected

number of software/DAQ periods

Definition at line 153 of file detector_card.h.

template<class DetCardPolicy>
CardOptions DetectorCard< DetCardPolicy >::m_options
protected

Definition at line 160 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy>
isisU32_t* DetectorCard< DetCardPolicy >::m_poslut
protected

temp workspace for POSLUT programming

Definition at line 152 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().

template<class DetCardPolicy>
DetectorCardRegisters<DetCardPolicy> DetectorCard< DetCardPolicy >::m_reg
protected

Definition at line 162 of file detector_card.h.

template<class DetCardPolicy>
isisU16_t DetectorCard< DetCardPolicy >::m_wrap_counter
protected

number of times memory wrapped in event mode

Definition at line 163 of file detector_card.h.

Referenced by DetectorCard< DetCardPolicy >::DetectorCard().


The documentation for this class was generated from the following files: