ICP  1
Classes | Macros | Enumerations | Functions | Variables
isiscrpt.h File Reference
#include "DAEstatus.h"
#include "isisdae.h"
#include "isiscrpt_types.h"
#include "icputils.h"

Go to the source code of this file.

Classes

struct  RUNTABLE
 
struct  VETO
 
struct  TCBRANGE
 
struct  PERIOD
 
struct  data_dae_t
 
struct  beamlogger_t
 
struct  nagios_t
 
struct  monitoring_par
 
struct  SplitItem
 
struct  ISISCRPT_STRUCT
 
struct  ISISCRPT_STRUCT::Monitoring
 

Macros

#define ISISCRPT_VERSION   3
 increment ISISCRPT_VERSION for any ISISCRPT_STRUCT changes that might not be detected by a change of size More...
 
#define ISISCRPT_MAX_DETECTOR   810000
 
#define ISISCRPT_MAX_DC_DETECTOR   65536
 
#define ISISCRPT_MAX_MONITOR   64
 
#define ISISCRPT_MAX_TIMECHANB   100000
 
#define ISISCRPT_MAX_USER   20
 
#define ISISCRPT_MAX_PERIOD   512
 
#define ISISCRPT_MAX_NTRG   6
 
#define ISISCRPT_MAX_TCR   5
 
#define ISISCRPT_MAX_TCPAR   4
 
#define ISISCRPT_MAX_FNAMELEN   256
 
#define ISISCRPT_MAX_RCSID   40
 
#define ISISCRPT_MAX_DC   35
 
#define ISISCRPT_MAX_NUM_DAE   4
 
#define ISISCRPT_NUM_FC_VETO   4
 
#define ISISCRPT_INST_LEN   16
 
#define ISISCRPT_INST_ABRV_LEN   3
 
#define ISISCRPT_TITLE_LEN   256
 
#define ISISCRPT_SHORT_TITLE_LEN   24
 
#define ISISCRPT_USER_NAME_LEN   80
 
#define ISISCRPT_INSTITUTE_NAME_LEN   80
 
#define ISISCRPT_PERIOD_LABEL_LEN   80
 
#define ICP_NAME_LEN   80
 
#define ISISCRPT_MAX_DATADAE   10
 
#define ISISCRPT_LOG_MAXLINES   20
 
#define ISISCRPT_LOG_LINELEN   80
 
#define RUNSTATUS_PROCESSING   0
 
#define RUNSTATUS_SETUP   1
 
#define RUNSTATUS_RUNNING   2
 
#define RUNSTATUS_PAUSED   3
 
#define RUNSTATUS_WAITING   4
 
#define RUNSTATUS_VETOING   5
 
#define RUNSTATUS_ENDING   6
 
#define RUNSTATUS_SAVING   7
 
#define SESTATUS_INRANGE   1
 
#define SESTATUS_OUTOFRANGE   0
 
#define NULL_TERMINATE(__array)   __array[sizeof(__array) - 1] = '\0'
 null terminate a char[n] static array More...
 
#define ISISCRPT_NUM_VETOS   (sizeof(veto_names) / sizeof(const char*))
 max number of vetos More...
 
#define TCBRANGE_FILE   -1
 read from file More...
 
#define TCBRANGE_UNUSED   0
 
#define TCBRANGE_CONST_T   1
 dt=c More...
 
#define TCBRANGE_INC_T   2
 dt/t=c More...
 
#define TCBRANGE_INC_T_2   3
 dt/t^c=c More...
 
#define TCBRANGE_SHIFTED   4
 pure shift from an existing range More...
 
#define ISISCRPT_MAX_LVXML_SIZE   50000
 
#define MAX_MONITORING_PAR   200
 
#define TR_EVENT_MOD   100
 used to pull out the event mode specific bit from a time regimne definition More...
 

Enumerations

enum  VetoNames {
  SMPVeto =0, FIFOVeto =1, InternalVeto =2, Ext0Veto =3,
  Ext1Veto =4, Ext2Veto =5, Ext3Veto =6, FermiChopperVeto0 =7,
  FermiChopperVeto1 =8, FermiChopperVeto2 =9, FermiChopperVeto3 =10, MSModeVeto =11,
  TS2PulseVeto =12, ISIS50HzVeto =13
}
 
enum  PeriodSetupSource { PeriodSourceLabview = 0, PeriodSourceFile = 1 }
 

Functions

int spacePadCopy (char *output, const char *input, int output_size)
 
int spacePadCopyVa (char *output, int output_size, const char *format,...)
 
