ICP  1
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
ISISinstrumentControl Class Reference

#include <ISISinstrumentControl.h>

Inheritance diagram for ISISinstrumentControl:
Inheritance graph

Public Member Functions

DAEstatusgetStatusReporter ()
 
int createLastrunFile (const CRPTProxy &crpt, DAEstatus &status)
 
int writeISISRAWasync (const CRPTProxy &crpt, const char *filename, DAEstatus &dstatus)
 
int waitForAsync ()
 
int doneAsync ()
 called by async worker thread when it has completed its work More...
 
int beginRun (DAEstatus &status)
 
int beginRunEx (bool start_paused, bool delayed_start, long period, DAEstatus &status)
 
int endRun (DAEstatus &status)
 
int requestEndRunAfterNextSequenceCompletes (DAEstatus &status)
 
bool isFinalSequenceComplete (DAEstatus &status)
 
int pauseRun (DAEstatus &status)
 
int resumeRun (DAEstatus &status)
 
int abortRun (DAEstatus &status)
 
int saveRun (DAEstatus &status)
 
int updateCRPTWithDAE (CRPTProxy &crpt, bool pause_collection, DAEstatus &status)
 
int updateCRPTWithDAE (bool pause_collection, DAEstatus &status)
 
int storeCRPT (DAEstatus &status)
 
int storeCRPT (CRPTProxy &crpt, DAEstatus &status)
 
int snapshotCRPT (const char *filename, bool do_update, bool do_pause, DAEstatus &status)
 
int saveCRPTToFile (const CRPTProxy &crpt, const std::string &raw_filename, const std::string &nexus_filename, const seblock_map_t &blocks, const std::string &events_nxfile, DAEstatus &dstatus)
 
int updateCRPTWithSEandSaveToFile (CRPTProxy &crpt, const std::string &raw_filename, const std::string &nexus_filename, DAEstatus &dstatus)
 
int startSEWait (DAEstatus &dstatus)
 
int endSEWait (DAEstatus &dstatus)
 
int changePeriod (int period, DAEstatus &status)
 
int changePeriodWhileRunning (int period, bool pause_first, DAEstatus &status)
 
int readTables (const char *wiring, const char *detector, const char *spectra, DAEstatus &status)
 
int setLinearTimeChannelRange (int range_number, float start, float end, float step, DAEstatus &status)
 
int setLogTimeChannelRange (int range_number, float start, float end, float step, DAEstatus &status)
 
int setVeto (const std::string &name, long enable, DAEstatus &status)
 
bool isRunning ()
 
bool isWaiting ()
 
int getRunState ()
 
int getRunNumber ()
 
int getSpectrum (long spectrum_number, long period, double *time_array, double *signal_array, double *error_array, bool as_histogram, bool as_distribution, long &sum, DAEstatus &status)
 
int getSpectrumIntegral (long spec_no, long period, float t_low, float t_high, long &integral, long &max_val, DAEstatus &status)
 
int getMonitorIntegral (long monitor, long period, float t_low, float t_high, long &integral, DAEstatus &status)
 
int getSpectrumIntegral (long n, const long spec_no[], long period, const float t_low[], const float t_high[], long integral[], long max_val[], DAEstatus &status)
 
int getMonitorIntegral (long n, const long monitor[], long period, const float t_low[], const float t_high[], long integral[], DAEstatus &status)
 
int getTotalCounts (int64_t &counts, DAEstatus &status)
 
int getMEvents (double &mevents, DAEstatus &status)
 
int getMEventsPeriod (double &mevents, int period, DAEstatus &status)
 
float getCountRate (DAEstatus &status)
 
int getCRPTSpectrumIntegral (long spec_no, long period, float t_low, float t_high, long &integral, long &max_val, DAEstatus &status)
 
int getCRPTSpectrumIntegral (long n, const long spec_no[], long period, const float t_low[], const float t_high[], long integral[], long max_val[], DAEstatus &status)
 
int getCRPTSpectrumIntegral (long spec_start, int nspectra, long period, float t_low, float t_high, long integral[], long max_val[], DAEstatus &status)
 
int getCRPTSpectrumIntegral (long spec_start, int nspectra, long period, long integral[], DAEstatus &status)
 
float getBeamCurrent (DAEstatus &status)
 
int getCurrentPeriodNumber (int &period, int &daq_period, DAEstatus &status)
 
float getGoodUAmpH (DAEstatus &status)
 
float getRawUAmpH (DAEstatus &status)
 
float getCurrentPeriodGoodUAmpH (DAEstatus &status)
 
float getCurrentPeriodRawUAmpH (DAEstatus &status)
 
float getDuration (DAEstatus &status)
 
int getFramesAllPeriods (long *good_frames, long *raw_frames, int n, DAEstatus &status)
 
int getUAmpHAllPeriods (float *good_uamph, float *raw_uamph, int n, DAEstatus &status)
 
int getNumberOfTimeChannels (int spectrum, DAEstatus &status)
 
int getNumberOfSpectra (DAEstatus &status)
 
int getSpectrumNumbersForTimeRegime (long tr, long &spec_min, long &spec_max, DAEstatus &status)
 
int getNumberOfPeriods (DAEstatus &status)
 
float getPeriodDuration (DAEstatus &status)
 
int getRawFrames (DAEstatus &status)
 
int getCurrentPeriodRawFrames (DAEstatus &status)
 
int getGoodFrames (DAEstatus &status)
 
int getCurrentPeriodGoodFrames (DAEstatus &status)
 
int RIO (isis32_t bus_addr, isisU16_t &word, DAEstatus &status)
 
int updateStatusXML (std::string &status_xml, DAEstatus &status)
 
int updateTCBXML (const std::string &status_xml, DAEstatus &status)
 
int updateDAEsettingsXML (const std::string &status_xml, DAEstatus &status)
 
int updateSampleXML (const std::string &sample_xml, DAEstatus &status)
 
int updateUserXML (const std::string &user_xml, DAEstatus &status)
 
int updateHardwarePeriodsXML (const std::string &periods_xml, DAEstatus &status)
 
int changeUpdateSettingsXML (const std::string &update_xml, DAEstatus &status)
 
int updateMonitoringXML (const std::string &monitor_xml, DAEstatus &status)
 
int getDAEsettingsXML (const std::string &dae_xml_in, std::string &dae_xml_out, DAEstatus &status)
 
int getHardwarePeriodsXML (const std::string &periods_xml_in, std::string &periods_xml_out, DAEstatus &status)
 
int getTCBXML (const std::string &tcb_xml_in, std::string &tcb_xml_out, DAEstatus &status)
 
int getUpdateSettingsXML (const std::string &update_xml_in, std::string &update_xml_out, DAEstatus &status)
 
int getMonitoringXML (const std::string &monitor_xml_in, std::string &monitor_xml_out, DAEstatus &status)
 
 ISISinstrumentControl (Poco::Util::Application *pApp, const std::string &icp_service_dir, DAEreport_func_t *func=&DAEstatus::ostreamReportFunction, write_event_log_t *event_func=NULL, void *report_arg=&std::cerr)
 
virtual ~ISISinstrumentControl ()
 
int setRunNumber (long number, DAEstatus &status)
 
int setRunStatus (long number, DAEstatus &status)
 
bool shutdownRequested ()
 
std::ostream & printStatus (std::ostream &os, DAEstatus &dstatus)
 
int VMEReadValuesToString (unsigned long card_id, unsigned long card_address, bool sixteen_bit, unsigned long num_values, std::string &values, DAEstatus &status)
 
int VMEWriteValue (unsigned long card_id, unsigned long card_address, bool sixteen_bit, unsigned long value, unsigned long mode, DAEstatus &status)
 
int VMEReadValue (unsigned long card_id, unsigned long card_address, bool sixteen_bit, unsigned long *value, DAEstatus &status)
 
int VMEWriteArray (unsigned long card_id, unsigned long card_address, isisU32_t *values, unsigned long num_values, DAEstatus &status)
 
int VMEReadArray (unsigned long card_id, unsigned long card_address, isisU32_t *values, unsigned long num_values, DAEstatus &status)
 
int sumAllSpectra (long &counts, long &bin0_counts, DAEstatus &status)
 
int sumAllHistogramMemory (long &counts, DAEstatus &status)
 
int importCRPT (const char *filename, DAEstatus &dstatus)
 
int readISISRAW (const char *filename, DAEstatus &dstatus)
 
int getOptions (std::string &options_xml, DAEstatus &status)
 
int setOptions (const std::string &options_xml, DAEstatus &status)
 
int refreshCachedValues (DAEstatus &status)
 
int getPollTime () const
 
int getCharItem (const char *item_name, std::string &cvalue, DAEstatus &status)
 
int getIntItem (const char *item_name, long &lVal, DAEstatus &status)
 
int getRealItem (const char *item_name, double &dblVal, DAEstatus &status)
 
int getIntArrayItemSize (const char *item_name, int *dims_array, int &ndims, DAEstatus &status)
 
int getIntArrayItem (const char *item_name, long *larray, DAEstatus &status)
 
int getRealArrayItemSize (const char *item_name, int *dims_array, int &ndims, DAEstatus &status)
 
int getRealArrayItem (const char *item_name, double *darray, DAEstatus &status)
 
int getIntItem (const char *item_name, long *spec_array, int nspec, long *lVal, DAEstatus &status)
 
int getRealItem (const char *item_name, long *spec_array, int nspec, double *dblVal, DAEstatus &status)
 
int getIntArrayItem (const char *item_name, long *spec_array, int nspec, long *larray, DAEstatus &status)
 
int getRealArrayItem (const char *item_name, long *spec_array, int nspec, double *darray, DAEstatus &status)
 
int notifyICP (long event_id, const char *param, DAEstatus &status)
 
int setSampleParameters (const string_table_t &table, DAEstatus &status)
 
int setBeamlineParameters (const string_table_t &table, DAEstatus &status)
 
int setBlockTable (const string_table_t &table, DAEstatus &status)
 
int setUserParameters (long rbno, const string_table_t &table, DAEstatus &status)
 
int getNPRatio (float *current, float *average, DAEstatus &status)
 
void zeroCRPTRawData ()
 
void zeroCRPTRunRawData ()
 
int changeNumberOfSoftwarePeriods (long nperiod, DAEstatus &status)
 
int fillWithTestPattern (unsigned long pattern, DAEstatus &status)
 
int checkTestPattern (unsigned long pattern, DAEstatus &status)
 
int getVetoStatus (std::string &veto_text, DAEstatus &status)
 
int whichVeto (std::string &veto_text, DAEstatus &status)
 
int loadDAEWithData (const std::string &file_name, long options, DAEstatus &status)
 
int updateCRPTSpectra (int period, long spec_start, int nspectra, DAEstatus &status)
 
int updateCRPTSpectraAllPeriods (long spec_start, int nspectra, DAEstatus &status)
 
int exitProgram (const std::string &message, bool prompt)
 
boost::signals2::connection registerOnRunStateChange (boost::function< void(BSTR)> func)
 
void fireOnRunStateChange (const char *state)
 
_se_translator_function registerStructuredExceptionHandler ()
 this needs to be called per thread More...
 
void unregisterStructuredExceptionHandler (_se_translator_function old_func)
 

Static Public Member Functions

static int allReportFunc (const DAEstatus_message &mess, void *arg)
 
static int updateCRPTwithSE (CRPTProxy &crpt, DAEstatus &dstatus)
 
static int getSE (const CRPTProxy &crpt, seblock_map_t &blocks, DAEstatus &dstatus)
 
static int updateCRPTwithSE (CRPTProxy &crpt, const seblock_map_t &blocks, DAEstatus &dstatus)
 
static int debugReportFunction (const DAEstatus_message &mess, void *arg)
 
static int sqliteReportFunction (const DAEstatus_message &mess, void *arg)
 
