fdhwlib
2.0.25
|
#include <slt.h>
The class Slt provides the definition for the registers of the second level trigger board (SLT) of the version 4 electronics.
The names of the registers are choosen as found in the hardware description. For a systematic access to all registers without knowledge of the specific register structure the array regList is introduced. The array contains a list of all available registers.
enum hw4::Slt::RunMode |
Status of the electronic:
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 195 of file sltkatrin.h.
enum hw4::Slt::RunMode |
Status of the electronic:
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
hw4::Slt::Slt | ( | int | ID, |
const char * | inifile = "FE.ini" |
||
) |
virtual hw4::Slt::~Slt | ( | ) | [virtual] |
hw4::Slt::Slt | ( | int | ID, |
const char * | inifile = "FE.ini" |
||
) |
virtual hw4::Slt::~Slt | ( | ) | [virtual] |
hw4::Slt::Slt | ( | int | ID, |
const char * | inifile = "FE.ini" |
||
) |
virtual hw4::Slt::~Slt | ( | ) | [virtual] |
int hw4::Slt::checkActualTime | ( | long int * | tDiff, |
long int * | tDiffEye, | ||
int * | tMeas, | ||
int * | tPhase, | ||
long int * | tDiffGps = 0 , |
||
int | id = 0 , |
||
int | n = 1 , |
||
const char * | gpsserver = "localhost" , |
||
int | gpsport = 0 |
||
) |
Compare the PC clock and the hardware clock of all connected telescopes.This function is an extension for more than one telescope connected in PBUS_IP mode.
tDiff | The difference t(Hardware) - t(MirrorPC) in seconds. |
tDiffEye | The difference t(MirrorPC) - t(EyePC) in seconds. |
tMeas | The measurement point in ms relative to the last second strobe |
tPhase | The phase in ms between the GPS time of the hardware and the NTP time of the EyePC: t(Hardware) - t(EyePC) t is the time of the second strobe in each case. |
tDiffGps | Difference of the gps clock Two values: oncode time and auger counter |
id | Number of the telescope to test. 0 (default) is the actual telescope |
n | Number of telescopes to analyse If n > 1 you need to provide a array for the first argument (tDiff). |
gpsserver | Hostname of the gpsserver (default: localhost) |
gpsport | Port of the gpsserver (0 to use the default port) |
Reimplemented in hw4::SltAuger.
int hw4::Slt::checkActualTime | ( | long int * | tDiff, |
long int * | tDiffEye, | ||
int * | tMeas, | ||
int * | tPhase, | ||
long int * | tDiffGps = 0 , |
||
int | id = 0 , |
||
int | n = 1 , |
||
const char * | gpsserver = "localhost" , |
||
int | gpsport = 0 |
||
) |
Compare the PC clock and the hardware clock of all connected telescopes.This function is an extension for more than one telescope connected in PBUS_IP mode.
tDiff | The difference t(Hardware) - t(MirrorPC) in seconds. |
tDiffEye | The difference t(MirrorPC) - t(EyePC) in seconds. |
tMeas | The measurement point in ms relative to the last second strobe |
tPhase | The phase in ms between the GPS time of the hardware and the NTP time of the EyePC: t(Hardware) - t(EyePC) t is the time of the second strobe in each case. |
tDiffGps | Difference of the gps clock Two values: oncode time and auger counter |
id | Number of the telescope to test. 0 (default) is the actual telescope |
n | Number of telescopes to analyse If n > 1 you need to provide a array for the first argument (tDiff). |
gpsserver | Hostname of the gpsserver (default: localhost) |
gpsport | Port of the gpsserver (0 to use the default port) |
Reimplemented in hw4::SltAuger.
int hw4::Slt::checkConfig | ( | ) |
Check hardware configuration.
Results:
void hw4::Slt::checkDeadTime | ( | unsigned long long * | tDead, |
unsigned long long * | tVeto, | ||
double * | tRecord, | ||
double * | tPageFull, | ||
procDuration * | tMeas = 0 |
||
) |
Check the operation time of the crate.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::checkDeadTime | ( | unsigned long long * | tDead, |
unsigned long long * | tVeto, | ||
double * | tRecord, | ||
double * | tPageFull, | ||
procDuration * | tMeas = 0 |
||
) |
Check the operation time of the crate.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::checkHardwareModelVersion | ( | FILE * | fout = stdout , |
const char * | indent = "" |
||
) |
Check version of the Hardware model and the connected electronic.
void hw4::Slt::checkHardwareModelVersion | ( | FILE * | fout = stdout , |
const char * | indent = "" |
||
) |
Check version of the Hardware model and the connected electronic.
void hw4::Slt::checkHardwareModelVersion | ( | FILE * | fout = stdout , |
const char * | indent = "" |
||
) |
Check version of the Hardware model and the connected electronic.
bool hw4::Slt::checkPresence | ( | ) | [virtual] |
Check whether the board is responding and returns the correct slot id.
Reimplemented from SubrackBoardBase.
bool hw4::Slt::checkPresence | ( | ) | [virtual] |
Check whether the board is responding and returns the correct slot id.
Reimplemented from SubrackBoardBase.
bool hw4::Slt::checkPresence | ( | ) | [virtual] |
Check whether the board is responding and returns the correct slot id.
Reimplemented from SubrackBoardBase.
bool hw4::Slt::checkProject | ( | ) | [virtual] |
Check project number and FPGA design.
Reimplemented from SubrackBoardBase.
int hw4::Slt::checkTime | ( | double * | tDiff = 0 , |
int * | tSecErr = 0 , |
||
int * | tPhase = 0 , |
||
procDuration * | tPC = 0 |
||
) |
Check hardware and PC clock synchrony.
The approach used is faster than that implemented in checkActualTime(). It uses the subsecond counters to determine second error and phase between hardware and PC clock.
The function checks only the selected telescope.
return 0 Ok, -1 hardware not responding, bit 1 warning internal second strobe, bit 2 time error param tDiff Difference tHw - t PC [s] param tSecErr Second error tHw - t PC [s] param tPhase Offset between the second strobes in Hw and PC [us] param tPC Measurement intervall.
Reimplemented in hw4::SltAuger.
int hw4::Slt::checkTime | ( | double * | tDiff = 0 , |
int * | tSecErr = 0 , |
||
int * | tPhase = 0 , |
||
procDuration * | tPC = 0 |
||
) |
Check hardware and PC clock synchrony.
The approach used is faster than that implemented in checkActualTime(). It uses the subsecond counters to determine second error and phase between hardware and PC clock.
The function checks only the selected telescope.
return 0 Ok, -1 hardware not responding, bit 1 warning internal second strobe, bit 2 time error param tDiff Difference tHw - t PC [s] param tSecErr Second error tHw - t PC [s] param tPhase Offset between the second strobes in Hw and PC [us] param tPC Measurement intervall.
Reimplemented in hw4::SltAuger.
std::string hw4::Slt::convertTimeToText | ( | unsigned long long | time, |
int | showSubSecs = 0 |
||
) |
Convert ded or veto times to a character string.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
std::string hw4::Slt::convertTimeToText | ( | unsigned long long | time, |
int | showSubSecs = 0 |
||
) |
Convert ded or veto times to a character string.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::convertToGPS | ( | SltTime * | time, |
time_t | t_utc | ||
) |
Convert to GPS time.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::convertToGPS | ( | SltTime * | time, |
time_t | t_utc | ||
) |
Convert to GPS time.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::convertToUTC | ( | time_t * | t_utc, |
unsigned long | time | ||
) |
Convert the Hardware second counter the the format used by the PC (UTC time started at 1.1.1970)
t_utc | Second counter in UTC format |
time | Time in Hardware format |
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::convertToUTC | ( | time_t * | t_utc, |
unsigned long | time | ||
) |
Convert the Hardware second counter the the format used by the PC (UTC time started at 1.1.1970)
t_utc | Second counter in UTC format |
time | Time in Hardware format |
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::convertToUTC | ( | time_t * | t_utc, |
SltTime | time | ||
) |
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::convertToUTC | ( | time_t * | t_utc, |
SltTime | time | ||
) |
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::getActivePages | ( | int | time, |
int * | pages, | ||
int * | continous | ||
) |
Get the number of active and the fraction of continously trigger pages in a given interval.
time | Age of the considered pages in seconds (0 all time) |
pages | Pointer to the number of active pages |
continous | Pointer to the number of continuous triggered pages |
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::getActivePages | ( | int | time, |
int * | pages, | ||
int * | continous | ||
) |
Get the number of active and the fraction of continously trigger pages in a given interval.
time | Age of the considered pages in seconds (0 all time) |
pages | Pointer to the number of active pages |
continous | Pointer to the number of continuous triggered pages |
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::getActualTime | ( | SltTime * | time | ) |
Get the actual time of the system.
Note: The system runs with GPS time. The GPS second count differs from the UNIX System time by about 10 years.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
void hw4::Slt::getActualTime | ( | SltTime * | time | ) |
Get the actual time of the system.
Note: The system runs with GPS time. The GPS second count differs from the UNIX System time by about 10 years.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
int hw4::Slt::getHardwareModelVersion | ( | ) |
Give the version of the used harware model.
The version of the model and the implemented register model of the connected electronic have to fit together.
int hw4::Slt::getHardwareModelVersion | ( | ) |
Give the version of the used harware model.
The version of the model and the implemented register model of the connected electronic have to fit together.
int hw4::Slt::getHardwareModelVersion | ( | ) |
Give the version of the used harware model.
The version of the model and the implemented register model of the connected electronic have to fit together.
RunMode hw4::Slt::getRunMode | ( | ) |
Get System state.
The system state is defined by the configuration of the signal sources and the level of the signals.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
RunMode hw4::Slt::getRunMode | ( | ) |
Get System state.
The system state is defined by the configuration of the signal sources and the level of the signals.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
std::string hw4::Slt::getRunModeText | ( | ) |
Give text output for the run modes.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
std::string hw4::Slt::getRunModeText | ( | ) |
Give text output for the run modes.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
std::string hw4::Slt::getRunModeText | ( | RunMode | mode | ) |
Reimplemented in hw4::SltKatrin.
std::string hw4::Slt::getRunModeText | ( | RunMode | mode | ) |
Reimplemented in hw4::SltKatrin.
int hw4::Slt::getVersion | ( | int | unit = 0 | ) | [virtual] |
Read the version of the FPGA design.
Reimplemented from SubrackBoardBase.
int hw4::Slt::getVersion | ( | int | unit = 0 | ) | [virtual] |
Read the version of the FPGA design.
Reimplemented from SubrackBoardBase.
int hw4::Slt::getVersion | ( | int | unit = 0 | ) | [virtual] |
Read the version of the FPGA design.
Reimplemented from SubrackBoardBase.
void hw4::Slt::printConfigToInifile | ( | FILE * | fout | ) |
Print Slt configuration in inifile format.
void hw4::Slt::printExpectedConfig | ( | FILE * | fout | ) |
Print the expected hardware configuration.
int hw4::Slt::readDeadTime | ( | unsigned long long * | tDead, |
unsigned long long * | tVeto, | ||
unsigned long long * | tInhibit | ||
) |
Read dead and veto times Calculate the inhibit time by substracting both.
The inhibit time is only valid if the function returns zero.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
int hw4::Slt::readDeadTime | ( | unsigned long long * | tDead, |
unsigned long long * | tVeto, | ||
unsigned long long * | tInhibit | ||
) |
Read dead and veto times Calculate the inhibit time by substracting both.
The inhibit time is only valid if the function returns zero.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
int hw4::Slt::readExpectedConfig | ( | akInifile * | config | ) |
Read expected hardware configuration from inifile.
unsigned long hw4::Slt::setActualTime | ( | ) |
Synchronize the actual time of the system with the local PC clock.
To set the correct value of the second, the function waits 300ms after the next second change. Then the UTC second counter ist converted to GPS seconds second counter is written. The hardware will set this value with the next second strobe. Finally the function checks, whether it was possible to finish the operation within one second.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
unsigned long hw4::Slt::setActualTime | ( | ) |
Synchronize the actual time of the system with the local PC clock.
To set the correct value of the second, the function waits 300ms after the next second change. Then the UTC second counter ist converted to GPS seconds second counter is written. The hardware will set this value with the next second strobe. Finally the function checks, whether it was possible to finish the operation within one second.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Reimplemented in hw4::SltAuger.
Definition at line 395 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 313 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 361 of file sltkatrin.h.
Command register.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 265 of file sltkatrin.h.
Control register.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 259 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 397 of file sltkatrin.h.
Interval of the dead time checks.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 402 of file sltkatrin.h.
unsigned long long Slt::deadStart |
Dead time counter at start in interval.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 405 of file sltkatrin.h.
Counter for the dead-time.
Use the command reset dead-time to reset the counter before starting the data aquisition run.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 305 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 315 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 378 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 376 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 371 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 355 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 369 of file sltkatrin.h.
The register contains the interrupt mask.
High bits will disable the interrupt and low bits will enable it.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 270 of file sltkatrin.h.
The register gives the actual interrupt status of the SLT board.
After the interrupt acknowledge cycle the register is cleared.
Name in Slt fpga documentation: Interrupt Request
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 279 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 385 of file sltkatrin.h.
Timing and trigger information of the recorded events.
Defines the number of active registers in the page numbers list This register will contain always 64 unless some registers should be taken out of operation.
Reimplemented in hw4::SltAuger.
Definition at line 351 of file sltkatrin.h.
Status register of the page controller.
Reimplemented in hw4::SltAuger.
Definition at line 334 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 353 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 309 of file sltkatrin.h.
Check of the pixel bus connection.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 293 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 311 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 383 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 357 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 363 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 359 of file sltkatrin.h.
List of three hardware semaphores to synchronize the hardware access independant from software means.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 283 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 307 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 328 of file sltkatrin.h.
uint64_t hw4::Slt::serialno |
Set Slt second count.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 325 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 387 of file sltkatrin.h.
Status register.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 262 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 331 of file sltkatrin.h.
Definition at line 255 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 367 of file sltkatrin.h.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 365 of file sltkatrin.h.
Coincidence time T1 [100ns].
The system will generate a next page signal T1 * 100ns after a trigger is detected.
Reimplemented in hw4::SltAuger.
Definition at line 340 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 391 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 389 of file sltkatrin.h.
Reimplemented in hw4::SltAuger.
Definition at line 393 of file sltkatrin.h.
Control and status register for additional usct functions.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 318 of file sltkatrin.h.
Additional register for usct functions.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 321 of file sltkatrin.h.
uint32_t hw4::Slt::vdoc |
unsigned long long Slt::vetoStart |
Veto counter at start of interval.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 408 of file sltkatrin.h.
Counter for the veto-time.
Use the command reset dead-time to reset the counter before starting the data aquisition run.
Reimplemented in hw4::SltKatrin, and hw4::SltAuger.
Definition at line 299 of file sltkatrin.h.
uint32_t hw4::Slt::vfpga |
uint32_t hw4::Slt::vproject |