int spaceTrimCopy (char *output, int output_size, const char *input, int input_size)
 
static bool tcbRangesPurelyShifted (const TCBRANGE &t1, const TCBRANGE &t2)
 

Variables

static const char * crpt_rcsid = "$Revision: 1675 $"
 
static const char * runstatus_names []
 
static const char * sestatus_names []
 
static const char * veto_names []
 these names will be used in the NeXus data file, so no spaces and lowercase only More...
 

Macro Definition Documentation

#define ICP_NAME_LEN   80

Definition at line 39 of file isiscrpt.h.

#define ISISCRPT_INST_ABRV_LEN   3

lenth of abbreviated instrument name

Definition at line 32 of file isiscrpt.h.

#define ISISCRPT_INST_LEN   16

lenth of instrument name

Definition at line 31 of file isiscrpt.h.

#define ISISCRPT_INSTITUTE_NAME_LEN   80

Definition at line 36 of file isiscrpt.h.

#define ISISCRPT_LOG_LINELEN   80

Definition at line 45 of file isiscrpt.h.

#define ISISCRPT_LOG_MAXLINES   20

Definition at line 44 of file isiscrpt.h.

#define ISISCRPT_MAX_DATADAE   10

Definition at line 41 of file isiscrpt.h.

Referenced by ISISinstrumentControl::readDataDaeTable().

#define ISISCRPT_MAX_DC   35

max allowed total number of detector cards in all crates

Definition at line 26 of file isiscrpt.h.

Referenced by ISISinstrumentControl::updateSpecmapsFromDAE().

#define ISISCRPT_MAX_DC_DETECTOR   65536

max number of detectors on a detector card in whole DAE

Definition at line 15 of file isiscrpt.h.

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

#define ISISCRPT_MAX_DETECTOR   810000
#define ISISCRPT_MAX_FNAMELEN   256

max length of filename

Definition at line 23 of file isiscrpt.h.

#define ISISCRPT_MAX_LVXML_SIZE   50000

Definition at line 233 of file isiscrpt.h.

#define ISISCRPT_MAX_MONITOR   64

max number of monitors

Definition at line 16 of file isiscrpt.h.

Referenced by ISISinstrumentControl::readWiringTable().

#define ISISCRPT_MAX_NTRG   6
#define ISISCRPT_MAX_NUM_DAE   4

max allowed total number of dae crates

Definition at line 27 of file isiscrpt.h.

#define ISISCRPT_MAX_PERIOD   512
#define ISISCRPT_MAX_RCSID   40

max length of crpt_rcsid

Definition at line 24 of file isiscrpt.h.

#define ISISCRPT_MAX_TCPAR   4

max number of time channel parameters per range

Definition at line 22 of file isiscrpt.h.

#define ISISCRPT_MAX_TCR   5

max number of time channel ranges within a regime

Definition at line 21 of file isiscrpt.h.

Referenced by ISISinstrumentControl::setTimeChannelRange().

#define ISISCRPT_MAX_TIMECHANB   100000

max number of time channels

Definition at line 17 of file isiscrpt.h.

Referenced by ISISinstrumentControl::tcbcalc().

#define ISISCRPT_MAX_USER   20

max number of user tables

Definition at line 18 of file isiscrpt.h.

Referenced by DETECTOR::DETECTOR(), and ISISinstrumentControl::readDetectorTable().

#define ISISCRPT_NUM_FC_VETO   4

number of fast/fermi chopper vetos

Definition at line 29 of file isiscrpt.h.

#define ISISCRPT_NUM_VETOS   (sizeof(veto_names) / sizeof(const char*))

max number of vetos

Definition at line 112 of file isiscrpt.h.

Referenced by ISISinstrumentControl::beginRunMainEx(), NeXusWriter::writeISISNeXus(), and NeXusWriter::writeMuonFile().

#define ISISCRPT_PERIOD_LABEL_LEN   80

Definition at line 37 of file isiscrpt.h.

#define ISISCRPT_SHORT_TITLE_LEN   24

max length of short title in old raw file format

Definition at line 34 of file isiscrpt.h.

#define ISISCRPT_TITLE_LEN   256

max length of title, but only 80 chars will make it into ISIS raw file / journal.txt (NeXus and journal.xml get all)

Definition at line 33 of file isiscrpt.h.

#define ISISCRPT_USER_NAME_LEN   80

Definition at line 35 of file isiscrpt.h.

#define ISISCRPT_VERSION   3

increment ISISCRPT_VERSION for any ISISCRPT_STRUCT changes that might not be detected by a change of size