static int writeISISRAW (const CRPTProxy &crpt, const char *filename, DAEstatus &dstatus)
 
static int writeISISNeXus (NeXusWriter &nxwriter, const CRPTProxy &crpt, const char *filename, bool logs_only, const seblock_map_t &blocks, const std::string &events_nxfile, DAEstatus &dstatus)
 
static int updateSampleParameters (const CRPTProxy::parameter_map_t &sample_parameters, CRPTProxy &crpt, const seblock_map_t *se_blocks, DAEstatus &status)
 
static int updateBeamlineParameters (const CRPTProxy::parameter_map_t &beamline_parameters, CRPTProxy &crpt, const seblock_map_t *se_blocks, DAEstatus &status)
 
static int ISOtime (time_t time, char *buffer, int len)
 
static int ISOtime (const struct timeb &tb, char *buffer, int len)
 
static int prettyTime (time_t time, char *buffer, int len)
 
static int prettyTime (const struct timeb &tb, char *buffer, int len)
 

Protected Types

enum  ICPOptions { AutoSave = 0x1, PeriodSequenceAutoEnd = 0x2, PerCycleJournal = 0x4 }
 
enum  ICPEvent { UserDetailsChanged = 0, BeamlineParamerersChanged = 1, SampleParametersChanged = 2 }
 
typedef std::map< std::string,
std::string > 
recovery_map_t
 
typedef int(ISISinstrumentControl::* xml_update_func_t )(const std::string &xml, DAEstatus &status)
 

Protected Member Functions

int RCretry (const char *name, boost::function< int(ISISinstrumentControl *, DAEstatus &)> func, DAEstatus &status)
 
int updateXML (const char *name, xml_update_func_t func, DAEstatus &dstatus)
 
int writeWinEventLog (int sev, const std::string &message)
 
int allReportFuncMain (const DAEstatus_message &mess)
 
int checkForNoncountingDetectors (const CRPTProxy &crpt, DAEstatus &dstatus)
 the idea here is to look for any module (dim) that has no counts More...
 
void rerunFailedEnds ()
 
int startEventWriter (DAEstatus &status)
 
int stopEventWriter (bool wait, DAEstatus &status)
 
int updateSpecmapsFromDAE (const std::map< int, int > &trcn, DAEstatus &status)
 
int beginRunMain (DAEstatus &status)
 
int beginRunMainEx (bool start_paused, bool delayed_start, long period, DAEstatus &status)
 
int endRunMain (DAEstatus &status)
 
int endRunTask (Poco::SharedPtr< CRPTProxy > crpt, NeXusWriter &nxwriter, bool keep_raw_events, bool keep_crpt, const std::string events_nxfile, DAEstatus &status)
 
int pauseRunMain (bool refresh_cache, DAEstatus &dstatus)
 
int readWiringTable (const char *filename, DAEstatus &status)
 
int readDetectorTable (const char *filename, DAEstatus &status)
 
int readSpectraTable (const char *filename, DAEstatus &status)
 
int tcbcalc (DAEstatus &status)
 
int pausePeriod (PERIOD *p)
 
int setupDAE (int tables_only, DAEstatus &dstatus)
 
int updateFunc (int poll_time, bool only_refresh_cache)
 
int setTimeChannelRange (int range_number, int range_type, float start, float end, float step, DAEstatus &status)
 
int updateStatusLog ()
 
int updateMonitoringLog ()
 
int loadCRPT ()
 
int flushCRPT (DAEstatus &status, bool flush_raw_data=false)
 
int startDataCollection (bool clear_counters, DAEstatus &status)
 
int stopDataCollection (ISISDAE::StopRunMode mode, DAEstatus &status)
 
int readRecoveryFile (DAEstatus &dstatus)
 
int writeRecoveryFile (DAEstatus &dstatus)
 
int readLogFile (const char *filename)
 
int writeAutosaveFile (DAEstatus &dstatus)
 
int getDAQPeriod (int period, DAEstatus &status)
 
int updateCRPTSpectra (int period, long *spectra_list, int nspectra, DAEstatus &status)
 
int updateUserDetailsFromFile (const char *filename, DAEstatus &status)
 
int writeJournal (const CRPTProxy &crpt, seblock_map_t &blocks, DAEstatus &status)
 
HANDLE launchDatasvr (DAEstatus &dstatus)
 
int killDatasvr (DAEstatus &dstatus)
 
int updateCycle (DAEstatus &dstatus)
 
int evaluateExpression (std::map< std::string, double > &values, const std::string &expression, double &result, DAEstatus &status)
 
std::string getPostCommandLogName ()
 
int runPostCommand (const char *property_name, const std::string &arg, DAEstatus &status)
 
void beamCurrentTimerCallback (Poco::Timer &t)
 
void updateICPTimeDiffLog ()
 
int setRunStatusImp (long number, bool is_start, DAEstatus &status)
 
int loadDAEWithNeXusData (const std::string &file_name, long options, DAEstatus &status)
 
int readDataDaeTable (const char *filename, DAEstatus &status)
 
int sendNagios (int status, const std::string &service, const std::string &message, DAEstatus &dstatus)
 
void readBeamloggerBroadcast ()
 
bool beamOn (int minutes=0) const
 
bool muonKickerOK () const
 
- Protected Member Functions inherited from ISIS::Base
 Base (const std::string &logger_name="UNKNOWN")
 
void setLoggerName (const std::string &logger_name)
 
virtual ~Base ()
 
virtual std::string loggingPrefix () const
 
void setThisLoggerLevel (int level)
 

Static Protected Member Functions

static DWORD __stdcall writeISISRAWthread (void *arg)
 
static void updateThread (void *arg)
 
static int replaceSEparameters (std::string &s, const seblock_map_t *se_blocks, DAEstatus &status)
 
static int setRealParameter (const CRPTProxy::parameter_map_t &params, const seblock_map_t *se_blocks, const char *name, float &crpt_target, DAEstatus &status)
 
static int setStringParameter (const CRPTProxy::parameter_map_t &params, const seblock_map_t *se_blocks, const char *name, char *crpt_target, int size_crpt_target, bool null_terminate, DAEstatus &status)
 
static int logEvent (time_t the_time, const CRPTProxy &crpt, const std::string &event, DAEstatus &status)
 
static int logEvent (const CRPTProxy &crpt, const std::string &event, DAEstatus &status)
 
static int logEventVa (time_t the_time, const CRPTProxy &crpt, DAEstatus &status, const char *event,...)
 
static int logEventVaImp (time_t the_time, const CRPTProxy &crpt, DAEstatus &status, const char *event, va_list ap)
 
static int logEventVa (const CRPTProxy &crpt, DAEstatus &status, const char *event,...)
 
static int spawnCommand (const std::string &program, const std::string &args, bool use_cmd_exe, bool console, HANDLE *suspended_thread_handle, const std::string &std_in_file, const std::string &std_out_file, const std::string &std_error_file, int wait_time, DAEstatus &dstatus)
 
static int updateSampleParametersFromFile (const char *filename, DAEstatus &status)
 
static int updateBeamlineParametersFromFile (const char *filename, DAEstatus &status)
 
static int updateParametersFromFile (CRPTProxy::parameter_map_t &param_map, const char *filename, DAEstatus &status)
 
static int stringTableToParameterMap (const string_table_t &string_table, CRPTProxy::parameter_map_t &param_map, DAEstatus &status)
 
static int killProcess (const char *process_name, DAEstatus &dstatus)
 
static std::string getProcessName (DWORD processID)
 
static int loadCRPTWithHistogrammedEvents (CRPTProxy &crpt, DAEstatus &dstatus)
 
static void purecallHandler ()
 
static void seTransFunction (unsigned int u, EXCEPTION_POINTERS *pExp)
 
- Static Protected Member Functions inherited from ISIS::Base
static void setAllLoggerLevel (int level)
 

Protected Attributes

CRPTProxy m_crpt
 pointer to CRPT More...
 
Poco::SharedPtr< CRPTProxym_crpt_run
 used for fast ends More...
 
std::list
< boost::signals2::connection > 
m_crpt_signals
 
int m_run_number_digits
 
ISISDAEm_dae
 
LabviewXMLm_icp_config
 
bool m_simulation_mode
 
ISISDAE::DAEType m_dae_type
 
DAEstatus m_status
 
CRITICAL_SECTION m_crpt_cs
 
std::string m_comp_name
 
std::string m_recovery_file
 
Poco::Timer m_beam_current_timer
 
DAEreport_func_tm_report_func
 
HANDLE m_async_complete_event
 
volatile LONG m_num_async_requests
 
write_event_log_tm_event_log_func
 
Poco::Path m_inst_settings_dir
 
Poco::Util::Application * m_app
 
Poco::TaskManager m_taskmgr
 
ICPProgressHandler m_task_ph
 
Poco::Thread m_beamlog_thread
 
bool m_registersetranslator
 
NeXusWriter m_nxwriter
 
ICPEventWriter m_icpwriter
 
boost::signals2::signal< void(BSTR)> m_state_sig
 
ICPNotificationHandler m_nh
 
std::string m_icp_dir
 
std::string m_icp_service_dir
 
std::string m_data_dir
 
std::string m_log_dir
 
time_t m_icp_start_time
 
epics_thread_data_t m_epics_data
 
void * m_report_arg
 
bool m_shutdown_requested
 
recovery_map_t m_recovery_map
 
bool m_period_error
 
bool m_nexus_files
 produce a nexus file. If m_vms_raw_files is true, it is log only. If false, it has data too More...
 
bool m_vms_raw_files
 produce a VMS raw file More...
 
bool m_use_full_inst_name_for_files
 
unsigned m_icp_options
 
Poco::Net::HTTPServer * m_http_server
 
Poco::Net::ServerSocket * m_http_svs
 
- Protected Attributes inherited from ISIS::Base
Poco::Logger * m_logger
 
Poco::LogStream * m_logstr
 
Poco::Mutex m_logger_lock
 

Static Protected Attributes

static std::string m_instrument_xml_file = "c:\\data\\instrument.xml"
 
static std::string m_instrument_parameter_map_file = "c:\\data\\instrument_parameter_map.txt"
 

Private Member Functions

 ISISinstrumentControl ()
 

Detailed Description

Definition at line 60 of file ISISinstrumentControl.h.

Member Typedef Documentation

typedef std::map<std::string, std::string> ISISinstrumentControl::recovery_map_t
protected

Definition at line 111 of file ISISinstrumentControl.h.

typedef int(ISISinstrumentControl::* ISISinstrumentControl::xml_update_func_t)(const std::string &xml, DAEstatus &status)
protected

Definition at line 125 of file ISISinstrumentControl.h.

Member Enumeration Documentation

Enumerator
UserDetailsChanged 
BeamlineParamerersChanged 
SampleParametersChanged 

Definition at line 127 of file ISISinstrumentControl.h.

Enumerator
AutoSave 
PeriodSequenceAutoEnd 
PerCycleJournal 

Definition at line 118 of file ISISinstrumentControl.h.

Constructor & Destructor Documentation

ISISinstrumentControl::ISISinstrumentControl ( Poco::Util::Application *  pApp,
const std::string &  icp_service_dir,
DAEreport_func_t func = &DAEstatus::ostreamReportFunction,
write_event_log_t event_func = NULL,
void *  report_arg = &std::cerr 
)

Definition at line 122 of file ISISinstrumentControl.cpp.

