JLab Pipeline TS Library
3v7.1
|
Functions | |
void | tsStatus (int pflag) |
Print some status information of the TS to standard out. More... | |
int | tsGetPortTrigSrcEnabled (int port) |
Get the trigger sources enabled bits of the selected port. More... | |
int | tsGetTrigSrcEnabledFiberMask () |
Returns the mask of fiber channels that report a "connected" status from a TI has it's trigger source enabled. More... | |
int | tsGetFirmwareVersion () |
Get the Firmware Version. More... | |
unsigned int | tsGetSerialNumber (char **rSN) |
Get the Module Serial Number. More... | |
int | tsGetCrateID (int port) |
Get the crate ID of the selected port. More... | |
int | tsGetNextBlockLevel () |
Get the block level that will be updated on the end of the block readout. More... | |
int | tsGetCurrentBlockLevel () |
Get the current block level. More... | |
int | tsGetInstantBlockLevelChange () |
Get Status of instant blocklevel change when broadcast is received. More... | |
int | tsGetPrescale () |
Get the current prescale factor. More... | |
unsigned int | tsGetTriggerPrescaleMask (int type, int bank) |
FIXME: This is not quite right. More... | |
unsigned long long int | tsGetEventCounter () |
Returns the event counter (48 bit) More... | |
unsigned int | tsGetBlockLimit () |
Returns the value that is currently programmed as the block limit. More... | |
int | tsGetBlockLimitStatus () |
Get the current status of the block limit. More... | |
unsigned int | tsGetIntCount () |
Return current readout count. More... | |
int | tsGetTriggerHoldoff (int rule) |
Get the value for a specified trigger rule. More... | |
int | tsGetTriggerHoldoffMin (int rule, int pflag) |
Get the value for a specified trigger rule minimum busy. More... | |
int | tsGetSpecialEventType (int trigOpt) |
Get the trigger type for the specified special trigger. More... | |
void | tsPrintTriggerTable (int inputType, int subGroup, int showbits) |
Print trigger table to standard out. More... | |
unsigned int | tsGetLiveTime () |
Return the current "live" time of the module. More... | |
unsigned int | tsGetBusyTime () |
Return the current "busy" time of the module. More... | |
unsigned int | tsGetLiveTime_InputHigh () |
Return the current "live" time of the module. More... | |
unsigned int | tsGetBusyTime_InputHigh () |
Return the current "busy" time of the module. More... | |
int | tsLive (int sflag) |
Calculate the live time (percentage) from the live and busy time scalers. More... | |
unsigned int | tsBlockStatus (int fiber, int pflag) |
Show block Status of specified fiber. More... | |
int | tsGetBusyStatus (int pflag) |
Returns the bits that are contributing to the current busy state. More... | |
int | tsCurrentBlockFilled (unsigned short npoll) |
Poll the TS to determine status of current block, for specified number of times. Return immediately when block has been filed, or when timeout has occurred. More... | |
int | tsGetFPDelay (int chan) |
Get the input delay for teh specified front panel input (0-31) More... | |
int | tsPrintFPDelay () |
Print Front Panel Channel Delays to Standard Out. More... | |
int | tsGetTSIODrive () |
Return the Enable/Disable status the FPGA drive to the TSIO. More... | |
int | tsGetDriverSupportedVersion () |
Return the Firmware Version that is Supported by the Library. More... | |
int | tsGetTrigCoinWindow () |
Get the trigger coincidence window. More... | |
int | tsGetTrigInhibitWindow () |
Get the trigger inhibit window. More... | |
unsigned int tsBlockStatus | ( | int | fiber, |
int | pflag | ||
) |
Show block Status of specified fiber.
fiber | Fiber port to show |
pflag | Whether or not to print to standard out |
References TS_A24RegStruct::adr24, TS_A24RegStruct::blockStatus, TS_BLOCKSTATUS_NBLOCKS_NEEDACK0, and TS_BLOCKSTATUS_NBLOCKS_READY0.
int tsCurrentBlockFilled | ( | unsigned short | npoll | ) |
Poll the TS to determine status of current block, for specified number of times. Return immediately when block has been filed, or when timeout has occurred.
npoll | Number of times to poll TS, before timeout declared |
References TS_A24RegStruct::nblocks, TS_NBLOCKS_EVENTS_IN_BLOCK_MASK, tsGetCurrentBlockLevel(), TSLOCK, and TSUNLOCK.
Referenced by tsDisableTriggerSource().
unsigned int tsGetBlockLimit | ( | ) |
Returns the value that is currently programmed as the block limit.
References TS_A24RegStruct::blocklimit, TSLOCK, and TSUNLOCK.
int tsGetBlockLimitStatus | ( | ) |
Get the current status of the block limit.
References TS_A24RegStruct::blockBuffer, TS_BLOCKBUFFER_BUSY_ON_BLOCKLIMIT, TSLOCK, and TSUNLOCK.
int tsGetBusyStatus | ( | int | pflag | ) |
Returns the bits that are contributing to the current busy state.
References TS_A24RegStruct::busy, TS_BUSY_FP, TS_BUSY_FP_FADC, TS_BUSY_FP_FTDC, TS_BUSY_INT, TS_BUSY_LOOPBACK, TS_BUSY_MONITOR_MASK, TS_BUSY_MONITOR_TI_A, TS_BUSY_MONITOR_TI_B, TS_BUSY_MONITOR_TS, TS_BUSY_P2, TS_BUSY_SOURCEMASK, TS_BUSY_SWA, TS_BUSY_SWB, TS_BUSY_TI_A, TS_BUSY_TI_B, TSLOCK, and TSUNLOCK.
unsigned int tsGetBusyTime | ( | ) |
Return the current "busy" time of the module.
References TS_A24RegStruct::busytime, TSLOCK, and TSUNLOCK.
unsigned int tsGetBusyTime_InputHigh | ( | ) |
Return the current "busy" time of the module.
References PartitionStruct::hel_busytime, TS_A24RegStruct::part1, TSLOCK, and TSUNLOCK.
int tsGetCrateID | ( | int | port | ) |
Get the crate ID of the selected port.
port |
|
References TS_A24RegStruct::hfbr_tiID, TS_A24RegStruct::master_tiID, TS_ID_CRATEID_MASK, TSLOCK, and TSUNLOCK.
int tsGetCurrentBlockLevel | ( | ) |
Get the current block level.
References TS_A24RegStruct::blocklevel, TS_BLOCKLEVEL_CURRENT_MASK, TS_BLOCKLEVEL_RECEIVED_MASK, tsBlockLevel, tsDisableBusError(), tsEnableBusError(), TSLOCK, tsNextBlockLevel, and TSUNLOCK.
Referenced by tsCurrentBlockFilled(), and tsStatus().
int tsGetDriverSupportedVersion | ( | ) |
Return the Firmware Version that is Supported by the Library.
References TS_SUPPORTED_FIRMWARE.
unsigned long long int tsGetEventCounter | ( | ) |
Returns the event counter (48 bit)
References TS_A24RegStruct::eventNumber_hi, TS_A24RegStruct::eventNumber_lo, TS_EVENTNUMBER_HI_MASK, TSLOCK, and TSUNLOCK.
Referenced by tsStatus().
int tsGetFirmwareVersion | ( | ) |
Get the Firmware Version.
References TS_A24RegStruct::JTAGFPGABase, TS_A24RegStruct::reset, TS_RESET_JTAG, TSLOCK, and TSUNLOCK.
Referenced by tsPartInit().
int tsGetFPDelay | ( | int | chan | ) |
Get the input delay for teh specified front panel input (0-31)
chan | Front Panel Input Channel (0-31) |
References TS_A24RegStruct::fpDelay, TS_FPDELAY_MASK, TSLOCK, and TSUNLOCK.
int tsGetInstantBlockLevelChange | ( | ) |
Get Status of instant blocklevel change when broadcast is received.
References TS_VMECONTROL_BLOCKLEVEL_UPDATE, TSLOCK, TSUNLOCK, and TS_A24RegStruct::vmeControl.
unsigned int tsGetIntCount | ( | ) |
Return current readout count.
References tsIntCount.
unsigned int tsGetLiveTime | ( | ) |
Return the current "live" time of the module.
References TS_A24RegStruct::livetime, TSLOCK, and TSUNLOCK.
unsigned int tsGetLiveTime_InputHigh | ( | ) |
Return the current "live" time of the module.
References PartitionStruct::hel_livetime, TS_A24RegStruct::part1, TSLOCK, and TSUNLOCK.
int tsGetNextBlockLevel | ( | ) |
Get the block level that will be updated on the end of the block readout.
References TS_A24RegStruct::blocklevel, TS_BLOCKLEVEL_CURRENT_MASK, TS_BLOCKLEVEL_RECEIVED_MASK, tsBlockLevel, TSLOCK, tsNextBlockLevel, and TSUNLOCK.
Referenced by tsBroadcastNextBlockLevel().
int tsGetPortTrigSrcEnabled | ( | int | port | ) |
Get the trigger sources enabled bits of the selected port.
port |
|
References TS_A24RegStruct::hfbr_tiID, TS_A24RegStruct::master_tiID, TS_ID_TRIGSRC_ENABLE_MASK, TSLOCK, and TSUNLOCK.
int tsGetPrescale | ( | ) |
Get the current prescale factor.
References TS_A24RegStruct::trig1Prescale, TSLOCK, and TSUNLOCK.
unsigned int tsGetSerialNumber | ( | char ** | rSN | ) |
Get the Module Serial Number.
rSN | Pointer to string to pass Serial Number |
References TS_A24RegStruct::JTAGPROMBase, TS_A24RegStruct::reset, TS_RESET_JTAG, TSLOCK, and TSUNLOCK.
int tsGetSpecialEventType | ( | int | trigOpt | ) |
Get the trigger type for the specified special trigger.
trigOpt | Trigger Option 0: Software (default = 253) 1: Pulser (default = 254) 2: Multiple GTP or FP Hits (default = 250) 3: Combined GTP and FP Hits (default = 251) |
References TS_A24RegStruct::specialEvTypes, TS_SPECIALEVTYPES_GTP_AND_FP_MASK, TS_SPECIALEVTYPES_MULT_GTP_OR_FP_MASK, TS_SPECIALEVTYPES_PULSER_MASK, TS_SPECIALEVTYPES_VME_MASK, TSLOCK, and TSUNLOCK.
int tsGetTrigCoinWindow | ( | ) |
Get the trigger coincidence window.
References TS_A24RegStruct::triggerWindow, TS_TRIGGERWINDOW_COINC_MASK, TSLOCK, and TSUNLOCK.
int tsGetTriggerHoldoff | ( | int | rule | ) |
Get the value for a specified trigger rule.
rule | the number of triggers within some time period.. e.g. rule=1: No more than ONE trigger within the specified time period |
References TS_A24RegStruct::triggerRule, TS_TRIGGERRULE_RULE1_MASK, TS_TRIGGERRULE_RULE2_MASK, TS_TRIGGERRULE_RULE3_MASK, TS_TRIGGERRULE_RULE4_MASK, TSLOCK, and TSUNLOCK.
int tsGetTriggerHoldoffMin | ( | int | rule, |
int | pflag | ||
) |
Get the value for a specified trigger rule minimum busy.
rule | the number of triggers within some time period.. e.g. rule=1: No more than ONE trigger within the specified time period |
pflag | if not 0, print the setting to standard out. |
References TS_A24RegStruct::part1, PartitionStruct::triggerRuleMin, TS_TRIGGERRULEMIN_MIN2_EN, TS_TRIGGERRULEMIN_MIN2_MASK, TS_TRIGGERRULEMIN_MIN3_EN, TS_TRIGGERRULEMIN_MIN3_MASK, TS_TRIGGERRULEMIN_MIN4_EN, TS_TRIGGERRULEMIN_MIN4_MASK, TSLOCK, and TSUNLOCK.
unsigned int tsGetTriggerPrescaleMask | ( | int | type, |
int | bank | ||
) |
FIXME: This is not quite right.
References TS_A24RegStruct::fpInputPrescale, TS_A24RegStruct::GTPprescale, TSLOCK, and TSUNLOCK.
int tsGetTrigInhibitWindow | ( | ) |
Get the trigger inhibit window.
References TS_A24RegStruct::triggerWindow, TS_TRIGGERWINDOW_INHIBIT_MASK, TSLOCK, and TSUNLOCK.
int tsGetTrigSrcEnabledFiberMask | ( | ) |
Returns the mask of fiber channels that report a "connected" status from a TI has it's trigger source enabled.
References TS_A24RegStruct::hfbr_tiID, TS_ID_TRIGSRC_ENABLE_MASK, TSLOCK, and TSUNLOCK.
int tsGetTSIODrive | ( | ) |
Return the Enable/Disable status the FPGA drive to the TSIO.
References TS_VMECONTROL_DRIVE_TSIO_EN, TSLOCK, TSUNLOCK, and TS_A24RegStruct::vmeControl.
int tsLive | ( | int | sflag | ) |
Calculate the live time (percentage) from the live and busy time scalers.
sflag | if > 0, then returns the integrated live time |
References TS_A24RegStruct::busytime, TS_A24RegStruct::livetime, TS_A24RegStruct::reset, TS_RESET_LATCH_TIMERS, TSLOCK, and TSUNLOCK.
int tsPrintFPDelay | ( | ) |
Print Front Panel Channel Delays to Standard Out.
References TS_A24RegStruct::fpDelay, TS_FPDELAY_MASK, TSLOCK, and TSUNLOCK.
void tsPrintTriggerTable | ( | int | inputType, |
int | subGroup, | ||
int | showbits | ||
) |
Print trigger table to standard out.
inputType | Input Type 0: GTP 1: FP |
subGroup | Each input type is grouped into 8 channels. 0: 1-8 1: 9-16 2: 17-24 3: 25-32 |
showbits | Show trigger bit pattern, instead of hex |
void tsStatus | ( | int | pflag | ) |
Print some status information of the TS to standard out.
pflag | if pflag>0, print out raw registers |
References TS_A24RegStruct::adr24, TS_A24RegStruct::adr32, TS_A24RegStruct::blockBuffer, TS_A24RegStruct::blocklevel, TS_A24RegStruct::blocklimit, TS_A24RegStruct::blockStatus, TS_A24RegStruct::boardID, TS_A24RegStruct::busy, TS_A24RegStruct::busytime, TS_A24RegStruct::clock, TS_A24RegStruct::dataFormat, TS_A24RegStruct::fiber, TS_A24RegStruct::fpInput, TS_A24RegStruct::GTPtrigger, TS_A24RegStruct::GTPtriggerBufferLength, TS_A24RegStruct::inputCounter, TS_A24RegStruct::intsetup, TS_A24RegStruct::livetime, TS_A24RegStruct::nblocks, TS_A24RegStruct::output, TS_A24RegStruct::reset, TS_A24RegStruct::sync, TS_A24RegStruct::syncEventCtrl, TS_A24RegStruct::trig1Prescale, TS_A24RegStruct::trigger, TS_RESET_LATCH_TIMERS, tsGetCurrentBlockLevel(), tsGetEventCounter(), TSLOCK, and TS_A24RegStruct::vmeControl.