ICP  1
Classes | Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | List of all members
ISISCRPT_STRUCT Struct Reference

#include <isiscrpt.h>

Classes

struct  Monitoring
 

Public Member Functions

void markInitialised ()
 
void markUninitialised ()
 
bool isInitialised ()
 
 ISISCRPT_STRUCT (ISISDAE::DAEType dae_type_, const std::string &comp_name)
 
bool isRunning () const
 
const char * runStatusName () const
 
int setDAESpecificParameters ()
 
int getCharItem (const char *item_name, std::string &cvalue, DAEstatus &status) const
 
int getIntItem (const char *item_name, long &lVal, DAEstatus &status) const
 
int getRealItem (const char *item_name, double &dblVal, DAEstatus &status) const
 
int getIntArrayItemSize (const char *item_name, int *dims_array, int &ndims, DAEstatus &status) const
 
int getIntArrayItemSize (const char *item_name, const long *spec_array, int nspec, int *dims_array, int &ndims, DAEstatus &status) const
 
int getIntArrayItem (const isisU32_t *raw_data, int raw_data_size, const char *item_name, long *larray, DAEstatus &status) const
 
int getRealArrayItemSize (const char *item_name, int *dims_array, int &ndims, DAEstatus &status) const
 
int getRealArrayItem (const isisU32_t *raw_data, int raw_data_size, const char *item_name, double *darray, DAEstatus &status) const
 
int getRealArrayItem (const isisU32_t *raw_data, int raw_data_size, const char *item_name, float *farray, DAEstatus &status) const
 
int getCharItem (const char *item_name, long spec, std::string &cvalue, DAEstatus &status) const
 
int getIntItem (const char *item_name, const long *spec_array, int nspec, long *lVal, DAEstatus &status) const
 
int getRealItem (const char *item_name, const long *spec_array, int nspec, double *dblVal, DAEstatus &status) const
 
int getIntArrayItem (const isisU32_t *raw_data, int raw_data_size, const char *item_name, const long *spec_array, int nspec, long *larray, DAEstatus &status) const
 
int getRealArrayItem (const isisU32_t *raw_data, int raw_data_size, const char *item_name, const long *spec_array, int nspec, double *darray, DAEstatus &status) const
 
int getRealArrayItem (const isisU32_t *raw_data, int raw_data_size, const char *item_name, const long *spec_array, int nspec, float *farray, DAEstatus &status) const
 
bool checkCRPT () const
 
int crptTR (int tr) const
 
int fileTR (int tr) const
 file_tr same as crpt_tr for now More...
 
int fullTR (int index) const
 
bool isEventTR (int tr) const
 
bool isEventSpectrum (int spec) const
 
int daeTR (int tr) const
 
int spectrumCRPTTR (int spec) const
 
int spectrumDAETR (int spec) const
 
int spectrumNTC (int spec) const
 
int getNumSpectra (bool include_spectrum_zero=false) const
 
int getNumSpectra (int tr, bool include_spectrum_zero=false) const
 
int getHighestSpectrumNumber () const
 
uint32_t spectrumCRPTOffsetImpl (int spec, int daq_period) const
 
uint32_t spectrumCRPTOffsetImpl (int spec, int daq_period, int raw_data_size) const
 
uint32_t trCRPTOffset (int tr, int daq_period, int raw_data_size) const
 
int getPeriodSize () const
 
int monitorNumberToSpectrum (int monitor_number) const
 monitor numbers start at 1, indexes in mdet also start at 1 for historical (i.e fortran and old raw file format) reasons More...
 
int spectrumToMonitorNumber (int spec) const
 return monitor number, or 0 if not monitor More...
 
bool saveMonitorEvents (int monitor_number) const
 
bool isMonitorSpectrum (int spec) const
 
void calculateCRPTOffsets ()
 
int dae1SpecForCard (int pos, int dae2_spec) const
 if spectrum is out of range, returns -1 More...
 
int dae1SpecForCardIndex (int index, int dae2_spec) const
 
int daeTRForCard (int pos) const
 
int cardIndexFromPos (int pos) const
 
int spectrumCardPos (int spec) const
 
int spectrumGroup (int spec) const
 
int udetFromSpec (int spec) const
 
int buildTimeRegimeMap ()
 
int simpleChannelRebin (int from_chan, int from_tr, int to_tr) const
 
int randomisedChannelRebin (int from_chan, int from_tr, int to_tr) const
 
int channelLookup (int from_chan, int from_tr, int to_tr, float tof_val) const
 
void setInstName (const std::string &comp_name)
 
bool usingEventMode () const
 
void eventModeCards (int &ndetcard_event, int &ndetcard_used) const
 
double eventModeCardFraction () const
 

Public Attributes

char rcsid [ISISCRPT_MAX_RCSID+1]
 
int version
 
char icp_version [ICP_NAME_LEN]
 
int initialised
 
unsigned long crpt_size
 
time_t icp_start_time
 
time_t crpt_load_time
 time ICP started More...
 
time_t crpt_unload_time
 time CRPT loaded More...
 
int dae_type
 time CRPT unloaded (may not be set if program crashed) More...
 
int run_status
 
int se_status
 
int software_period
 
int period_type
 
int period_source
 
char period_file [ICP_NAME_LEN]
 
time_t start_time
 
time_t resume_time
 
time_t stop_time
 
time_t duration
 
boost::array< PERIOD,
ISISCRPT_MAX_PERIOD
period
 
int nperseq
 
int nperseq_request
 
int clock_frequency
 
int electronics_delay
 
int time_scaler
 
float tcb_minwidth
 
float tcb_mintime
 
float tcb_maxtime
 
int tcb_maxdelay
 
int tcb_delay
 
boost::array< int,
ISISCRPT_MAX_NTRG
tcb_trdelay
 
FrameSync tcb_sync
 
int tcb_pulse_generator
 
RUNTABLE detector_table
 
RUNTABLE wiring_table
 
RUNTABLE spectra_table
 
RUNTABLE data_dae_table
 
int tables_valid
 
unsigned good_frames
 
unsigned total_frames
 
float good_uamph
 
float total_uamph
 
isisU32_t good_ppp_low
 
isisU32_t good_ppp_high
 
isisU32_t total_ppp_low
 
isisU32_t total_ppp_high
 
int auto_save_type
 
int auto_save_value
 
int auto_save_last
 