References ISISDAE::addGoodEventCallback(), DAEstatus::addInfo(), DAEstatus::addInfoVa(), ISISCRPT_STRUCT::alert_email, CRPTProxy::assignLogFiles(), AutoSave, beamCurrentTimerCallback(), ISISDAE::check(), ISISCRPT_STRUCT::comp_name, ISISCRPT_STRUCT::compression_block_size, ISISCRPT_STRUCT::compression_level, CRPTProxy::CRPT(), ISISDAE::DAEType_desc, CRPTProxy::debugLog(), diffFileTimesInMilliSec(), ISISCRPT_STRUCT::epics_lastread_iso, ISISCRPT_STRUCT::epics_lastread_nano, exitProgram(), FAC_CRPT, FAC_DAE, DAEstatus::Failure, ISISCRPT_STRUCT::filetime, g_icp_clock, ICPClock::getCurrentTimeAsFiletime(), LabviewXML::getValue(), ICPNotificationHandler::handleNotification(), hash_line80, CRPTProxy::histogramEventsToCRPT(), ISISCRPT_STRUCT::icp_clock, ISISCRPT_STRUCT::icp_version, epics_thread_data_t::inst_name, ISISCRPT_STRUCT::inst_name, ISOtime(), CRPTProxy::isValid(), killDatasvr(), epics_thread_data_t::lastread_iso, epics_thread_data_t::lastread_nano, launchDatasvr(), loadCRPT(), LabviewXML::loadFromFile(), LOG_INFORMATION, logEventVa(), LOGSTR_INFORMATION, m_app, m_async_complete_event, m_beamlog_thread, m_comp_name, m_crpt, m_crpt_cs, m_crpt_run, m_crpt_signals, m_dae, m_dae_type, m_data_dir, m_epics_data, m_http_server, m_http_svs, m_icp_config, m_icp_dir, m_icp_options, m_icp_service_dir, m_icp_start_time, m_icpwriter, m_inst_settings_dir, m_log_dir, m_nexus_files, m_nh, m_nxwriter, m_recovery_file, m_registersetranslator, m_report_arg, m_report_func, m_run_number_digits, m_simulation_mode, m_status, m_task_ph, m_taskmgr, m_use_full_inst_name_for_files, m_vms_raw_files, muon_daes, ISISDAE::MuonDAE2, ISISDAE::MuonDAE3, ISISDAE::NeutronDAE2, ISISDAE::NeutronDAE3, NULL_TERMINATE, ICPProgressHandler::onFinished(), ICPProgressHandler::onProgress(), ISISDAE::open(), ISISDAE::openBackplane(), PerCycleJournal, ISISCRPT_STRUCT::perf_counter, PeriodSequenceAutoEnd, printComputerMemoryStats(), ISISCRPT_STRUCT::proc_freq, purecallHandler(), readBeamloggerBroadcast(), registerStructuredExceptionHandler(), DAEstatus::reportImmediately(), rerunFailedEnds(), DAEstatus::resetSeverityToAtMost(), epics_thread_data_t::run_number, ISISCRPT_STRUCT::run_number, ISISCRPT_STRUCT::run_status, RUNSTATUS_RUNNING, ISISCRPT_STRUCT::runStatusName(), se_get_errmsg(), se_set_period(), se_set_run_number(), se_start_epics_thread(), se_version(), ISISCRPT_STRUCT::setDAESpecificParameters(), CRPTProxy::setICPStartTime(), ISISCRPT_STRUCT::setInstName(), ISIS::Base::setLoggerName(), ICPClock::setParameters(), DAEstatus::setReportFunction(), NeXusWriter::setRunNumberDigits(), ISISDAE::setUAmpScale(), ICPEventWriter::setup(), setupDAE(), SEV_FATAL, SEV_WARNING, ISISRAW::size_check(), ISISCRPT_STRUCT::software_period, startDataCollection(), ISISDAE::startEventBroadcaster(), startEventWriter(), stopDataCollection(), ISISDAE::StopRunFast, DAEstatus::Success, ISISCRPT_STRUCT::uamp_scale, ICPCritical::unlock(), unregisterStructuredExceptionHandler(), updateThread(), and writeRecoveryFile().

ISISinstrumentControl::~ISISinstrumentControl ( )
virtual
ISISinstrumentControl::ISISinstrumentControl ( )
inlineprivate

Definition at line 382 of file ISISinstrumentControl.h.

Member Function Documentation

int ISISinstrumentControl::abortRun ( DAEstatus status)
int ISISinstrumentControl::allReportFunc ( const DAEstatus_message mess,
void *  arg 
)
static
int ISISinstrumentControl::allReportFuncMain ( const DAEstatus_message mess)
protected
void ISISinstrumentControl::beamCurrentTimerCallback ( Poco::Timer &  t)
protected

Definition at line 7540 of file ISISinstrumentControl.cpp.

Referenced by ISISinstrumentControl().

bool ISISinstrumentControl::beamOn ( int  minutes = 0) const
protected
int ISISinstrumentControl::beginRun ( DAEstatus status)

Definition at line 873 of file ISISinstrumentControl.cpp.

References beginRunMain(), and RCretry().

Referenced by _tmain(), and Cdae::beginRun().

int ISISinstrumentControl::beginRunEx ( bool  start_paused,
bool  delayed_start,
long  period,
DAEstatus status 
)

Definition at line 878 of file ISISinstrumentControl.cpp.

References beginRunMainEx(), and RCretry().

Referenced by Cdae::beginRunEx().

int ISISinstrumentControl::beginRunMain ( DAEstatus status)
protected

Definition at line 883 of file ISISinstrumentControl.cpp.

References beginRunMainEx().

Referenced by beginRun().

int ISISinstrumentControl::beginRunMainEx ( bool  start_paused,
bool  delayed_start,
long  period,
DAEstatus status 
)
protected

Definition at line 889 of file ISISinstrumentControl.cpp.

References DAEstatus::add(), DAEstatus::addInfoVa(), DAEstatus::addVa(), DAEstatus::addWarningVa(), ISISCRPT_STRUCT::auto_save_last, ISISDAE::clearCounters(), ISISCRPT_STRUCT::data_dae_table, ISISCRPT_STRUCT::detector_table, ISISCRPT_STRUCT::duration, ISISDAE::enableDelayedStart(), ERRTYPE_OUTOFMEM, FAC_CRPT, FAC_DAE, FAC_TCB, DAEstatus::Failure, ISISCRPT_STRUCT::filetime, flushCRPT(), RUNTABLE::fname, g_icp_clock, ISISCRPT_STRUCT::good_frames, ISISCRPT_STRUCT::good_ppp_high, ISISCRPT_STRUCT::good_ppp_low, ISISCRPT_STRUCT::good_uamph, RUNTABLE::hasFileChanged(), ISISCRPT_STRUCT::icp_clock, ICPTimer::info(), ISISCRPT_STRUCT::isInitialised(), ISISCRPT_MAX_PERIOD, ISISCRPT_NUM_VETOS, ISISCRPT_STRUCT::Monitoring::last_gf, ISISCRPT_STRUCT::Monitoring::last_tc, ISISCRPT_STRUCT::Monitoring::last_ua, logEvent(), LOGSTR_DEBUG, m_crpt, m_crpt_cs, m_dae, m_icpwriter, m_period_error, m_run_number_digits, ISISCRPT_STRUCT::monitoring, ISISCRPT_STRUCT::nper, ISISCRPT_STRUCT::nper_daq, ISISCRPT_STRUCT::nperseq, ISISCRPT_STRUCT::ntrg, DAEstatus::OK(), padWithZeros(), ISISCRPT_STRUCT::perf_counter, ISISCRPT_STRUCT::period, ISISCRPT_STRUCT::period_type, ISISDAE::PeriodTypeSoftware, ISISCRPT_STRUCT::proc_freq, refreshCachedValues(), DAEstatus::result(), ISISCRPT_STRUCT::resume_time, ISISCRPT_STRUCT::run_number, ISISCRPT_STRUCT::run_status, runPostCommand(), RUNSTATUS_PAUSED, RUNSTATUS_RUNNING, RUNSTATUS_SETUP, RUNSTATUS_WAITING, ISISCRPT_STRUCT::se_status, SESTATUS_INRANGE, setRunStatusImp(), setupDAE(), SEV_ERROR, ISISCRPT_STRUCT::software_period, ISISCRPT_STRUCT::spectra_table, ICPEventWriter::start(), ISISCRPT_STRUCT::start_time, startDataCollection(), startEventWriter(), ISISCRPT_STRUCT::stop_time, ISISCRPT_STRUCT::tables_valid, tcbcalc(), TCBRANGE_FILE, ISISCRPT_STRUCT::tcr, ISISCRPT_STRUCT::total_frames, ISISCRPT_STRUCT::total_ppp_high, ISISCRPT_STRUCT::total_ppp_low, ISISCRPT_STRUCT::total_uamph, ISISCRPT_STRUCT::update_good_frames, ISISCRPT_STRUCT::update_good_uamph, ISISCRPT_STRUCT::update_num_polls, ISISCRPT_STRUCT::update_raw_frames, ISISCRPT_STRUCT::update_raw_uamph, ISISCRPT_STRUCT::update_total_counts, updateCycle(), ISISCRPT_STRUCT::vetos, ISISCRPT_STRUCT::wiring_table, zeroCRPTRawData(), and zeroCRPTRunRawData().

Referenced by beginRunEx(), and beginRunMain().

int ISISinstrumentControl::changeNumberOfSoftwarePeriods ( long  nperiod,
DAEstatus status 
)
int ISISinstrumentControl::changePeriod ( int  period,
DAEstatus status 
)
int ISISinstrumentControl::changePeriodWhileRunning ( int  period,
bool  pause_first,
DAEstatus status 
)
int ISISinstrumentControl::changeUpdateSettingsXML ( const std::string &  update_xml,
DAEstatus status 
)
int ISISinstrumentControl::checkForNoncountingDetectors ( const CRPTProxy crpt,
DAEstatus dstatus 
)
protected
int ISISinstrumentControl::checkTestPattern ( unsigned long  pattern,
DAEstatus status 
)
int ISISinstrumentControl::createLastrunFile ( const CRPTProxy crpt,
DAEstatus status 
)
int ISISinstrumentControl::debugReportFunction ( const DAEstatus_message mess,
void *  arg 
)
static
int ISISinstrumentControl::doneAsync ( )

called by async worker thread when it has completed its work

Definition at line 5830 of file ISISinstrumentControl.cpp.

References m_async_complete_event, and m_num_async_requests.

Referenced by writeISISRAWthread().

int ISISinstrumentControl::endRun ( DAEstatus status)

Definition at line 1912 of file ISISinstrumentControl.cpp.

References endRunMain(), and RCretry().

Referenced by Cdae::endRun(), and updateFunc().

int ISISinstrumentControl::endRunMain ( DAEstatus status)
protected
int ISISinstrumentControl::endRunTask ( Poco::SharedPtr< CRPTProxy crpt,
NeXusWriter nxwriter,
bool  keep_raw_events,
bool  keep_crpt,
const std::string  events_nxfile,
DAEstatus status 
)
protected
int ISISinstrumentControl::endSEWait ( DAEstatus dstatus)
int ISISinstrumentControl::evaluateExpression ( std::map< std::string, double > &  values,
const std::string &  expression,
double &  result,
DAEstatus status 
)
protected
int ISISinstrumentControl::exitProgram ( const std::string &  message,
bool  prompt 
)
int ISISinstrumentControl::fillWithTestPattern ( unsigned long  pattern,
DAEstatus status 
)
void ISISinstrumentControl::fireOnRunStateChange ( const char *  state)

Definition at line 7426 of file ISISinstrumentControl.cpp.

References m_state_sig.

int ISISinstrumentControl::flushCRPT ( DAEstatus status,
bool  flush_raw_data = false 
)
protected
float ISISinstrumentControl::getBeamCurrent ( DAEstatus status)

Definition at line 3775 of file ISISinstrumentControl.cpp.

References ISISCRPT_STRUCT::beam_current, and m_crpt.

int ISISinstrumentControl::getCharItem ( const char *  item_name,
std::string &  cvalue,
DAEstatus status 
)

Definition at line 5955 of file ISISinstrumentControl.cpp.

