ICP
1
|
#include <ISISinstrumentControl.h>
Public Member Functions | |
InstrumentControlHolder () | |
Public Member Functions inherited from ISISinstrumentControl | |
DAEstatus & | getStatusReporter () |
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 void | setDefaultArgs (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) |
Static Public Member Functions inherited from ISISinstrumentControl | |
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) |
Static Private Attributes | |
static Poco::Util::Application * | m_pApp = NULL |
static std::string | m_icp_service_dir = "" |
static DAEreport_func_t * | m_func = NULL |
static write_event_log_t * | m_event_func = NULL |
static void * | m_report_arg = NULL |
Additional Inherited Members | |
Protected Types inherited from ISISinstrumentControl | |
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 inherited from ISISinstrumentControl | |
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 inherited from ISISinstrumentControl | |
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 ¶ms, const seblock_map_t *se_blocks, const char *name, float &crpt_target, DAEstatus &status) |
static int | setStringParameter (const CRPTProxy::parameter_map_t ¶ms, 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 ¶m_map, const char *filename, DAEstatus &status) |
static int | stringTableToParameterMap (const string_table_t &string_table, CRPTProxy::parameter_map_t ¶m_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 inherited from ISISinstrumentControl | |
CRPTProxy | m_crpt |
pointer to CRPT More... | |
Poco::SharedPtr< CRPTProxy > | m_crpt_run |
used for fast ends More... | |
std::list < boost::signals2::connection > | m_crpt_signals |
int | m_run_number_digits |
ISISDAE * | m_dae |
LabviewXML * | m_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_t * | m_report_func |
HANDLE | m_async_complete_event |
volatile LONG | m_num_async_requests |
write_event_log_t * | m_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 inherited from ISISinstrumentControl | |
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" |
Definition at line 385 of file ISISinstrumentControl.h.
|
inline |
Definition at line 403 of file ISISinstrumentControl.h.
References m_pApp.
|
inlinestatic |
Definition at line 394 of file ISISinstrumentControl.h.
References m_event_func, m_func, m_icp_service_dir, m_pApp, and m_report_arg.
|
staticprivate |
Definition at line 391 of file ISISinstrumentControl.h.
Referenced by setDefaultArgs().
|
staticprivate |
Definition at line 390 of file ISISinstrumentControl.h.
Referenced by setDefaultArgs().
|
staticprivate |
Definition at line 389 of file ISISinstrumentControl.h.
Referenced by setDefaultArgs().
|
staticprivate |
Definition at line 388 of file ISISinstrumentControl.h.
Referenced by InstrumentControlHolder(), and setDefaultArgs().
|
staticprivate |
Definition at line 392 of file ISISinstrumentControl.h.
Referenced by setDefaultArgs().