int auto_save_count
 
int run_number
 
int rb_number
 
int ndet
 
int nmon
 
int nuse
 
boost::array< int,
ISISCRPT_MAX_MONITOR
mdet
 
boost::array< int,
ISISCRPT_MAX_MONITOR
monp
 
boost::array< int,
ISISCRPT_MAX_MONITOR
save_monitor_events
 whether to save monitor events in event mode (size NMON) More...
 
int monitor_spectrum
 
float monitor_range [ISISCRPT_MAX_MONITOR][2]
 
boost::array< unsigned,
ISISCRPT_MAX_MONITOR
monitor_sum
 
int spec [ISISCRPT_MAX_DETECTOR]
 
float delt [ISISCRPT_MAX_DETECTOR]
 
float len2 [ISISCRPT_MAX_DETECTOR]
 
int code [ISISCRPT_MAX_DETECTOR]
 
float tthe [ISISCRPT_MAX_DETECTOR]
 
float ut [ISISCRPT_MAX_USER *ISISCRPT_MAX_DETECTOR]
 
int crat [ISISCRPT_MAX_DETECTOR]
 
int modn [ISISCRPT_MAX_DETECTOR]
 
int mpos [ISISCRPT_MAX_DETECTOR]
 
boost::array< int,
ISISCRPT_MAX_DETECTOR
det_mode
 
int timr_dae [ISISCRPT_MAX_DETECTOR]
 
int timr_crpt [ISISCRPT_MAX_DETECTOR]
 
int timr_file [ISISCRPT_MAX_DETECTOR]
 
int udet [ISISCRPT_MAX_DETECTOR]
 
boost::array< int,
ISISCRPT_MAX_DETECTOR
spec_to_index
 maps spectrum number to index into spec,udet,timr etc arrays in crpt More...
 
boost::array< int,
ISISCRPT_MAX_DETECTOR
spec_to_crpt_offset
 maps spectrum number to offset in raw data of crpt More...
 
boost::array< int,
ISISCRPT_MAX_DETECTOR
det_group
 0 = monitor, else logical det number More...
 
int det_group_max
 
int ndetcard
 
boost::array< int,
ISISCRPT_MAX_DC
dae2cardtr
 detector card DAE time regime (-1 if card not used), length ndetcard - individual spectra on card may have different CRPT TR More...
 
boost::array< int,
ISISCRPT_MAX_DC
dae2cardmode
 -1 unused, 0 histogram, 1 event. length ndetcard More...
 
boost::array< int,
ISISCRPT_MAX_DC
dae2cardpos
 detector card positions, length ndetcard More...
 
boost::array< int,
ISISCRPT_MAX_NUM_DAE *100 > 
cardpos2index
 reverse of dae2cardpos above - turns position into array index. 100 here is DAE2CardPolicy::CRATE_MOD sparse as positions not contiguous. contains -1 on invalid positions More...
 
boost::array< int,
ISISCRPT_MAX_DC
dae2highspec
 length ndetcard More...
 
int dae2specmap [ISISCRPT_MAX_DC][ISISCRPT_MAX_DC_DETECTOR]
 give spectrum number from dae2 card and dae2 spec number More...
 
int ntrg
 
int nper
 
int nper_daq
 
boost::array< int,
ISISCRPT_MAX_NTRG
nsp
 number of spectra per CRPT time regime More...
 
boost::array< int,
ISISCRPT_MAX_NTRG
spec_min
 range of spectrum numbers in CRPT time regime More...
 
boost::array< int,
ISISCRPT_MAX_NTRG
spec_max
 range of spectrum numbers in CRPT time regime More...
 
TCBRANGE tcr [ISISCRPT_MAX_NTRG][ISISCRPT_MAX_TCR]
 
boost::array< int,
ISISCRPT_MAX_NTRG
ntcr
 
int tcb [ISISCRPT_MAX_NTRG][ISISCRPT_MAX_TIMECHANB]
 
float rtcb [ISISCRPT_MAX_NTRG][ISISCRPT_MAX_TIMECHANB]
 
int tcb_map [ISISCRPT_MAX_NTRG][ISISCRPT_MAX_NTRG][ISISCRPT_MAX_TIMECHANB]
 
boost::array< int,
ISISCRPT_MAX_NTRG
ntc
 number of time channels per CRPT time regime More...
 
int persize
 size of a period in 32bit words More...
 
char long_title [ISISCRPT_TITLE_LEN+1]
 
char inst_name [ISISCRPT_INST_LEN+1]
 
char inst_abrv [ISISCRPT_INST_ABRV_LEN+1]
 
char user_name [ISISCRPT_USER_NAME_LEN+1]
 
char institute [ISISCRPT_INSTITUTE_NAME_LEN+1]
 
char user_email [128]
 
char user_telephone [128]
 
char user_id [128]
 
char local_contact [ISISCRPT_USER_NAME_LEN+1]
 
float i_l1
 
boost::array< VETO,
ISISCRPT_NUM_VETOS
vetos
 
int sav_file_count
 
struct timeb update_time
 
int update_poll_time
 
isisU32_t update_good_ppp_low
 
isisU32_t update_good_ppp_high
 
isisU32_t update_total_ppp_low
 
isisU32_t update_total_ppp_high
 
float update_raw_uamph
 
float update_good_uamph
 
int update_num_polls
 
float beam_current
 
int64_t update_total_counts
 
long update_good_frames
 
long update_raw_frames
 
long update_period
 
long update_period_sequence
 
isisU32_t update_good_frames_period
 
isisU32_t update_raw_frames_period
 
long update_duration
 
long update_duration_period
 
float count_rate
 
md5checksum_t dae_xml_checksum
 
md5checksum_t tcb_xml_checksum
 
boost::array< int,
ISISCRPT_NUM_FC_VETO
fermi_chopper_delay
 in 20ns More...
 
boost::array< int,
ISISCRPT_NUM_FC_VETO
fermi_chopper_width
 in 20ns More...
 
char sample_orientation [256]
 
char sample_name [256]
 
char field_label [256]
 
char temperature_label [256]
 
char comment [512]
 
char instrument_geometry [5]
 
int muon_cerenkov_pulse
 
int period_output_delay
 
float beam_centre_x
 
float beam_centre_y
 
float aperture1
 
float aperture2
 
float sample_width
 
float sample_height
 
float sample_thickness
 
float foe_mirror_angle
 