References ISISCRPT_STRUCT::getCharItem(), and m_crpt.

Referenced by Cdae::getValueMain().

float ISISinstrumentControl::getCountRate ( DAEstatus status)

Definition at line 5657 of file ISISinstrumentControl.cpp.

References ISISCRPT_STRUCT::count_rate, and m_crpt.

int ISISinstrumentControl::getCRPTSpectrumIntegral ( long  spec_no,
long  period,
float  t_low,
float  t_high,
long &  integral,
long &  max_val,
DAEstatus status 
)
int ISISinstrumentControl::getCRPTSpectrumIntegral ( long  n,
const long  spec_no[],
long  period,
const float  t_low[],
const float  t_high[],
long  integral[],
long  max_val[],
DAEstatus status 
)
int ISISinstrumentControl::getCRPTSpectrumIntegral ( long  spec_start,
int  nspectra,
long  period,
float  t_low,
float  t_high,
long  integral[],
long  max_val[],
DAEstatus status 
)

Definition at line 4854 of file ISISinstrumentControl.cpp.

References getCRPTSpectrumIntegral(), and DAEstatus::result().

int ISISinstrumentControl::getCRPTSpectrumIntegral ( long  spec_start,
int  nspectra,
long  period,
long  integral[],
DAEstatus status 
)
Todo:
not ready yet? called on sans2d with histograms, so need to be careful

Definition at line 4932 of file ISISinstrumentControl.cpp.

References getDAQPeriod(), ISISCRPT_STRUCT::getNumSpectra(), ISISCRPT_STRUCT::isEventSpectrum(), m_crpt, m_crpt_cs, DAEstatus::result(), and CRPTProxy::spectrumIntegrals().

int ISISinstrumentControl::getCurrentPeriodGoodFrames ( DAEstatus status)
float ISISinstrumentControl::getCurrentPeriodGoodUAmpH ( DAEstatus status)
int ISISinstrumentControl::getCurrentPeriodNumber ( int &  period,
int &  daq_period,
DAEstatus status 
)
int ISISinstrumentControl::getCurrentPeriodRawFrames ( DAEstatus status)
float ISISinstrumentControl::getCurrentPeriodRawUAmpH ( DAEstatus status)
int ISISinstrumentControl::getDAEsettingsXML ( const std::string &  dae_xml_in,
std::string &  dae_xml_out,
DAEstatus status 
)
int ISISinstrumentControl::getDAQPeriod ( int  period,
DAEstatus status 
)
protected
float ISISinstrumentControl::getDuration ( DAEstatus status)
int ISISinstrumentControl::getFramesAllPeriods ( long *  good_frames,
long *  raw_frames,
int  n,
DAEstatus status 
)
int ISISinstrumentControl::getGoodFrames ( DAEstatus status)
float ISISinstrumentControl::getGoodUAmpH ( DAEstatus status)
int ISISinstrumentControl::getHardwarePeriodsXML ( const std::string &  periods_xml_in,
std::string &  periods_xml_out,
DAEstatus status 
)
int ISISinstrumentControl::getIntArrayItem ( const char *  item_name,
long *  larray,
DAEstatus status 
)
int ISISinstrumentControl::getIntArrayItem ( const char *  item_name,
long *  spec_array,
int  nspec,
long *  larray,
DAEstatus status 
)
int ISISinstrumentControl::getIntArrayItemSize ( const char *  item_name,
int *  dims_array,
int &  ndims,
DAEstatus status 
)
int ISISinstrumentControl::getIntItem ( const char *  item_name,
long &  lVal,
DAEstatus status 
)
int ISISinstrumentControl::getIntItem ( const char *  item_name,
long *  spec_array,
int  nspec,
long *  lVal,
DAEstatus status 
)

Definition at line 5965 of file ISISinstrumentControl.cpp.

References ISISCRPT_STRUCT::getIntItem(), and m_crpt.

int ISISinstrumentControl::getMEvents ( double &  mevents,
DAEstatus status 
)

Definition at line 5608 of file ISISinstrumentControl.cpp.

References getTotalCounts(), and DAEstatus::result().

Referenced by Cdae::getMEvents().

int ISISinstrumentControl::getMEventsPeriod ( double &  mevents,
int  period,
DAEstatus status 
)
int ISISinstrumentControl::getMonitoringXML ( const std::string &  monitor_xml_in,
std::string &  monitor_xml_out,
DAEstatus status 
)
int ISISinstrumentControl::getMonitorIntegral ( long  monitor,
long  period,
float  t_low,
float  t_high,
long &  integral,
DAEstatus status 
)
int ISISinstrumentControl::getMonitorIntegral ( long  n,
const long  monitor[],
long  period,
const float  t_low[],
const float  t_high[],
long  integral[],
DAEstatus status 
)

Definition at line 5029 of file ISISinstrumentControl.cpp.

References getMonitorIntegral().

int ISISinstrumentControl::getNPRatio ( float *  current,
float *  average,
DAEstatus status 
)
int ISISinstrumentControl::getNumberOfPeriods ( DAEstatus status)
int ISISinstrumentControl::getNumberOfSpectra ( DAEstatus status)

Definition at line 4834 of file ISISinstrumentControl.cpp.

References ISISCRPT_STRUCT::getNumSpectra(), and m_crpt.

Referenced by Cdae::getSpectraSum().

int ISISinstrumentControl::getNumberOfTimeChannels ( int  spectrum,
DAEstatus status 
)

Definition at line 4823 of file ISISinstrumentControl.cpp.

References m_crpt, and ISISCRPT_STRUCT::spectrumNTC().

Referenced by Cdae::getSpectrum().

int ISISinstrumentControl::getOptions ( std::string &  options_xml,
DAEstatus status 
)
float ISISinstrumentControl::getPeriodDuration ( DAEstatus status)
int ISISinstrumentControl::getPollTime ( ) const
inline

Definition at line 258 of file ISISinstrumentControl.h.

References m_crpt, and ISISCRPT_STRUCT::update_poll_time.

Referenced by updateThread().

std::string ISISinstrumentControl::getPostCommandLogName ( )
protected

Definition at line 7438 of file ISISinstrumentControl.cpp.

References m_log_dir.

Referenced by runPostCommand(), and setupDAE().

std::string ISISinstrumentControl::getProcessName ( DWORD  processID)
staticprotected

Definition at line 2688 of file ISISinstrumentControl.cpp.

Referenced by killProcess().

int ISISinstrumentControl::getRawFrames ( DAEstatus status)
float ISISinstrumentControl::getRawUAmpH ( DAEstatus status)

Definition at line 4552 of file ISISinstrumentControl.cpp.

References ISISDAE::getRawUAmpHours(), m_crpt_cs, and m_dae.

Referenced by updateFunc().

int ISISinstrumentControl::getRealArrayItem ( const char *  item_name,
double *  darray,
DAEstatus status 
)
int ISISinstrumentControl::getRealArrayItem ( const char *  item_name,
long *  spec_array,
int  nspec,
double *  darray,
DAEstatus status 
)
int ISISinstrumentControl::getRealArrayItemSize ( const char *  item_name,
int *  dims_array,
int &  ndims,
DAEstatus status 
)
int ISISinstrumentControl::getRealItem ( const char *  item_name,
double &  dblVal,
DAEstatus status 
)
int ISISinstrumentControl::getRealItem ( const char *  item_name,
long *  spec_array,
int  nspec,
double *  dblVal,
DAEstatus status 
)

Definition at line 5975 of file ISISinstrumentControl.cpp.

References ISISCRPT_STRUCT::getRealItem(), and m_crpt.

int ISISinstrumentControl::getRunNumber ( )

Definition at line 1154 of file ISISinstrumentControl.cpp.

References m_crpt, and ISISCRPT_STRUCT::run_number.

Referenced by Cdae::getRunNumber().

int ISISinstrumentControl::getRunState ( )

Definition at line 1149 of file ISISinstrumentControl.cpp.

References m_crpt, and ISISCRPT_STRUCT::run_status.

Referenced by Cdae::getRunState().

int ISISinstrumentControl::getSE ( const CRPTProxy crpt,
seblock_map_t blocks,
DAEstatus dstatus 
)
static
int ISISinstrumentControl::getSpectrum ( long  spectrum_number,
long  period,
double *  time_array,
double *  signal_array,
double *  error_array,
bool  as_histogram,
bool  as_distribution,
long &  sum,
DAEstatus status 
)
int ISISinstrumentControl::getSpectrumIntegral ( long  spec_no,
long  period,
float  t_low,
float  t_high,
long &  integral,
long &  max_val,
DAEstatus status 
)
int ISISinstrumentControl::getSpectrumIntegral ( long  n,
const long  spec_no[],
long  period,
const float  t_low[],
const float  t_high[],
long  integral[],
long  max_val[],
DAEstatus status 
)
int ISISinstrumentControl::getSpectrumNumbersForTimeRegime ( long  tr,
long &  spec_min,
long &  spec_max,
DAEstatus status 
)
DAEstatus& ISISinstrumentControl::getStatusReporter ( )
inline

Definition at line 134 of file ISISinstrumentControl.h.

References m_status.

Referenced by updateThread().

int ISISinstrumentControl::getTCBXML ( const std::string &  tcb_xml_in,
std::string &  tcb_xml_out,
DAEstatus status 
)
int ISISinstrumentControl::getTotalCounts ( int64_t &  counts,
DAEstatus status 
)
int ISISinstrumentControl::getUAmpHAllPeriods ( float *  good_uamph,
float *  raw_uamph,
int  n,
DAEstatus status 
)
int ISISinstrumentControl::getUpdateSettingsXML ( const std::string &  update_xml_in,
std::string &  update_xml_out,
DAEstatus status 
)
int ISISinstrumentControl::getVetoStatus ( std::string &  veto_text,
DAEstatus status 
)
int ISISinstrumentControl::importCRPT ( const char *  filename,
DAEstatus dstatus 
)
bool ISISinstrumentControl::isFinalSequenceComplete ( DAEstatus status)

Definition at line 7512 of file ISISinstrumentControl.cpp.

References ISISDAE::isFinalSequenceComplete(), and m_dae.

Referenced by Cdae::isFinalSequenceComplete().

int ISISinstrumentControl::ISOtime ( time_t  time,
char *  buffer,
int  len 
)
static
int ISISinstrumentControl::ISOtime ( const struct timeb &  tb,
char *  buffer,
int  len 
)
static

Definition at line 4460 of file ISISinstrumentControl.cpp.

References ISOtime().

bool ISISinstrumentControl::isRunning ( )
bool ISISinstrumentControl::isWaiting ( )
int ISISinstrumentControl::killDatasvr ( DAEstatus dstatus)
protected

Definition at line 2243 of file ISISinstrumentControl.cpp.

References killProcess(), and DAEstatus::result().

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

int ISISinstrumentControl::killProcess ( const char *  process_name,
DAEstatus dstatus 
)
staticprotected

Definition at line 2652 of file ISISinstrumentControl.cpp.

References getProcessName().

Referenced by killDatasvr().

HANDLE ISISinstrumentControl::launchDatasvr ( DAEstatus dstatus)
protected

Definition at line 2249 of file ISISinstrumentControl.cpp.

References m_icp_service_dir, and spawnCommand().

Referenced by ISISinstrumentControl().

int ISISinstrumentControl::loadCRPT ( )
protected
int ISISinstrumentControl::loadCRPTWithHistogrammedEvents ( CRPTProxy crpt,
DAEstatus dstatus 
)
staticprotected
int ISISinstrumentControl::loadDAEWithData ( const std::string &  file_name,
long  options,
DAEstatus status 
)
int ISISinstrumentControl::loadDAEWithNeXusData ( const std::string &  file_name,
long  options,
DAEstatus status 
)
protected
int ISISinstrumentControl::logEvent ( time_t  the_time,
const CRPTProxy crpt,
const std::string &  event,
DAEstatus status 
)
staticprotected
int ISISinstrumentControl::logEvent ( const CRPTProxy crpt,
const std::string &  event,
DAEstatus status 
)
staticprotected