Definition at line 5 of file isiscrpt.h.

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

#define MAX_MONITORING_PAR   200

Definition at line 448 of file isiscrpt.h.

Referenced by ISISinstrumentControl::updateMonitoringXML().

#define NULL_TERMINATE (   __array)    __array[sizeof(__array) - 1] = '\0'
#define RUNSTATUS_ENDING   6

Definition at line 54 of file isiscrpt.h.

#define RUNSTATUS_PAUSED   3
#define RUNSTATUS_PROCESSING   0

Definition at line 48 of file isiscrpt.h.

#define RUNSTATUS_RUNNING   2
#define RUNSTATUS_SAVING   7

Definition at line 55 of file isiscrpt.h.

#define RUNSTATUS_SETUP   1
#define RUNSTATUS_VETOING   5

Definition at line 53 of file isiscrpt.h.

#define RUNSTATUS_WAITING   4
#define SESTATUS_INRANGE   1
#define SESTATUS_OUTOFRANGE   0

Definition at line 63 of file isiscrpt.h.

Referenced by ISISinstrumentControl::startSEWait().

#define TCBRANGE_CONST_T   1
#define TCBRANGE_FILE   -1
#define TCBRANGE_INC_T   2
#define TCBRANGE_INC_T_2   3

dt/t^c=c

Definition at line 123 of file isiscrpt.h.

Referenced by ISISinstrumentControl::tcbcalc().

#define TCBRANGE_SHIFTED   4

pure shift from an existing range

Definition at line 124 of file isiscrpt.h.

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

#define TCBRANGE_UNUSED   0

Definition at line 120 of file isiscrpt.h.

#define TR_EVENT_MOD   100

used to pull out the event mode specific bit from a time regimne definition

Definition at line 744 of file isiscrpt.h.

Referenced by ISISCRPT_STRUCT::crptTR(), ISISCRPT_STRUCT::daeTR(), ISISCRPT_STRUCT::isEventTR(), and ISISCRPT_STRUCT::makeEventTRValue().

Enumeration Type Documentation

Enumerator
PeriodSourceLabview 
PeriodSourceFile 

Definition at line 100 of file isiscrpt.h.

enum VetoNames
Enumerator
SMPVeto 
FIFOVeto 
InternalVeto 
Ext0Veto 
Ext1Veto 
Ext2Veto 
Ext3Veto 
FermiChopperVeto0 
FermiChopperVeto1 
FermiChopperVeto2 
FermiChopperVeto3 
MSModeVeto 
TS2PulseVeto 
ISIS50HzVeto 

Definition at line 93 of file isiscrpt.h.

Function Documentation

int spacePadCopy ( char *  output,
const char *  input,
int  output_size 
)
int spacePadCopyVa ( char *  output,
int  output_size,
const char *  format,
  ... 
)

Definition at line 142 of file isiscrpt.cpp.

Referenced by ISISinstrumentControl::writeJournal().

int spaceTrimCopy ( char *  output,
int  output_size,
const char *  input,
int  input_size 
)

Definition at line 161 of file isiscrpt.cpp.

Referenced by ISISRAW::sendToCRPT().

static bool tcbRangesPurelyShifted ( const TCBRANGE t1,
const TCBRANGE t2 
)
static

Variable Documentation

const char* crpt_rcsid = "$Revision: 1675 $"
static

Definition at line 7 of file isiscrpt.h.

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

const char* runstatus_names[]
static
Initial value:
= {
"PROCESSING", "SETUP", "RUNNING", "PAUSED",
"WAITING", "VETOING", "ENDING", "SAVING"
}

Definition at line 57 of file isiscrpt.h.

Referenced by RootHandler::handleRequest(), ISISCRPT_STRUCT::runStatusName(), and ISISinstrumentControl::setRunStatusImp().

const char* sestatus_names[]
static
Initial value:
= {
"OUT_OF_RANGE", "IN_RANGE"
}

Definition at line 65 of file isiscrpt.h.

Referenced by RootHandler::handleRequest().

const char* veto_names[]
static
Initial value:
= {
"smp", "fifo", "internal", "ext0", "ext1", "ext2", "ext3",
"fermi_chopper0", "fermi_chopper1", "fermi_chopper2", "fermi_chopper3",
"msmode", "TS2_pulse", "ISIS_50Hz"
}

these names will be used in the NeXus data file, so no spaces and lowercase only

Definition at line 106 of file isiscrpt.h.

Referenced by NeXusWriter::writeISISNeXus(), and NeXusWriter::writeMuonFile().