char beamstop_position [16]
 
float chopper_opening_angle
 
char sample_geometry [80]
 
char sample_type [80]
 
float sdd
 
float angle_of_incidence
 
float sample_phi_angle
 
float update_npratio_current
 
float update_npratio_average
 
long log_nlines
 
char log_data [ISISCRPT_LOG_MAXLINES][ISISCRPT_LOG_LINELEN]
 
char lvxml_dae [ISISCRPT_MAX_LVXML_SIZE]
 
char lvxml_tcb [ISISCRPT_MAX_LVXML_SIZE]
 
char lvxml_update [ISISCRPT_MAX_LVXML_SIZE]
 
char lvxml_periods [ISISCRPT_MAX_LVXML_SIZE]
 
char lvxml_monitoring [ISISCRPT_MAX_LVXML_SIZE]
 
char measurement_id [ICP_NAME_LEN]
 
char measurement_subid [ICP_NAME_LEN]
 
char measurement_type [ICP_NAME_LEN]
 
char sample_id [ICP_NAME_LEN]
 
char script_name [ICP_NAME_LEN]
 
char journal_blocks [ISISCRPT_MAX_LVXML_SIZE]
 
char isis_cycle [ISISCRPT_MAX_LVXML_SIZE]
 
char instrument_xml_file [ISISCRPT_MAX_FNAMELEN]
 
char instrument_parameter_map_file [ISISCRPT_MAX_FNAMELEN]
 
Monitoring monitoring
 
data_dae_t data_dae [ISISCRPT_MAX_DATADAE]
 
int n_data_dae
 
char comp_name [MAX_COMPUTERNAME_LENGTH+1]
 
char alert_email [1024]
 
float uamp_scale
 
int compression_level
 
int compression_block_size
 
struct {
   LONGLONG   perf_counter
 
   LONGLONG   proc_freq
 
   FILETIME   filetime
 
icp_clock
 
beamlogger_t beamlogger
 
nagios_t nagios
 
char epics_lastread_iso [64]
 
unsigned epics_lastread_nano
 
unsigned magic
 

Private Member Functions

template<typename T >
int getRealArrayItemHelper (const isisU32_t *raw_data, int raw_data_size, const char *item_name, T *darray, DAEstatus &status) const
 
template<typename T >
int getRealArrayItemHelper (const isisU32_t *raw_data, int raw_data_size, const char *item_name, const long *spec_array, int nspec, T *darray, DAEstatus &status) const
 