Definition at line 4430 of file ISISinstrumentControl.cpp.

References logEvent().

int ISISinstrumentControl::logEventVa ( time_t  the_time,
const CRPTProxy crpt,
DAEstatus status,
const char *  event,
  ... 
)
staticprotected
int ISISinstrumentControl::logEventVa ( const CRPTProxy crpt,
DAEstatus status,
const char *  event,
  ... 
)
staticprotected

Definition at line 4404 of file ISISinstrumentControl.cpp.

References logEventVaImp().

int ISISinstrumentControl::logEventVaImp ( time_t  the_time,
const CRPTProxy crpt,
DAEstatus status,
const char *  event,
va_list  ap 
)
staticprotected

Definition at line 4422 of file ISISinstrumentControl.cpp.

References logEvent(), and NULL_TERMINATE.

Referenced by logEventVa().

bool ISISinstrumentControl::muonKickerOK ( ) const
protected

Definition at line 2507 of file ISISinstrumentControl.cpp.

References ISISCRPT_STRUCT::beamlogger, m_crpt, and beamlogger_t::muonkicker.

Referenced by updateFunc().

int ISISinstrumentControl::notifyICP ( long  event_id,
const char *  param,
DAEstatus status 
)
int ISISinstrumentControl::pausePeriod ( PERIOD p)
protected
int ISISinstrumentControl::pauseRun ( DAEstatus status)

Definition at line 1513 of file ISISinstrumentControl.cpp.

References pauseRunMain().

Referenced by Cdae::pauseRun().

int ISISinstrumentControl::pauseRunMain ( bool  refresh_cache,
DAEstatus dstatus 
)
protected
int ISISinstrumentControl::prettyTime ( time_t  time,
char *  buffer,
int  len 
)
static

Definition at line 4487 of file ISISinstrumentControl.cpp.

References DAEstatus::Success.

Referenced by prettyTime(), and updateStatusXML().

int ISISinstrumentControl::prettyTime ( const struct timeb &  tb,
char *  buffer,
int  len 
)
static

Definition at line 4482 of file ISISinstrumentControl.cpp.

References prettyTime().

std::ostream & ISISinstrumentControl::printStatus ( std::ostream &  os,
DAEstatus dstatus 
)

Definition at line 5681 of file ISISinstrumentControl.cpp.

References m_dae, and ISISDAE::printStatus().

Referenced by Cdae::dumpDebugInfo().

void ISISinstrumentControl::purecallHandler ( )
staticprotected

Definition at line 93 of file ISISinstrumentControl.cpp.

Referenced by ISISinstrumentControl().

int ISISinstrumentControl::RCretry ( const char *  name,
boost::function< int(ISISinstrumentControl *, DAEstatus &)>  func,
DAEstatus status 
)
protected
void ISISinstrumentControl::readBeamloggerBroadcast ( )
protected
int ISISinstrumentControl::readDataDaeTable ( const char *  filename,
DAEstatus status 
)
protected
int ISISinstrumentControl::readDetectorTable ( const char *  filename,
DAEstatus status 
)
protected
int ISISinstrumentControl::readISISRAW ( const char *  filename,
DAEstatus dstatus 
)
int ISISinstrumentControl::readLogFile ( const char *  filename)
protected
int ISISinstrumentControl::readRecoveryFile ( DAEstatus dstatus)
protected
int ISISinstrumentControl::readSpectraTable ( const char *  filename,
DAEstatus status 
)
protected
int ISISinstrumentControl::readTables ( const char *  wiring,
const char *  detector,
const char *  spectra,
DAEstatus status 
)
int ISISinstrumentControl::readWiringTable ( const char *  filename,
DAEstatus status 
)
protected
int ISISinstrumentControl::refreshCachedValues ( DAEstatus status)
boost::signals2::connection ISISinstrumentControl::registerOnRunStateChange ( boost::function< void(BSTR)>  func)

Definition at line 7421 of file ISISinstrumentControl.cpp.

References m_state_sig.

_se_translator_function ISISinstrumentControl::registerStructuredExceptionHandler ( )
int ISISinstrumentControl::replaceSEparameters ( std::string &  s,
const seblock_map_t se_blocks,
DAEstatus status 
)
staticprotected

Definition at line 6294 of file ISISinstrumentControl.cpp.

References DAEstatus::Success.

Referenced by setRealParameter(), and setStringParameter().

int ISISinstrumentControl::requestEndRunAfterNextSequenceCompletes ( DAEstatus status)
void ISISinstrumentControl::rerunFailedEnds ( )
protected
int ISISinstrumentControl::resumeRun ( DAEstatus status)
int ISISinstrumentControl::RIO ( isis32_t  bus_addr,
isisU16_t word,
DAEstatus status 
)
int ISISinstrumentControl::runPostCommand ( const char *  property_name,
const std::string &  arg,
DAEstatus status 
)
protected
int ISISinstrumentControl::saveCRPTToFile ( const CRPTProxy crpt,
const std::string &  raw_filename,
const std::string &  nexus_filename,
const seblock_map_t blocks,
const std::string &  events_nxfile,
DAEstatus dstatus 
)
int ISISinstrumentControl::saveRun ( DAEstatus status)
int ISISinstrumentControl::sendNagios ( int  status,
const std::string &  service,
const std::string &  message,
DAEstatus dstatus 
)
protected
int ISISinstrumentControl::setBeamlineParameters ( const string_table_t table,
DAEstatus status 
)
int ISISinstrumentControl::setBlockTable ( const string_table_t table,
DAEstatus status 
)

Definition at line 6487 of file ISISinstrumentControl.cpp.

References DAEstatus::Success.

Referenced by Cdae::setBlocksTable().

int ISISinstrumentControl::setLinearTimeChannelRange ( int  range_number,
float  start,
float  end,
float  step,
DAEstatus status 
)

Definition at line 3743 of file ISISinstrumentControl.cpp.

References setTimeChannelRange(), and TCBRANGE_CONST_T.

Referenced by _tmain().

int ISISinstrumentControl::setLogTimeChannelRange ( int  range_number,
float  start,
float  end,
float  step,
DAEstatus status 
)

Definition at line 3748 of file ISISinstrumentControl.cpp.

References setTimeChannelRange(), and TCBRANGE_INC_T.

int ISISinstrumentControl::setOptions ( const std::string &  options_xml,
DAEstatus status 
)
void ISISinstrumentControl::seTransFunction ( unsigned int  u,
EXCEPTION_POINTERS *  pExp 
)
staticprotected

Definition at line 88 of file ISISinstrumentControl.cpp.

Referenced by registerStructuredExceptionHandler().

int ISISinstrumentControl::setRealParameter ( const CRPTProxy::parameter_map_t params,
const seblock_map_t se_blocks,
const char *  name,
float &  crpt_target,
DAEstatus status 
)
staticprotected
int ISISinstrumentControl::setRunNumber ( long  number,
DAEstatus status 
)
inline
int ISISinstrumentControl::setRunStatus ( long  number,
DAEstatus status 
)
inline

Definition at line 233 of file ISISinstrumentControl.h.

References logEvent(), m_crpt, m_crpt_cs, and setRunStatusImp().

Referenced by Cdae::setICPValueLong().

int ISISinstrumentControl::setRunStatusImp ( long  number,
bool  is_start,
DAEstatus status 
)
protected
int ISISinstrumentControl::setSampleParameters ( const string_table_t table,
DAEstatus status 
)
int ISISinstrumentControl::setStringParameter ( const CRPTProxy::parameter_map_t params,
const seblock_map_t se_blocks,
const char *  name,
char *  crpt_target,
int  size_crpt_target,
bool  null_terminate,
DAEstatus status 
)
staticprotected
int ISISinstrumentControl::setTimeChannelRange ( int  range_number,
int  range_type,
float  start,
float  end,
float  step,
DAEstatus status 
)
protected
int ISISinstrumentControl::setupDAE ( int  tables_only,
DAEstatus dstatus 
)
protected

Definition at line 1213 of file ISISinstrumentControl.cpp.

References DAEstatus::add(), DAEstatus::addInfo(), DAEstatus::addInfoVa(), DAEstatus::addVa(), DAEstatus::addWarningVa(), changePeriod(), ISISDAE::clearCounters(), ISISDAE::clearDCEventMode(), ISISDAE::clearHistogramMemory(), ISISCRPT_STRUCT::clock_frequency, ISISCRPT_STRUCT::crat, data_dae_t::crate, DAE2CardPolicy::CRATE_MOD, ISISCRPT_STRUCT::daeTR(), ISISCRPT_STRUCT::data_dae, ISISCRPT_STRUCT::det_mode, ISISDAE::disablePeriodCard(), ISISCRPT_STRUCT::electronics_delay, ERRTYPE_OUTOFMEM, Ext0Veto, Ext1Veto, Ext2Veto, Ext3Veto, FAC_CRPT, FAC_DAE, DAEstatus::Failure, ISISCRPT_STRUCT::fermi_chopper_delay, ISISCRPT_STRUCT::fermi_chopper_width, FermiChopperVeto0, ISISCRPT_STRUCT::fullTR(), ISISDAE::getExternalResetCommands(), ISISCRPT_STRUCT::getPeriodSize(), getPostCommandLogName(), ISISCRPT_STRUCT::isEventTR(), ISIS50HzVeto, ISISCRPT_MAX_NTRG, ISISCRPT_MAX_PERIOD, ISISDAE_MAX_DAE2TIMECHAN, m_crpt, m_dae, ISISCRPT_STRUCT::modn, ISISCRPT_STRUCT::mpos, ISISCRPT_STRUCT::muon_cerenkov_pulse, ISISCRPT_STRUCT::n_data_dae, ISISCRPT_STRUCT::ndet, ISISCRPT_STRUCT::nper, ISISCRPT_STRUCT::nper_daq, ISISCRPT_STRUCT::nperseq_request, ISISCRPT_STRUCT::ntc, ISISCRPT_STRUCT::ntrg, ISISCRPT_STRUCT::period, ISISCRPT_STRUCT::period_output_delay, ISISCRPT_STRUCT::period_type, ISISDAE::PeriodTypeSoftware, ISISDAE::programDAE1POSLUT(), ISISDAE::programPeriodCard(), CRPTProxy::rawDataSizeMax(), ISISDAE::resetRunController(), ISISDAE::setDAE1Vetos(), ISISDAE::setDCCardMode(), ISISDAE::setDCEventMode(), ISISDAE::setDCFrameSyncDelay(), ISISDAE::setEventMode(), ISISDAE::setFrameSync(), ISISDAE::setFrameSyncDelay(), ISISDAE::setPeriodType(), ISISDAE::setTimeChannels(), SEV_ERROR, SMPVeto, ISISCRPT_STRUCT::software_period, spawnCommand(), ISISCRPT_STRUCT::spec, ISISDAE::stopRun(), ISISDAE::StopRunFast, DAEstatus::Success, ISISCRPT_STRUCT::tcb, ISISCRPT_STRUCT::tcb_delay, ISISCRPT_STRUCT::tcb_pulse_generator, ISISCRPT_STRUCT::tcb_sync, ISISCRPT_STRUCT::tcb_trdelay, ISISCRPT_STRUCT::timr_crpt, ISISCRPT_STRUCT::timr_dae, ISISCRPT_STRUCT::timr_file, data_dae_t::tr, TS2PulseVeto, ISISCRPT_STRUCT::udet, updateSpecmapsFromDAE(), and ISISCRPT_STRUCT::vetos.

Referenced by beginRunMainEx(), and ISISinstrumentControl().