 ISISCRPT_STRUCT ()
 
int makeEventTRValue (int dae_tr, int crpt_tr, int file_tr) const
 file_tr ignored for now More...
 

Static Private Member Functions

static void splitItemName (const std::string &sitem_name, SplitItem &split_item)
 

Detailed Description

Definition at line 236 of file isiscrpt.h.

Constructor & Destructor Documentation

ISISCRPT_STRUCT::ISISCRPT_STRUCT ( ISISDAE::DAEType  dae_type_,
const std::string &  comp_name 
)
ISISCRPT_STRUCT::ISISCRPT_STRUCT ( )
inlineprivate

Definition at line 571 of file isiscrpt.h.

Referenced by checkCRPT(), and ISISCRPT_STRUCT().

Member Function Documentation

int ISISCRPT_STRUCT::buildTimeRegimeMap ( )

Definition at line 968 of file isiscrpt.cpp.

References ntc, ntrg, simpleChannelRebin(), and tcb_map.

Referenced by ISISinstrumentControl::tcbcalc().

void ISISCRPT_STRUCT::calculateCRPTOffsets ( )
inline

these offsets depend on tcbs so need to be recalculated when they change also calculates period size (persize) for use by getPeriodSize() and elsewhere

Definition at line 665 of file isiscrpt.h.

References getHighestSpectrumNumber(), nsp, ntc, ntrg, persize, spec_to_crpt_offset, and spectrumNTC().

Referenced by ISISinstrumentControl::readSpectraTable(), and ISISinstrumentControl::tcbcalc().

int ISISCRPT_STRUCT::cardIndexFromPos ( int  pos) const
inline
int ISISCRPT_STRUCT::channelLookup ( int  from_chan,
int  from_tr,
int  to_tr,
float  tof_val 
) const

lookup tof_val in to_tr and return channel tof_val is in from_chan and this information is used to provide a fast lookup

Definition at line 985 of file isiscrpt.cpp.

References ntc, rtcb, and tcb_map.

Referenced by randomisedChannelRebin().

bool ISISCRPT_STRUCT::checkCRPT ( ) const
inline

Definition at line 528 of file isiscrpt.h.

References crpt_size, ISISCRPT_STRUCT(), and magic.

Referenced by CRPTProxy::loadOrCreateCRPT().

int ISISCRPT_STRUCT::crptTR ( int  tr) const
inline

Definition at line 756 of file isiscrpt.h.

References TR_EVENT_MOD.

Referenced by fileTR(), ISISinstrumentControl::readWiringTable(), and trCRPTOffset().

int ISISCRPT_STRUCT::dae1SpecForCard ( int  pos,
int  dae2_spec 
) const
inline

if spectrum is out of range, returns -1

Definition at line 684 of file isiscrpt.h.

References cardpos2index, and dae1SpecForCardIndex().

Referenced by NeXusEventCallback::getSpectrum().

int ISISCRPT_STRUCT::dae1SpecForCardIndex ( int  index,
int  dae2_spec 
) const
inline
int ISISCRPT_STRUCT::daeTR ( int  tr) const
inline
int ISISCRPT_STRUCT::daeTRForCard ( int  pos) const
inline

Definition at line 710 of file isiscrpt.h.

References cardpos2index, and dae2cardtr.

double ISISCRPT_STRUCT::eventModeCardFraction ( ) const
inline
void ISISCRPT_STRUCT::eventModeCards ( int &  ndetcard_event,
int &  ndetcard_used 
) const
inline

Definition at line 826 of file isiscrpt.h.

References dae2cardmode, and ndetcard.

Referenced by eventModeCardFraction().

int ISISCRPT_STRUCT::fileTR ( int  tr) const
inline

file_tr same as crpt_tr for now

Definition at line 762 of file isiscrpt.h.

References crptTR().

Referenced by ISISinstrumentControl::readWiringTable().

int ISISCRPT_STRUCT::fullTR ( int  index) const
inline

Definition at line 778 of file isiscrpt.h.

References det_mode, makeEventTRValue(), timr_crpt, timr_dae, and timr_file.

Referenced by ISISinstrumentControl::setupDAE().

int ISISCRPT_STRUCT::getCharItem ( const char *  item_name,
std::string &  cvalue,
DAEstatus status 
) const
int ISISCRPT_STRUCT::getCharItem ( const char *  item_name,
long  spec,
std::string &  cvalue,
DAEstatus status 
) const
int ISISCRPT_STRUCT::getHighestSpectrumNumber ( ) const
int ISISCRPT_STRUCT::getIntArrayItem ( const isisU32_t raw_data,
int  raw_data_size,
const char *  item_name,
long *  larray,
DAEstatus status 
) const

Definition at line 755 of file isiscrpt.cpp.

Referenced by CRPTProxy::getIntArrayItem().

int ISISCRPT_STRUCT::getIntArrayItem ( const isisU32_t raw_data,
int  raw_data_size,
const char *  item_name,
const long *  spec_array,
int  nspec,
long *  larray,
DAEstatus status 
) const
int ISISCRPT_STRUCT::getIntArrayItemSize ( const char *  item_name,
int *  dims_array,
int &  ndims,
DAEstatus status 
) const
int ISISCRPT_STRUCT::getIntArrayItemSize ( const char *  item_name,
const long *  spec_array,
int  nspec,
int *  dims_array,
int &  ndims,
DAEstatus status 
) const

Definition at line 415 of file isiscrpt.cpp.

References DAEstatus::Failure, ntc, spectrumNTC(), and DAEstatus::Success.

int ISISCRPT_STRUCT::getIntItem ( const char *  item_name,
long &  lVal,
DAEstatus status 
) const
int ISISCRPT_STRUCT::getIntItem ( const char *  item_name,
const long *  spec_array,
int  nspec,
long *  lVal,
DAEstatus status 
) const
int ISISCRPT_STRUCT::getNumSpectra ( bool  include_spectrum_zero = false) const
int ISISCRPT_STRUCT::getNumSpectra ( int  tr,
bool  include_spectrum_zero = false 
) const
Todo:
need to decide about one spectrum 0 per time regime

Definition at line 941 of file isiscrpt.cpp.

References nsp, ntrg, and spectrumCRPTTR().

int ISISCRPT_STRUCT::getPeriodSize ( ) const
inline
int ISISCRPT_STRUCT::getRealArrayItem ( const isisU32_t raw_data,
int  raw_data_size,
const char *  item_name,
double *  darray,
DAEstatus status 
) const

Definition at line 775 of file isiscrpt.cpp.

Referenced by CRPTProxy::getRealArrayItem().

int ISISCRPT_STRUCT::getRealArrayItem ( const isisU32_t raw_data,
int  raw_data_size,
const char *  item_name,
float *  farray,
DAEstatus status 
) const

Definition at line 780 of file isiscrpt.cpp.

int ISISCRPT_STRUCT::getRealArrayItem ( const isisU32_t raw_data,
int  raw_data_size,
const char *  item_name,
const long *  spec_array,
int  nspec,
double *  darray,
DAEstatus status 
) const

Definition at line 785 of file isiscrpt.cpp.

int ISISCRPT_STRUCT::getRealArrayItem ( const isisU32_t raw_data,
int  raw_data_size,
const char *  item_name,
const long *  spec_array,
int  nspec,
float *  farray,
DAEstatus status 
) const

Definition at line 790 of file isiscrpt.cpp.

template<typename T >
int ISISCRPT_STRUCT::getRealArrayItemHelper ( const isisU32_t raw_data,
int  raw_data_size,
const char *  item_name,
T *  darray,
DAEstatus status 
) const
private

Definition at line 796 of file isiscrpt.cpp.

template<typename T >
int ISISCRPT_STRUCT::getRealArrayItemHelper ( const isisU32_t raw_data,
int  raw_data_size,
const char *  item_name,
const long *  spec_array,
int  nspec,
T *  darray,
DAEstatus status 
) const
private
int ISISCRPT_STRUCT::getRealArrayItemSize ( const char *  item_name,
int *  dims_array,
int &  ndims,
DAEstatus status 
) const
int ISISCRPT_STRUCT::getRealItem ( const char *  item_name,
double &  dblVal,
DAEstatus status 
) const
int ISISCRPT_STRUCT::getRealItem ( const char *  item_name,
const long *  spec_array,
int  nspec,
double *  dblVal,
DAEstatus status 
) const
bool ISISCRPT_STRUCT::isEventSpectrum ( int  spec) const
inline
bool ISISCRPT_STRUCT::isEventTR ( int  tr) const
inline
bool ISISCRPT_STRUCT::isInitialised ( )
inline

Definition at line 501 of file isiscrpt.h.

References initialised.

Referenced by ISISinstrumentControl::beginRunMainEx().

bool ISISCRPT_STRUCT::isMonitorSpectrum ( int  spec) const
inline

Definition at line 619 of file isiscrpt.h.

References spectrumToMonitorNumber().

Referenced by NeXusWriter::writeISISNeXus().

bool ISISCRPT_STRUCT::isRunning ( ) const
inline
int ISISCRPT_STRUCT::makeEventTRValue ( int  dae_tr,
int  crpt_tr,
int  file_tr 
) const
inlineprivate

file_tr ignored for now

Definition at line 773 of file isiscrpt.h.

References TR_EVENT_MOD.

Referenced by fullTR().

void ISISCRPT_STRUCT::markInitialised ( )
inline
void ISISCRPT_STRUCT::markUninitialised ( )
inline

Definition at line 500 of file isiscrpt.h.

References initialised.

Referenced by ISISCRPT_STRUCT().

int ISISCRPT_STRUCT::monitorNumberToSpectrum ( int  monitor_number) const
inline

monitor numbers start at 1, indexes in mdet also start at 1 for historical (i.e fortran and old raw file format) reasons

Definition at line 577 of file isiscrpt.h.

References mdet, nmon, and spec.

Referenced by addMonitors(), and spectrumToMonitorNumber().

int ISISCRPT_STRUCT::randomisedChannelRebin ( int  from_chan,
int  from_tr,
int  to_tr 
) const

shift an event from one TR to another channel 0 is a dummy channel meaning value outside tcb range

Definition at line 1045 of file isiscrpt.cpp.

References channelLookup(), ntc, and rtcb.

Referenced by CRPTProxy::histogramEventsToCRPT().

const char* ISISCRPT_STRUCT::runStatusName ( ) const
inline

Definition at line 508 of file isiscrpt.h.

References run_status, and runstatus_names.

Referenced by ISISinstrumentControl::ISISinstrumentControl().

bool ISISCRPT_STRUCT::saveMonitorEvents ( int  monitor_number) const
inline

Definition at line 589 of file isiscrpt.h.

References nmon, and save_monitor_events.

Referenced by NeXusEventCallback::allEventCallback().

int ISISCRPT_STRUCT::setDAESpecificParameters ( )
void ISISCRPT_STRUCT::setInstName ( const std::string &  comp_name)
int ISISCRPT_STRUCT::simpleChannelRebin ( int  from_chan,
int  from_tr,
int  to_tr 
) const

shift an event from one TR to another very simple - only accurate for fine bin -> course bin channel 0 is a dummy channel meaning value outside tcb range

Definition at line 1015 of file isiscrpt.cpp.

References ntc, and rtcb.

Referenced by buildTimeRegimeMap().

int ISISCRPT_STRUCT::spectrumCardPos ( int  spec) const
inline

Definition at line 810 of file isiscrpt.h.

References crat, spec, and spec_to_index.

uint32_t ISISCRPT_STRUCT::spectrumCRPTOffsetImpl ( int  spec,
int  daq_period 
) const
inline
uint32_t ISISCRPT_STRUCT::spectrumCRPTOffsetImpl ( int  spec,
int  daq_period,
int  raw_data_size 
) const
inline

<

Todo:
should add ntc to offset in this check as well

Definition at line 638 of file isiscrpt.h.

References spectrumCRPTOffsetImpl().

int ISISCRPT_STRUCT::spectrumCRPTTR ( int  spec) const
inline
int ISISCRPT_STRUCT::spectrumDAETR ( int  spec) const
inline
int ISISCRPT_STRUCT::spectrumGroup ( int  spec) const
inline

Definition at line 815 of file isiscrpt.h.

References spectrumCRPTTR().

Referenced by NeXusEventCallback::makeDetName(), and NeXusWriter::writeISISNeXus().

int ISISCRPT_STRUCT::spectrumNTC ( int  spec) const
inline
int ISISCRPT_STRUCT::spectrumToMonitorNumber ( int  spec) const
inline

return monitor number, or 0 if not monitor

Definition at line 607 of file isiscrpt.h.

References monitorNumberToSpectrum(), and nmon.

Referenced by NeXusEventCallback::allEventCallback(), isMonitorSpectrum(), and NeXusEventCallback::makeDetName().

void ISISCRPT_STRUCT::splitItemName ( const std::string &  sitem_name,
SplitItem split_item 
)
staticprivate
Todo:
need to decide about one spectrum 0 per time regime

Definition at line 908 of file isiscrpt.cpp.

References SplitItem::item, and SplitItem::number.

Referenced by getIntArrayItem(), getIntArrayItemSize(), and getRealArrayItemSize().

uint32_t ISISCRPT_STRUCT::trCRPTOffset ( int  tr,
int  daq_period,
int  raw_data_size 
) const
inline

Definition at line 651 of file isiscrpt.h.

References crptTR(), spec_min, and spectrumCRPTOffsetImpl().

Referenced by getIntArrayItem().

int ISISCRPT_STRUCT::udetFromSpec ( int  spec) const
inline

Definition at line 601 of file isiscrpt.h.

References spec, spec_to_index, and udet.

bool ISISCRPT_STRUCT::usingEventMode ( ) const
inline

Definition at line 858 of file isiscrpt.h.

References eventModeCardFraction().

Referenced by ISISinstrumentControl::updateFunc().

Member Data Documentation

char ISISCRPT_STRUCT::alert_email[1024]
float ISISCRPT_STRUCT::angle_of_incidence
float ISISCRPT_STRUCT::aperture1
float ISISCRPT_STRUCT::aperture2
int ISISCRPT_STRUCT::auto_save_count

Definition at line 289 of file isiscrpt.h.

Referenced by ISISinstrumentControl::writeAutosaveFile().

int ISISCRPT_STRUCT::auto_save_last
int ISISCRPT_STRUCT::auto_save_type
int ISISCRPT_STRUCT::auto_save_value
float ISISCRPT_STRUCT::beam_centre_x
float ISISCRPT_STRUCT::beam_centre_y
float ISISCRPT_STRUCT::beam_current
beamlogger_t ISISCRPT_STRUCT::beamlogger
char ISISCRPT_STRUCT::beamstop_position[16]
boost::array<int,ISISCRPT_MAX_NUM_DAE*100> ISISCRPT_STRUCT::cardpos2index

reverse of dae2cardpos above - turns position into array index. 100 here is DAE2CardPolicy::CRATE_MOD sparse as positions not contiguous. contains -1 on invalid positions

Definition at line 325 of file isiscrpt.h.

Referenced by cardIndexFromPos(), dae1SpecForCard(), daeTRForCard(), and ISISinstrumentControl::updateSpecmapsFromDAE().

float ISISCRPT_STRUCT::chopper_opening_angle
int ISISCRPT_STRUCT::clock_frequency
int ISISCRPT_STRUCT::code[ISISCRPT_MAX_DETECTOR]
char ISISCRPT_STRUCT::comment[512]
char ISISCRPT_STRUCT::comp_name[MAX_COMPUTERNAME_LENGTH+1]
int ISISCRPT_STRUCT::compression_block_size
int ISISCRPT_STRUCT::compression_level
float ISISCRPT_STRUCT::count_rate
int ISISCRPT_STRUCT::crat[ISISCRPT_MAX_DETECTOR]
time_t ISISCRPT_STRUCT::crpt_load_time

time ICP started

Definition at line 245 of file isiscrpt.h.

Referenced by CRPTProxy::loadCRPT(), CRPTProxy::loadOrCreateCRPT(), and CRPTProxy::mapCRPT().

unsigned long ISISCRPT_STRUCT::crpt_size

Definition at line 243 of file isiscrpt.h.

Referenced by checkCRPT(), and ISISCRPT_STRUCT().

time_t ISISCRPT_STRUCT::crpt_unload_time

time CRPT loaded

Definition at line 246 of file isiscrpt.h.

Referenced by CRPTProxy::unloadCRPT().

boost::array<int,ISISCRPT_MAX_DC> ISISCRPT_STRUCT::dae2cardmode

-1 unused, 0 histogram, 1 event. length ndetcard

Definition at line 323 of file isiscrpt.h.

Referenced by eventModeCards(), and ISISinstrumentControl::updateSpecmapsFromDAE().

boost::array<int,ISISCRPT_MAX_DC> ISISCRPT_STRUCT::dae2cardpos

detector card positions, length ndetcard

Definition at line 324 of file isiscrpt.h.

Referenced by ISISinstrumentControl::updateSpecmapsFromDAE().

boost::array<int,ISISCRPT_MAX_DC> ISISCRPT_STRUCT::dae2cardtr

detector card DAE time regime (-1 if card not used), length ndetcard - individual spectra on card may have different CRPT TR

Definition at line 322 of file isiscrpt.h.

Referenced by daeTRForCard(), and ISISinstrumentControl::updateSpecmapsFromDAE().

boost::array<int,ISISCRPT_MAX_DC> ISISCRPT_STRUCT::dae2highspec

length ndetcard

Definition at line 327 of file isiscrpt.h.

Referenced by dae1SpecForCardIndex(), and ISISinstrumentControl::updateSpecmapsFromDAE().

int ISISCRPT_STRUCT::dae2specmap[ISISCRPT_MAX_DC][ISISCRPT_MAX_DC_DETECTOR]

give spectrum number from dae2 card and dae2 spec number

Definition at line 328 of file isiscrpt.h.

Referenced by dae1SpecForCardIndex(), and ISISinstrumentControl::updateSpecmapsFromDAE().

int ISISCRPT_STRUCT::dae_type
md5checksum_t ISISCRPT_STRUCT::dae_xml_checksum

Definition at line 387 of file isiscrpt.h.

Referenced by ISISinstrumentControl::updateDAEsettingsXML().

data_dae_t ISISCRPT_STRUCT::data_dae[ISISCRPT_MAX_DATADAE]
RUNTABLE ISISCRPT_STRUCT::data_dae_table
float ISISCRPT_STRUCT::delt[ISISCRPT_MAX_DETECTOR]
boost::array<int,ISISCRPT_MAX_DETECTOR> ISISCRPT_STRUCT::det_group

0 = monitor, else logical det number

Definition at line 318 of file isiscrpt.h.

Referenced by ISISinstrumentControl::readWiringTable(), and NeXusWriter::writeISISNeXus().

int ISISCRPT_STRUCT::det_group_max

Definition at line 319 of file isiscrpt.h.

Referenced by ISISinstrumentControl::readWiringTable().

boost::array<int,ISISCRPT_MAX_DETECTOR> ISISCRPT_STRUCT::det_mode
RUNTABLE ISISCRPT_STRUCT::detector_table
time_t ISISCRPT_STRUCT::duration
int ISISCRPT_STRUCT::electronics_delay

Definition at line 263 of file isiscrpt.h.

Referenced by setDAESpecificParameters(), and ISISinstrumentControl::setupDAE().

char ISISCRPT_STRUCT::epics_lastread_iso[64]

Definition at line 492 of file isiscrpt.h.

Referenced by ISISinstrumentControl::ISISinstrumentControl().

unsigned ISISCRPT_STRUCT::epics_lastread_nano

Definition at line 493 of file isiscrpt.h.

Referenced by ISISinstrumentControl::ISISinstrumentControl().

boost::array<int,ISISCRPT_NUM_FC_VETO> ISISCRPT_STRUCT::fermi_chopper_delay
boost::array<int,ISISCRPT_NUM_FC_VETO> ISISCRPT_STRUCT::fermi_chopper_width
char ISISCRPT_STRUCT::field_label[256]
FILETIME ISISCRPT_STRUCT::filetime
float ISISCRPT_STRUCT::foe_mirror_angle
unsigned ISISCRPT_STRUCT::good_frames
isisU32_t ISISCRPT_STRUCT::good_ppp_high
isisU32_t ISISCRPT_STRUCT::good_ppp_low
float ISISCRPT_STRUCT::good_uamph
float ISISCRPT_STRUCT::i_l1
struct { ... } ISISCRPT_STRUCT::icp_clock
time_t ISISCRPT_STRUCT::icp_start_time
char ISISCRPT_STRUCT::icp_version[ICP_NAME_LEN]
int ISISCRPT_STRUCT::initialised

Definition at line 242 of file isiscrpt.h.

Referenced by isInitialised(), markInitialised(), and markUninitialised().

char ISISCRPT_STRUCT::inst_abrv[ISISCRPT_INST_ABRV_LEN+1]
char ISISCRPT_STRUCT::inst_name[ISISCRPT_INST_LEN+1]
char ISISCRPT_STRUCT::institute[ISISCRPT_INSTITUTE_NAME_LEN+1]
char ISISCRPT_STRUCT::instrument_geometry[5]
char ISISCRPT_STRUCT::instrument_parameter_map_file[ISISCRPT_MAX_FNAMELEN]

Definition at line 446 of file isiscrpt.h.

Referenced by ISISinstrumentControl::readDetectorTable().

char ISISCRPT_STRUCT::instrument_xml_file[ISISCRPT_MAX_FNAMELEN]
char ISISCRPT_STRUCT::isis_cycle[ISISCRPT_MAX_LVXML_SIZE]
char ISISCRPT_STRUCT::journal_blocks[ISISCRPT_MAX_LVXML_SIZE]
float ISISCRPT_STRUCT::len2[ISISCRPT_MAX_DETECTOR]
char ISISCRPT_STRUCT::local_contact[ISISCRPT_USER_NAME_LEN+1]
char ISISCRPT_STRUCT::log_data[ISISCRPT_LOG_MAXLINES][ISISCRPT_LOG_LINELEN]

Definition at line 429 of file isiscrpt.h.

Referenced by ISISRAW::sendToCRPT(), and ISISRAW::updateFromCRPT().

long ISISCRPT_STRUCT::log_nlines

Definition at line 428 of file isiscrpt.h.

Referenced by ISISCRPT_STRUCT(), ISISRAW::sendToCRPT(), and ISISRAW::updateFromCRPT().

char ISISCRPT_STRUCT::long_title[ISISCRPT_TITLE_LEN+1]
char ISISCRPT_STRUCT::lvxml_dae[ISISCRPT_MAX_LVXML_SIZE]
char ISISCRPT_STRUCT::lvxml_monitoring[ISISCRPT_MAX_LVXML_SIZE]
char ISISCRPT_STRUCT::lvxml_periods[ISISCRPT_MAX_LVXML_SIZE]
char ISISCRPT_STRUCT::lvxml_tcb[ISISCRPT_MAX_LVXML_SIZE]
char ISISCRPT_STRUCT::lvxml_update[ISISCRPT_MAX_LVXML_SIZE]
unsigned ISISCRPT_STRUCT::magic

Definition at line 495 of file isiscrpt.h.

Referenced by checkCRPT(), and ISISCRPT_STRUCT().

boost::array<int,ISISCRPT_MAX_MONITOR> ISISCRPT_STRUCT::mdet
char ISISCRPT_STRUCT::measurement_id[ICP_NAME_LEN]
char ISISCRPT_STRUCT::measurement_subid[ICP_NAME_LEN]
char ISISCRPT_STRUCT::measurement_type[ICP_NAME_LEN]
int ISISCRPT_STRUCT::modn[ISISCRPT_MAX_DETECTOR]
float ISISCRPT_STRUCT::monitor_range[ISISCRPT_MAX_MONITOR][2]
int ISISCRPT_STRUCT::monitor_spectrum
boost::array<unsigned,ISISCRPT_MAX_MONITOR> ISISCRPT_STRUCT::monitor_sum
Monitoring ISISCRPT_STRUCT::monitoring
boost::array<int,ISISCRPT_MAX_MONITOR> ISISCRPT_STRUCT::monp
int ISISCRPT_STRUCT::mpos[ISISCRPT_MAX_DETECTOR]
int ISISCRPT_STRUCT::muon_cerenkov_pulse
int ISISCRPT_STRUCT::n_data_dae
nagios_t ISISCRPT_STRUCT::nagios
int ISISCRPT_STRUCT::ndet
int ISISCRPT_STRUCT::ndetcard

Definition at line 321 of file isiscrpt.h.

Referenced by eventModeCards(), and ISISinstrumentControl::updateSpecmapsFromDAE().

int ISISCRPT_STRUCT::nmon
int ISISCRPT_STRUCT::nper
int ISISCRPT_STRUCT::nper_daq
int ISISCRPT_STRUCT::nperseq
int ISISCRPT_STRUCT::nperseq_request
boost::array<int,ISISCRPT_MAX_NTRG> ISISCRPT_STRUCT::nsp
boost::array<int,ISISCRPT_MAX_NTRG> ISISCRPT_STRUCT::ntc
boost::array<int,ISISCRPT_MAX_NTRG> ISISCRPT_STRUCT::ntcr
int ISISCRPT_STRUCT::ntrg
int ISISCRPT_STRUCT::nuse
LONGLONG ISISCRPT_STRUCT::perf_counter
boost::array<PERIOD,ISISCRPT_MAX_PERIOD> ISISCRPT_STRUCT::period
char ISISCRPT_STRUCT::period_file[ICP_NAME_LEN]
int ISISCRPT_STRUCT::period_output_delay
int ISISCRPT_STRUCT::period_source
int ISISCRPT_STRUCT::period_type
int ISISCRPT_STRUCT::persize

size of a period in 32bit words

Definition at line 348 of file isiscrpt.h.

Referenced by calculateCRPTOffsets(), getPeriodSize(), ISISCRPT_STRUCT(), and spectrumCRPTOffsetImpl().

LONGLONG ISISCRPT_STRUCT::proc_freq
int ISISCRPT_STRUCT::rb_number
char ISISCRPT_STRUCT::rcsid[ISISCRPT_MAX_RCSID+1]

Definition at line 239 of file isiscrpt.h.

Referenced by ISISCRPT_STRUCT(), and CRPTProxy::loadOrCreateCRPT().

time_t ISISCRPT_STRUCT::resume_time
float ISISCRPT_STRUCT::rtcb[ISISCRPT_MAX_NTRG][ISISCRPT_MAX_TIMECHANB]
int ISISCRPT_STRUCT::run_number
int ISISCRPT_STRUCT::run_status
char ISISCRPT_STRUCT::sample_geometry[80]
float ISISCRPT_STRUCT::sample_height
char ISISCRPT_STRUCT::sample_id[ICP_NAME_LEN]
char ISISCRPT_STRUCT::sample_name[256]
char ISISCRPT_STRUCT::sample_orientation[256]
float ISISCRPT_STRUCT::sample_phi_angle
float ISISCRPT_STRUCT::sample_thickness
char ISISCRPT_STRUCT::sample_type[80]
float ISISCRPT_STRUCT::sample_width
int ISISCRPT_STRUCT::sav_file_count
boost::array<int,ISISCRPT_MAX_MONITOR> ISISCRPT_STRUCT::save_monitor_events

whether to save monitor events in event mode (size NMON)

Definition at line 297 of file isiscrpt.h.

Referenced by ISISinstrumentControl::readWiringTable(), and saveMonitorEvents().

char ISISCRPT_STRUCT::script_name[ICP_NAME_LEN]
float ISISCRPT_STRUCT::sdd
int ISISCRPT_STRUCT::se_status
int ISISCRPT_STRUCT::software_period
int ISISCRPT_STRUCT::spec[ISISCRPT_MAX_DETECTOR]
boost::array<int,ISISCRPT_MAX_NTRG> ISISCRPT_STRUCT::spec_max

range of spectrum numbers in CRPT time regime

Definition at line 336 of file isiscrpt.h.

Referenced by ISISinstrumentControl::getSpectrumNumbersForTimeRegime(), and ISISinstrumentControl::readSpectraTable().

boost::array<int,ISISCRPT_MAX_NTRG> ISISCRPT_STRUCT::spec_min

range of spectrum numbers in CRPT time regime

Definition at line 335 of file isiscrpt.h.

Referenced by ISISinstrumentControl::getSpectrumNumbersForTimeRegime(), ISISinstrumentControl::readSpectraTable(), trCRPTOffset(), and NeXusWriter::writeISISNeXus().

boost::array<int,ISISCRPT_MAX_DETECTOR> ISISCRPT_STRUCT::spec_to_crpt_offset
boost::array<int,ISISCRPT_MAX_DETECTOR> ISISCRPT_STRUCT::spec_to_index

maps spectrum number to index into spec,udet,timr etc arrays in crpt

Definition at line 316 of file isiscrpt.h.

Referenced by isEventSpectrum(), ISISinstrumentControl::readSpectraTable(), spectrumCardPos(), spectrumCRPTTR(), spectrumDAETR(), and udetFromSpec().

RUNTABLE ISISCRPT_STRUCT::spectra_table
time_t ISISCRPT_STRUCT::start_time
time_t ISISCRPT_STRUCT::stop_time
int ISISCRPT_STRUCT::tables_valid
int ISISCRPT_STRUCT::tcb[ISISCRPT_MAX_NTRG][ISISCRPT_MAX_TIMECHANB]
int ISISCRPT_STRUCT::tcb_delay

Definition at line 345 of file isiscrpt.h.

Referenced by buildTimeRegimeMap(), channelLookup(), and CRPTProxy::histogramEventsToCRPT().

int ISISCRPT_STRUCT::tcb_maxdelay

Definition at line 268 of file isiscrpt.h.

Referenced by ISISCRPT_STRUCT(), and ISISinstrumentControl::tcbcalc().

float ISISCRPT_STRUCT::tcb_maxtime

Definition at line 267 of file isiscrpt.h.

Referenced by ISISCRPT_STRUCT(), and ISISinstrumentControl::tcbcalc().

float ISISCRPT_STRUCT::tcb_mintime

Definition at line 266 of file isiscrpt.h.

Referenced by setDAESpecificParameters(), and ISISinstrumentControl::tcbcalc().

float ISISCRPT_STRUCT::tcb_minwidth

Definition at line 265 of file isiscrpt.h.

Referenced by setDAESpecificParameters(), and ISISinstrumentControl::tcbcalc().

int ISISCRPT_STRUCT::tcb_pulse_generator

Definition at line 272 of file isiscrpt.h.

Referenced by ISISinstrumentControl::setupDAE().

FrameSync ISISCRPT_STRUCT::tcb_sync
boost::array<int,ISISCRPT_MAX_NTRG> ISISCRPT_STRUCT::tcb_trdelay
md5checksum_t ISISCRPT_STRUCT::tcb_xml_checksum

Definition at line 388 of file isiscrpt.h.

Referenced by ISISinstrumentControl::updateTCBXML().

char ISISCRPT_STRUCT::temperature_label[256]
int ISISCRPT_STRUCT::time_scaler

Definition at line 264 of file isiscrpt.h.

Referenced by ISISCRPT_STRUCT(), and ISISRAW::sendToCRPT().

int ISISCRPT_STRUCT::timr_crpt[ISISCRPT_MAX_DETECTOR]
int ISISCRPT_STRUCT::timr_dae[ISISCRPT_MAX_DETECTOR]
int ISISCRPT_STRUCT::timr_file[ISISCRPT_MAX_DETECTOR]
unsigned ISISCRPT_STRUCT::total_frames
isisU32_t ISISCRPT_STRUCT::total_ppp_high
isisU32_t ISISCRPT_STRUCT::total_ppp_low
float ISISCRPT_STRUCT::total_uamph
float ISISCRPT_STRUCT::tthe[ISISCRPT_MAX_DETECTOR]
float ISISCRPT_STRUCT::uamp_scale

Definition at line 479 of file isiscrpt.h.

Referenced by ISISCRPT_STRUCT(), and ISISinstrumentControl::ISISinstrumentControl().

int ISISCRPT_STRUCT::udet[ISISCRPT_MAX_DETECTOR]
long ISISCRPT_STRUCT::update_duration
long ISISCRPT_STRUCT::update_duration_period
long ISISCRPT_STRUCT::update_good_frames
isisU32_t ISISCRPT_STRUCT::update_good_frames_period
isisU32_t ISISCRPT_STRUCT::update_good_ppp_high

Definition at line 368 of file isiscrpt.h.

Referenced by getIntArrayItem(), and ISISinstrumentControl::updateFunc().

isisU32_t ISISCRPT_STRUCT::update_good_ppp_low

Definition at line 367 of file isiscrpt.h.

Referenced by getIntArrayItem(), and ISISinstrumentControl::updateFunc().

float ISISCRPT_STRUCT::update_good_uamph
float ISISCRPT_STRUCT::update_npratio_average
float ISISCRPT_STRUCT::update_npratio_current
int ISISCRPT_STRUCT::update_num_polls
long ISISCRPT_STRUCT::update_period
long ISISCRPT_STRUCT::update_period_sequence
int ISISCRPT_STRUCT::update_poll_time
long ISISCRPT_STRUCT::update_raw_frames
isisU32_t ISISCRPT_STRUCT::update_raw_frames_period
float ISISCRPT_STRUCT::update_raw_uamph
struct timeb ISISCRPT_STRUCT::update_time
int64_t ISISCRPT_STRUCT::update_total_counts
isisU32_t ISISCRPT_STRUCT::update_total_ppp_high

Definition at line 370 of file isiscrpt.h.

Referenced by getIntArrayItem(), and ISISinstrumentControl::updateFunc().

isisU32_t ISISCRPT_STRUCT::update_total_ppp_low

Definition at line 369 of file isiscrpt.h.

Referenced by getIntArrayItem(), and ISISinstrumentControl::updateFunc().

char ISISCRPT_STRUCT::user_email[128]

Definition at line 355 of file isiscrpt.h.

Referenced by ISISinstrumentControl::updateUserXML().

char ISISCRPT_STRUCT::user_id[128]

Definition at line 357 of file isiscrpt.h.

Referenced by ISISinstrumentControl::updateUserXML().

char ISISCRPT_STRUCT::user_name[ISISCRPT_USER_NAME_LEN+1]
char ISISCRPT_STRUCT::user_telephone[128]
float ISISCRPT_STRUCT::ut[ISISCRPT_MAX_USER *ISISCRPT_MAX_DETECTOR]
int ISISCRPT_STRUCT::version

Definition at line 240 of file isiscrpt.h.

Referenced by ISISCRPT_STRUCT(), and CRPTProxy::loadOrCreateCRPT().

boost::array<VETO,ISISCRPT_NUM_VETOS> ISISCRPT_STRUCT::vetos
RUNTABLE ISISCRPT_STRUCT::wiring_table

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