int ISISinstrumentControl::setUserParameters ( long  rbno,
const string_table_t table,
DAEstatus status 
)
int ISISinstrumentControl::setVeto ( const std::string &  name,
long  enable,
DAEstatus status 
)

Definition at line 7309 of file ISISinstrumentControl.cpp.

References m_crpt_cs, m_dae, DAEstatus::result(), and ISISDAE::setVeto().

Referenced by Cdae::setVeto().

bool ISISinstrumentControl::shutdownRequested ( )
inline

Definition at line 236 of file ISISinstrumentControl.h.

References m_shutdown_requested.

Referenced by updateThread().

int ISISinstrumentControl::snapshotCRPT ( const char *  filename,
bool  do_update,
bool  do_pause,
DAEstatus status 
)
int ISISinstrumentControl::spawnCommand ( const std::string &  program,
const std::string &  args,
bool  use_cmd_exe,
bool  console,
HANDLE *  suspended_thread_handle,
const std::string &  std_in_file,
const std::string &  std_out_file,
const std::string &  std_error_file,
int  wait_time,
DAEstatus dstatus 
)
staticprotected
int ISISinstrumentControl::sqliteReportFunction ( const DAEstatus_message mess,
void *  arg 
)
static
int ISISinstrumentControl::startDataCollection ( bool  clear_counters,
DAEstatus status 
)
protected
int ISISinstrumentControl::startEventWriter ( DAEstatus status)
protected

Definition at line 1117 of file ISISinstrumentControl.cpp.

Referenced by beginRunMainEx(), and ISISinstrumentControl().

int ISISinstrumentControl::startSEWait ( DAEstatus dstatus)
int ISISinstrumentControl::stopDataCollection ( ISISDAE::StopRunMode  mode,
DAEstatus status 
)
protected

Definition at line 756 of file ISISinstrumentControl.cpp.

References DAEstatus::addInfoVa(), ISISDAE::disableDelayedStart(), PERIOD::duration, ISISCRPT_STRUCT::duration, Ext0Veto, Ext1Veto, Ext2Veto, Ext3Veto, FAC_DAE, FIFOVeto, getCurrentPeriodNumber(), ISISDAE::getCurrentPeriodSequence(), ISISDAE::getExternalVetoedFrames(), ISISDAE::getFIFOVetoedFrames(), ISISDAE::getGoodFrames(), ISISDAE::getGoodFramesPeriod(), ISISDAE::getGoodPPPLower(), ISISDAE::getGoodPPPUpper(), ISISDAE::getGoodUAmpHours(), ISISDAE::getGoodUAmpHoursPeriod(), ISISDAE::getISIS50HzVetoedFrames(), ISISDAE::getMSModeVetoedFrames(), ISISDAE::getRawFrames(), ISISDAE::getRawFramesPeriod(), ISISDAE::getRawPPPLower(), ISISDAE::getRawPPPUpper(), ISISDAE::getRawUAmpHours(), ISISDAE::getRawUAmpHoursPeriod(), ISISDAE::getSMPVetoedFrames(), ISISDAE::getTS2PulseVetoedFrames(), PERIOD::good_frames, ISISCRPT_STRUCT::good_frames, ISISCRPT_STRUCT::good_ppp_high, ISISCRPT_STRUCT::good_ppp_low, PERIOD::good_uamph, ISISCRPT_STRUCT::good_uamph, ICPTimer::info(), ISIS50HzVeto, logEventVa(), LOGSTR_DEBUG, m_crpt, m_crpt_cs, m_dae, MSModeVeto, ISISCRPT_STRUCT::nper, ISISCRPT_STRUCT::nperseq, ISISCRPT_STRUCT::period, ISISCRPT_STRUCT::period_type, ISISDAE::PeriodTypeSoftware, ISISCRPT_STRUCT::resume_time, SMPVeto, PERIOD::stop_time, ISISCRPT_STRUCT::stop_time, ISISDAE::stopRun(), PERIOD::total_frames, ISISCRPT_STRUCT::total_frames, ISISCRPT_STRUCT::total_ppp_high, ISISCRPT_STRUCT::total_ppp_low, PERIOD::total_uamph, ISISCRPT_STRUCT::total_uamph, TS2PulseVeto, and ISISCRPT_STRUCT::vetos.

Referenced by abortRun(), endRunMain(), ISISinstrumentControl(), pauseRunMain(), startSEWait(), and updateCRPTWithDAE().

int ISISinstrumentControl::stopEventWriter ( bool  wait,
DAEstatus status 
)
protected

Definition at line 1132 of file ISISinstrumentControl.cpp.

Referenced by endRunMain().

int ISISinstrumentControl::storeCRPT ( DAEstatus status)

Definition at line 1862 of file ISISinstrumentControl.cpp.

References m_crpt, and m_crpt_cs.

Referenced by saveRun(), and Cdae::storeCRPT().

int ISISinstrumentControl::storeCRPT ( CRPTProxy crpt,
DAEstatus status 
)
int ISISinstrumentControl::stringTableToParameterMap ( const string_table_t string_table,
CRPTProxy::parameter_map_t param_map,
DAEstatus status 
)
staticprotected
int ISISinstrumentControl::sumAllHistogramMemory ( long &  counts,
DAEstatus status 
)
int ISISinstrumentControl::sumAllSpectra ( long &  counts,
long &  bin0_counts,
DAEstatus status 
)
int ISISinstrumentControl::tcbcalc ( DAEstatus status)
protected
void ISISinstrumentControl::unregisterStructuredExceptionHandler ( _se_translator_function  old_func)
int ISISinstrumentControl::updateBeamlineParameters ( const CRPTProxy::parameter_map_t beamline_parameters,
CRPTProxy crpt,
const seblock_map_t se_blocks,
DAEstatus status 
)
static
int ISISinstrumentControl::updateBeamlineParametersFromFile ( const char *  filename,
DAEstatus status 
)
staticprotected

Definition at line 6285 of file ISISinstrumentControl.cpp.

References DAEstatus::Failure, and updateParametersFromFile().

Referenced by notifyICP().

int ISISinstrumentControl::updateCRPTSpectra ( int  period,
long  spec_start,
int  nspectra,
DAEstatus status 
)
int ISISinstrumentControl::updateCRPTSpectra ( int  period,
long *  spectra_list,
int  nspectra,
DAEstatus status 
)
protected
int ISISinstrumentControl::updateCRPTSpectraAllPeriods ( long  spec_start,
int  nspectra,
DAEstatus status 
)
int ISISinstrumentControl::updateCRPTWithDAE ( CRPTProxy crpt,
bool  pause_collection,
DAEstatus status 
)
int ISISinstrumentControl::updateCRPTWithDAE ( bool  pause_collection,
DAEstatus status 
)

Definition at line 1652 of file ISISinstrumentControl.cpp.

References logEvent(), m_crpt, m_crpt_cs, and updateCRPTWithDAE().

static int ISISinstrumentControl::updateCRPTwithSE ( CRPTProxy crpt,
DAEstatus dstatus 
)
static
int ISISinstrumentControl::updateCRPTwithSE ( CRPTProxy crpt,
const seblock_map_t blocks,
DAEstatus dstatus 
)
static
int ISISinstrumentControl::updateCRPTWithSEandSaveToFile ( CRPTProxy crpt,
const std::string &  raw_filename,
const std::string &  nexus_filename,
DAEstatus dstatus 
)
int ISISinstrumentControl::updateCycle ( DAEstatus dstatus)
protected
int ISISinstrumentControl::updateDAEsettingsXML ( const std::string &  status_xml,
DAEstatus status 
)
int ISISinstrumentControl::updateFunc ( int  poll_time,
bool  only_refresh_cache 
)
protected

Definition at line 3782 of file ISISinstrumentControl.cpp.

References ISISCRPT_STRUCT::Monitoring::action, ISISCRPT_STRUCT::Monitoring::action_period, DAEstatus::addInfoVa(), ISISCRPT_STRUCT::alert_email, ISISCRPT_STRUCT::Monitoring::alerts, ISISCRPT_STRUCT::auto_save_last, ISISCRPT_STRUCT::auto_save_type, ISISCRPT_STRUCT::auto_save_value, AutoSave, ISISCRPT_STRUCT::beam_current, CRPTProxy::beamlineParameters(), ISISCRPT_STRUCT::beamlogger, beamOn(), ISISCRPT_STRUCT::Monitoring::calc_freq, ISISCRPT_STRUCT::Monitoring::calc_last_time, changePeriodWhileRunning(), ISISCRPT_STRUCT::comp_name, ISISCRPT_STRUCT::count_rate, nagios_t::dae_status, ISISCRPT_STRUCT::dae_type, PERIOD::duration, ISISCRPT_STRUCT::duration, ISISCRPT_STRUCT::Monitoring::enabled, endRun(), evaluateExpression(), ISISCRPT_STRUCT::Monitoring::expression, FAC_DAE, DAEstatus::Failure, flushCRPT(), getCRPTSpectrumIntegral(), getCurrentPeriodNumber(), ISISDAE::getCurrentPeriodSequence(), ISISDAE::getGoodFrames(), ISISDAE::getGoodFramesPeriod(), ISISDAE::getGoodPPPLower(), ISISDAE::getGoodPPPUpper(), getGoodUAmpH(), ISISDAE::getRawFrames(), ISISDAE::getRawFramesPeriod(), ISISDAE::getRawPPPLower(), ISISDAE::getRawPPPUpper(), getRawUAmpH(), getSpectrumIntegral(), getTotalCounts(), PERIOD::good_frames, ISISCRPT_STRUCT::good_frames, ISISDAE::isMultiplePeriodSequenceComplete(), isRunning(), CRPTProxy::isValid(), isWaiting(), monitoring_par::last_change, ISISCRPT_STRUCT::Monitoring::last_gf, ISISCRPT_STRUCT::Monitoring::last_tc, ISISCRPT_STRUCT::Monitoring::last_ua, monitoring_par::last_value, ISISCRPT_STRUCT::Monitoring::log_freq, ISISCRPT_STRUCT::Monitoring::log_last_time, logEventVa(), m_app, m_crpt, m_crpt_cs, m_dae, m_icp_dir, m_icp_options, m_status, ISISCRPT_STRUCT::monitor_range, ISISCRPT_STRUCT::monitor_spectrum, ISISCRPT_STRUCT::monitor_sum, ISISCRPT_STRUCT::monitoring, ISISDAE::MuonDAE2, beamlogger_t::muonkicker, muonKickerOK(), ISISCRPT_STRUCT::Monitoring::n, ISISCRPT_STRUCT::nagios, ISISCRPT_STRUCT::nper, ISISCRPT_STRUCT::period, ISISCRPT_STRUCT::period_type, PeriodSequenceAutoEnd, ISISDAE::PeriodTypeSoftware, ISISCRPT_STRUCT::resume_time, ISISCRPT_STRUCT::Monitoring::return_period, ISISCRPT_STRUCT::run_status, RUNSTATUS_SETUP, CRPTProxy::sampleParameters(), se_get_block_values(), se_get_errmsg(), sendEmail(), sendNagios(), sendSMS(), beamlogger_t::shutter, nagios_t::shutter_status, nagios_t::shutter_val, ISISCRPT_STRUCT::software_period, monitoring_par::spectrum, ISISCRPT_STRUCT::start_time, ISISCRPT_STRUCT::stop_time, DAEstatus::Success, monitoring_par::t_high, monitoring_par::t_low, PERIOD::total_frames, ISISCRPT_STRUCT::total_frames, ISISCRPT_STRUCT::update_duration, ISISCRPT_STRUCT::update_duration_period, ISISCRPT_STRUCT::update_good_frames, ISISCRPT_STRUCT::update_good_frames_period, ISISCRPT_STRUCT::update_good_ppp_high, ISISCRPT_STRUCT::update_good_ppp_low, ISISCRPT_STRUCT::update_good_uamph, ISISCRPT_STRUCT::update_npratio_average, ISISCRPT_STRUCT::update_npratio_current, ISISCRPT_STRUCT::update_num_polls, ISISCRPT_STRUCT::update_period, ISISCRPT_STRUCT::update_period_sequence, ISISCRPT_STRUCT::update_raw_frames, ISISCRPT_STRUCT::update_raw_frames_period, ISISCRPT_STRUCT::update_raw_uamph, ISISCRPT_STRUCT::update_time, ISISCRPT_STRUCT::update_total_counts, ISISCRPT_STRUCT::update_total_ppp_high, ISISCRPT_STRUCT::update_total_ppp_low, updateBeamlineParameters(), updateCRPTSpectra(), updateICPTimeDiffLog(), updateMonitoringLog(), updateSampleParameters(), updateStatusLog(), ISISCRPT_STRUCT::usingEventMode(), ISISCRPT_STRUCT::Monitoring::v, ISISCRPT_STRUCT::Monitoring::valid_high, nagios_t::veto_percent, nagios_t::wait_mins, nagios_t::wait_status, and writeAutosaveFile().

Referenced by refreshCachedValues(), and updateThread().

int ISISinstrumentControl::updateHardwarePeriodsXML ( const std::string &  periods_xml,
DAEstatus status 
)
void ISISinstrumentControl::updateICPTimeDiffLog ( )
protected
int ISISinstrumentControl::updateMonitoringLog ( )
protected
int ISISinstrumentControl::updateMonitoringXML ( const std::string &  monitor_xml,
DAEstatus status 
)
int ISISinstrumentControl::updateParametersFromFile ( CRPTProxy::parameter_map_t param_map,
const char *  filename,
DAEstatus status 
)
staticprotected
int ISISinstrumentControl::updateSampleParameters ( const CRPTProxy::parameter_map_t sample_parameters,
CRPTProxy crpt,
const seblock_map_t se_blocks,
DAEstatus status 
)
static
int ISISinstrumentControl::updateSampleParametersFromFile ( const char *  filename,
DAEstatus status 
)
staticprotected

Definition at line 6208 of file ISISinstrumentControl.cpp.

References DAEstatus::Failure, and updateParametersFromFile().

Referenced by notifyICP().

int ISISinstrumentControl::updateSampleXML ( const std::string &  sample_xml,
DAEstatus status 
)
int ISISinstrumentControl::updateSpecmapsFromDAE ( const std::map< int, int > &  trcn,
DAEstatus status 
)
protected
int ISISinstrumentControl::updateStatusLog ( )
protected
int ISISinstrumentControl::updateStatusXML ( std::string &  status_xml,
DAEstatus status 
)

time_t now; time(&now); time_t this_dur = (now - m_crpt->resume_time);

isisU32_t igf, irf; m_dae->getGoodFrames(&igf, status); m_dae->getRawFrames(&irf, status); lvxml.setValue("GoodFramesTotal", igf, status); lvxml.setValue("RawFramesTotal", irf, status);

int period, daq_period; getCurrentPeriodNumber(period, daq_period, status);

m_dae->getCurrentPeriodSequence(&value32, status); lvxml.setValue("PeriodSequence", value32, status);

Definition at line 4613 of file ISISinstrumentControl.cpp.

References DAEstatus::add(), ISISCRPT_STRUCT::beam_current, ISISCRPT_STRUCT::count_rate, PERIOD::duration, ISISCRPT_STRUCT::duration, ERRTYPE_OUTOFMEM, ISISCRPT_STRUCT::eventModeCardFraction(), FAC_DAE, ISISDAE::getGoodFramesPeriod(), ISISCRPT_STRUCT::getNumSpectra(), ISISCRPT_STRUCT::getPeriodSize(), ISISDAE::getRawFramesPeriod(), PERIOD::good_frames, ISISCRPT_STRUCT::good_frames, ISISCRPT_STRUCT::inst_name, ISISCRPT_STRUCT::isis_cycle, isRunning(), CRPTProxy::isValid(), PERIOD::label, LabviewXML::loadFromString(), ISISCRPT_STRUCT::local_contact, ISISCRPT_STRUCT::long_title, m_crpt, m_crpt_cs, m_dae, m_run_number_digits, m_simulation_mode, ISISCRPT_STRUCT::monitor_range, ISISCRPT_STRUCT::monitor_spectrum, ISISCRPT_STRUCT::monitor_sum, ISISCRPT_STRUCT::nper, ISISCRPT_STRUCT::nper_daq, ISISCRPT_STRUCT::ntc, ISISCRPT_STRUCT::period, ISISCRPT_STRUCT::period_type, ISISDAE::PeriodTypeSoftware, prettyTime(), ISISCRPT_STRUCT::rb_number, DAEstatus::result(), ISISCRPT_STRUCT::run_number, ISISCRPT_STRUCT::run_status, LabviewXML::saveToString(), LabviewXML::setValue(), SEV_ERROR, ISISCRPT_STRUCT::start_time, ISISCRPT_STRUCT::tcb_sync, PERIOD::total_frames, ISISCRPT_STRUCT::total_frames, ISISCRPT_STRUCT::update_duration, ISISCRPT_STRUCT::update_duration_period, ISISCRPT_STRUCT::update_good_frames, ISISCRPT_STRUCT::update_good_frames_period, ISISCRPT_STRUCT::update_good_uamph, ISISCRPT_STRUCT::update_npratio_current, ISISCRPT_STRUCT::update_period, ISISCRPT_STRUCT::update_period_sequence, ISISCRPT_STRUCT::update_poll_time, ISISCRPT_STRUCT::update_raw_frames, ISISCRPT_STRUCT::update_raw_frames_period, ISISCRPT_STRUCT::update_time, ISISCRPT_STRUCT::update_total_counts, ISISCRPT_STRUCT::user_name, and ISISCRPT_STRUCT::user_telephone.

Referenced by Cdae::updateStatusXML().

int ISISinstrumentControl::updateTCBXML ( const std::string &  status_xml,
DAEstatus status 
)
void ISISinstrumentControl::updateThread ( void *  arg)
staticprotected
int ISISinstrumentControl::updateUserDetailsFromFile ( const char *  filename,
DAEstatus status 
)
protected
int ISISinstrumentControl::updateUserXML ( const std::string &  user_xml,
DAEstatus status 
)
int ISISinstrumentControl::updateXML ( const char *  name,
xml_update_func_t  func,
DAEstatus dstatus 
)
protected
int ISISinstrumentControl::VMEReadArray ( unsigned long  card_id,
unsigned long  card_address,
isisU32_t values,
unsigned long  num_values,
DAEstatus status 
)
int ISISinstrumentControl::VMEReadValue ( unsigned long  card_id,
unsigned long  card_address,
bool  sixteen_bit,
unsigned long *  value,
DAEstatus status 
)
int ISISinstrumentControl::VMEReadValuesToString ( unsigned long  card_id,
unsigned long  card_address,
bool  sixteen_bit,
unsigned long  num_values,
std::string &  values,
DAEstatus status 
)

Definition at line 5703 of file ISISinstrumentControl.cpp.

References DAEstatus::Failure, m_crpt_cs, and VMEReadValue().

Referenced by Cdae::VMEReadValuesToString().

int ISISinstrumentControl::VMEWriteArray ( unsigned long  card_id,
unsigned long  card_address,
isisU32_t values,
unsigned long  num_values,
DAEstatus status 
)
int ISISinstrumentControl::VMEWriteValue ( unsigned long  card_id,
unsigned long  card_address,
bool  sixteen_bit,
unsigned long  value,
unsigned long  mode,
DAEstatus status 
)
int ISISinstrumentControl::waitForAsync ( )

check if any async worker threads are still running. when they finish they call doneAsync() that notifes us

Definition at line 5815 of file ISISinstrumentControl.cpp.

References m_async_complete_event, and m_num_async_requests.

int ISISinstrumentControl::whichVeto ( std::string &  veto_text,
DAEstatus status 
)

Definition at line 7074 of file ISISinstrumentControl.cpp.

References m_crpt_cs, m_dae, DAEstatus::result(), and ISISDAE::whichVeto().

Referenced by Cdae::getVetoStatus().

int ISISinstrumentControl::writeAutosaveFile ( DAEstatus dstatus)
protected
int ISISinstrumentControl::writeISISNeXus ( NeXusWriter nxwriter,
const CRPTProxy crpt,
const char *  filename,
bool  logs_only,
const seblock_map_t blocks,
const std::string &  events_nxfile,
DAEstatus dstatus 
)
static
int ISISinstrumentControl::writeISISRAW ( const CRPTProxy crpt,
const char *  filename,
DAEstatus dstatus 
)
static
int ISISinstrumentControl::writeISISRAWasync ( const CRPTProxy crpt,
const char *  filename,
DAEstatus dstatus 
)
DWORD __stdcall ISISinstrumentControl::writeISISRAWthread ( void *  arg)
staticprotected
int ISISinstrumentControl::writeJournal ( const CRPTProxy crpt,
seblock_map_t blocks,
DAEstatus status 
)
protected
Todo:
would be nice to add <?xml-stylesheet type="text/xsl" href="journal.xsl" ?> to file

Definition at line 6648 of file ISISinstrumentControl.cpp.

References DAEstatus::addWarning(), DAEstatus::addWarningVa(), ISISCRPT_STRUCT::comment, convertWindows1252ToUTF8(), SEBLOCK::current_value, vms_journal_line::date, defaultNoInheritHandles(), ISISCRPT_STRUCT::detector_table, ISISCRPT_STRUCT::duration, ISISCRPT_STRUCT::eventModeCardFraction(), FAC_CRPT, SEBLOCK::fcurrent_spread, SEBLOCK::fcurrent_value, ISISCRPT_STRUCT::field_label, findFiles(), RUNTABLE::fname, FrameSyncNames, SEBLOCK::fsetpoint_spread, SEBLOCK::fsetpoint_value, ISISCRPT_STRUCT::getNumSpectra(), ISISCRPT_STRUCT::good_frames, ISISCRPT_STRUCT::good_uamph, ISISCRPT_STRUCT::icp_version, ISISCRPT_STRUCT::inst_abrv, vms_journal_line::inst_abrv, ISISCRPT_STRUCT::inst_name, ISISCRPT_STRUCT::institute, ISISCRPT_STRUCT::instrument_geometry, SEBLOCK::is_real, ISISCRPT_STRUCT::isis_cycle, ISOtime(), vms_summary_line::jl, ISISCRPT_STRUCT::journal_blocks, ISISCRPT_STRUCT::local_contact, ISISCRPT_STRUCT::long_title, m_data_dir, m_icp_options, ISISCRPT_STRUCT::measurement_id, ISISCRPT_STRUCT::measurement_subid, ISISCRPT_STRUCT::measurement_type, ISISCRPT_STRUCT::monitor_spectrum, ISISCRPT_STRUCT::monitor_sum, ISISCRPT_STRUCT::ndet, ISISCRPT_STRUCT::nper, ISISCRPT_STRUCT::ntc, ISISCRPT_STRUCT::ntcr, ISISCRPT_STRUCT::ntrg, PerCycleJournal, vms_summary_line::rb, ISISCRPT_STRUCT::rb_number, ISISCRPT_STRUCT::run_number, vms_journal_line::run_number, ISISCRPT_STRUCT::sample_id, ISISCRPT_STRUCT::sample_name, ISISCRPT_STRUCT::sample_orientation, ISISCRPT_STRUCT::script_name, se_get_measurement_first_run(), se_get_measurement_label(), se_get_seci_config(), SEBLOCK::setpoint_value, spacePadCopy(), spacePadCopyVa(), ISISCRPT_STRUCT::spectra_table, ISISCRPT_STRUCT::start_time, ISISCRPT_STRUCT::stop_time, STR0(), DAEstatus::Success, ISISCRPT_STRUCT::tcb_sync, ISISCRPT_STRUCT::tcr, ISISCRPT_STRUCT::temperature_label, vms_journal_line::title, ISISCRPT_STRUCT::total_frames, vms_journal_line::uamps, ISISCRPT_STRUCT::update_npratio_average, ISISCRPT_STRUCT::update_total_counts, ISISCRPT_STRUCT::user_name, vms_journal_line::user_name, VMS_RUN_MASK, ISISRAW::vmstime(), and ISISCRPT_STRUCT::wiring_table.

Referenced by endRunTask().

int ISISinstrumentControl::writeRecoveryFile ( DAEstatus dstatus)
protected
int ISISinstrumentControl::writeWinEventLog ( int  sev,
const std::string &  message 
)
protected

Definition at line 597 of file ISISinstrumentControl.cpp.

References m_event_log_func, and m_report_arg.

void ISISinstrumentControl::zeroCRPTRawData ( )

not used now as taking too long on e.g. WISH instead use isRawDataCacheValid() and m_crpt->raw_data_update_time

Definition at line 6980 of file ISISinstrumentControl.cpp.

References m_crpt, m_status, CRPTProxy::rawDataUpdated(), and CRPTProxy::zeroUsedRawData().

Referenced by beginRunMainEx().

void ISISinstrumentControl::zeroCRPTRunRawData ( )

Definition at line 6986 of file ISISinstrumentControl.cpp.

References m_crpt_run, and m_status.

Referenced by beginRunMainEx().

Member Data Documentation

Poco::Util::Application* ISISinstrumentControl::m_app
protected
HANDLE ISISinstrumentControl::m_async_complete_event
protected
Poco::Timer ISISinstrumentControl::m_beam_current_timer
protected

Definition at line 75 of file ISISinstrumentControl.h.

Poco::Thread ISISinstrumentControl::m_beamlog_thread
protected

Definition at line 89 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl().

std::string ISISinstrumentControl::m_comp_name
protected

Definition at line 73 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), loadCRPT(), and sendNagios().

CRPTProxy ISISinstrumentControl::m_crpt
protected

pointer to CRPT

Definition at line 63 of file ISISinstrumentControl.h.

Referenced by abortRun(), allReportFuncMain(), beamOn(), beginRunMainEx(), changeNumberOfSoftwarePeriods(), changePeriod(), changePeriodWhileRunning(), changeUpdateSettingsXML(), endRunMain(), endSEWait(), exitProgram(), flushCRPT(), getBeamCurrent(), getCharItem(), getCountRate(), getCRPTSpectrumIntegral(), getCurrentPeriodNumber(), getDAEsettingsXML(), getDAQPeriod(), getFramesAllPeriods(), getHardwarePeriodsXML(), getIntArrayItem(), getIntArrayItemSize(), getIntItem(), getMEventsPeriod(), getMonitoringXML(), getMonitorIntegral(), getNPRatio(), getNumberOfPeriods(), getNumberOfSpectra(), getNumberOfTimeChannels(), getOptions(), getPollTime(), getRealArrayItem(), getRealArrayItemSize(), getRealItem(), getRunNumber(), getRunState(), getSpectrum(), getSpectrumIntegral(), getSpectrumNumbersForTimeRegime(), getTCBXML(), getUAmpHAllPeriods(), getUpdateSettingsXML(), importCRPT(), ISISinstrumentControl(), isRunning(), isWaiting(), loadCRPT(), loadDAEWithData(), loadDAEWithNeXusData(), muonKickerOK(), pauseRunMain(), readBeamloggerBroadcast(), readDataDaeTable(), readDetectorTable(), readISISRAW(), readRecoveryFile(), readSpectraTable(), readTables(), readWiringTable(), refreshCachedValues(), rerunFailedEnds(), resumeRun(), saveRun(), setBeamlineParameters(), setOptions(), setRunNumber(), setRunStatus(), setRunStatusImp(), setSampleParameters(), setTimeChannelRange(), setupDAE(), setUserParameters(), snapshotCRPT(), startDataCollection(), startSEWait(), stopDataCollection(), storeCRPT(), sumAllSpectra(), tcbcalc(), updateCRPTSpectra(), updateCRPTSpectraAllPeriods(), updateCRPTWithDAE(), updateCycle(), updateDAEsettingsXML(), updateFunc(), updateHardwarePeriodsXML(), updateICPTimeDiffLog(), updateMonitoringLog(), updateMonitoringXML(), updateSampleXML(), updateSpecmapsFromDAE(), updateStatusLog(), updateStatusXML(), updateTCBXML(), updateUserDetailsFromFile(), updateUserXML(), writeAutosaveFile(), writeRecoveryFile(), and zeroCRPTRawData().

CRITICAL_SECTION ISISinstrumentControl::m_crpt_cs
protected

Definition at line 72 of file ISISinstrumentControl.h.

Referenced by abortRun(), beginRunMainEx(), changeNumberOfSoftwarePeriods(), changePeriod(), changePeriodWhileRunning(), changeUpdateSettingsXML(), checkTestPattern(), endRunMain(), endSEWait(), fillWithTestPattern(), getCRPTSpectrumIntegral(), getCurrentPeriodGoodFrames(), getCurrentPeriodGoodUAmpH(), getCurrentPeriodNumber(), getCurrentPeriodRawFrames(), getCurrentPeriodRawUAmpH(), getDAEsettingsXML(), getGoodFrames(), getGoodUAmpH(), getHardwarePeriodsXML(), getMonitoringXML(), getOptions(), getRawFrames(), getRawUAmpH(), getSpectrum(), getSpectrumIntegral(), getTCBXML(), getTotalCounts(), getUpdateSettingsXML(), getVetoStatus(), importCRPT(), ISISinstrumentControl(), loadDAEWithData(), loadDAEWithNeXusData(), pauseRunMain(), readDataDaeTable(), readDetectorTable(), readSpectraTable(), readWiringTable(), refreshCachedValues(), resumeRun(), saveRun(), setOptions(), setRunNumber(), setRunStatus(), setTimeChannelRange(), setVeto(), snapshotCRPT(), startDataCollection(), startSEWait(), stopDataCollection(), storeCRPT(), sumAllHistogramMemory(), updateCRPTSpectra(), updateCRPTSpectraAllPeriods(), updateCRPTWithDAE(), updateDAEsettingsXML(), updateFunc(), updateHardwarePeriodsXML(), updateMonitoringXML(), updateSampleXML(), updateStatusXML(), updateTCBXML(), updateUserXML(), VMEReadArray(), VMEReadValue(), VMEReadValuesToString(), VMEWriteArray(), VMEWriteValue(), whichVeto(), writeAutosaveFile(), and ~ISISinstrumentControl().

Poco::SharedPtr<CRPTProxy> ISISinstrumentControl::m_crpt_run
protected

used for fast ends

Definition at line 64 of file ISISinstrumentControl.h.

Referenced by endRunMain(), ISISinstrumentControl(), and zeroCRPTRunRawData().

std::list<boost::signals2::connection> ISISinstrumentControl::m_crpt_signals
protected

Definition at line 65 of file ISISinstrumentControl.h.

Referenced by endRunMain(), and ISISinstrumentControl().

ISISDAE* ISISinstrumentControl::m_dae
protected
ISISDAE::DAEType ISISinstrumentControl::m_dae_type
protected
std::string ISISinstrumentControl::m_data_dir
protected
epics_thread_data_t ISISinstrumentControl::m_epics_data
protected

Definition at line 107 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl().

write_event_log_t* ISISinstrumentControl::m_event_log_func
protected

Definition at line 84 of file ISISinstrumentControl.h.

Referenced by writeWinEventLog().

Poco::Net::HTTPServer* ISISinstrumentControl::m_http_server
protected

Definition at line 121 of file ISISinstrumentControl.h.

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

Poco::Net::ServerSocket* ISISinstrumentControl::m_http_svs
protected

Definition at line 122 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl().

LabviewXML* ISISinstrumentControl::m_icp_config
protected

Definition at line 68 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), loadCRPT(), and ~ISISinstrumentControl().

std::string ISISinstrumentControl::m_icp_dir
protected

Definition at line 101 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), and updateFunc().

unsigned ISISinstrumentControl::m_icp_options
protected

Definition at line 119 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), updateFunc(), and writeJournal().

std::string ISISinstrumentControl::m_icp_service_dir
protected

Definition at line 102 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), launchDatasvr(), and sendNagios().

time_t ISISinstrumentControl::m_icp_start_time
protected

Definition at line 106 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl().

ICPEventWriter ISISinstrumentControl::m_icpwriter
protected
Poco::Path ISISinstrumentControl::m_inst_settings_dir
protected

Definition at line 85 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), and saveCRPTToFile().

std::string ISISinstrumentControl::m_instrument_parameter_map_file = "c:\\data\\instrument_parameter_map.txt"
staticprotected

Definition at line 371 of file ISISinstrumentControl.h.

Referenced by readDetectorTable(), saveCRPTToFile(), and writeISISNeXus().

std::string ISISinstrumentControl::m_instrument_xml_file = "c:\\data\\instrument.xml"
staticprotected

Definition at line 370 of file ISISinstrumentControl.h.

Referenced by readDetectorTable(), saveCRPTToFile(), and writeISISNeXus().

std::string ISISinstrumentControl::m_log_dir
protected

Definition at line 104 of file ISISinstrumentControl.h.

Referenced by getPostCommandLogName(), and ISISinstrumentControl().

bool ISISinstrumentControl::m_nexus_files
protected

produce a nexus file. If m_vms_raw_files is true, it is log only. If false, it has data too

Definition at line 114 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), and saveCRPTToFile().

ICPNotificationHandler ISISinstrumentControl::m_nh
protected

Definition at line 99 of file ISISinstrumentControl.h.

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

volatile LONG ISISinstrumentControl::m_num_async_requests
protected

Definition at line 83 of file ISISinstrumentControl.h.

Referenced by doneAsync(), waitForAsync(), and writeISISRAWasync().

NeXusWriter ISISinstrumentControl::m_nxwriter
protected
bool ISISinstrumentControl::m_period_error
protected

Definition at line 113 of file ISISinstrumentControl.h.

Referenced by beginRunMainEx(), and getCurrentPeriodNumber().

std::string ISISinstrumentControl::m_recovery_file
protected
recovery_map_t ISISinstrumentControl::m_recovery_map
protected
bool ISISinstrumentControl::m_registersetranslator
protected
void* ISISinstrumentControl::m_report_arg
protected
DAEreport_func_t* ISISinstrumentControl::m_report_func
protected

Definition at line 81 of file ISISinstrumentControl.h.

Referenced by allReportFuncMain(), and ISISinstrumentControl().

int ISISinstrumentControl::m_run_number_digits
protected
bool ISISinstrumentControl::m_shutdown_requested
protected

Definition at line 110 of file ISISinstrumentControl.h.

Referenced by shutdownRequested(), and ~ISISinstrumentControl().

bool ISISinstrumentControl::m_simulation_mode
protected

Definition at line 69 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), and updateStatusXML().

boost::signals2::signal<void(BSTR)> ISISinstrumentControl::m_state_sig
protected

Definition at line 97 of file ISISinstrumentControl.h.

Referenced by fireOnRunStateChange(), and registerOnRunStateChange().

DAEstatus ISISinstrumentControl::m_status
protected
ICPProgressHandler ISISinstrumentControl::m_task_ph
protected

Definition at line 88 of file ISISinstrumentControl.h.

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

Poco::TaskManager ISISinstrumentControl::m_taskmgr
protected
bool ISISinstrumentControl::m_use_full_inst_name_for_files
protected
bool ISISinstrumentControl::m_vms_raw_files
protected

produce a VMS raw file

Definition at line 115 of file ISISinstrumentControl.h.

Referenced by ISISinstrumentControl(), and saveCRPTToFile().


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