fdhwlib  2.0.25

#include <Slt.h>

Inheritance diagram for Slt:
SubrackBoard SubrackBoardBase

List of all members.

Public Types

Public Member Functions

Public Attributes


Detailed Description

The class Slt provides the definition for the registers of the second level trigger board (SLT).

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 theRegister is introduced. The array contains a list of all available registers.

Changes:

  • New status and interrupt mask registers for the sensor array, ak 9.6.01
  • The command SwNextPage is not existing any more. Use SwSltTrigger instead, 6.6.01 ak.
  • Version register introduced, 4.12.00 ak.
  • Error Status register introduced, 4.12.00 ak.
  • New registers Maintenance of the page controller introduced, 20.12.00 ak.
  • SltIRVector is now of type SltIRvector instead of SltRegister, 9.1.01 ak.

Definition at line 74 of file Slt.h.


Member Enumeration Documentation

Status of the electronic:

  • RUN No inhibit active, No Resets active, second strobe source = ext trigger source = int dead time enabled
  • CAL as RUN but dead time disabled
  • WAIT as RUN but all pages full active
  • STOP as RUN but ext or sw inhibit active
  • CERR DAQ configuration error
  • UNKOWN Other state
Enumerator:
RUN 
CAL 
WAIT 
STOP 
CERR 
UNKNOWN 

Definition at line 210 of file Slt.h.


Constructor & Destructor Documentation

Slt::Slt ( int  ID,
const char *  inifile = "FE.ini" 
)
virtual Slt::~Slt ( ) [virtual]

Member Function Documentation

int 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 PC clock and hardware system time (GPS time).

The alogorthm is comparable to that one used in the function Slt::setActualTime. Instead of writing the actual time is read and compared with the PC clock. The function returns the difference in seconds and the miliseconds since the last second strobe when the time was retrieved from the hardware.

Parameters:
tDiffThe difference t(Hardware) - t(PC) in seconds.
Returns:
Status of the function. 0 failed, > 0 success == number of miliseconds after the second strobe 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.
Parameters:
tDiffThe difference t(Hardware) - t(MirrorPC) in seconds.
tDiffEyeThe difference t(MirrorPC) - t(EyePC) in seconds.
tMeasThe measurement point in ms relative to the last second strobe
tPhaseThe 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.
tDiffGpsDifference of the gps clock Two values: oncode time and auger counter
idNumber of the telescope to test. 0 (default) is the actual telescope
nNumber of telescopes to analyse If n > 1 you need to provide a array for the first argument (tDiff).
gpsserverHostname of the gpsserver (default: localhost)
gpsportPort of the gpsserver (0 to use the default port)
Returns:
Status of the function. + 0 failed, > 0 success == number of miliseconds of the last test.
void Slt::checkDeadTime ( unsigned long long *  tDead,
unsigned long long *  tVeto,
double *  tRecord,
double *  tPageFull,
procDuration tMeas = 0 
)

Check the operation time of the crate.

void Slt::checkHardwareModelVersion ( FILE *  fout = stdout,
const char *  indent = "" 
)

Check version of the Hardware model and the connected electronic.

bool Slt::checkPresence ( ) [virtual]

Check whether the board is responding and returns the correct slot id.

Reimplemented from SubrackBoardBase.

int 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.

std::string Slt::convertTimeToText ( unsigned long long  time,
int  showSubSecs = 0 
)

Convert ded or veto times to a character string.

void Slt::convertToGPS ( SltTime time,
time_t  t_utc 
)

Convert to GPS time.

void 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)

Parameters:
t_utcSecond counter in UTC format
timeTime in Hardware format
void Slt::convertToUTC ( time_t *  t_utc,
SltTime time 
)
void Slt::getActivePages ( int  time,
int *  pages,
int *  continous 
)

Get the number of active and the fraction of continously trigger pages in a given interval.

Parameters:
timeAge of the considered pages in seconds (0 all time)
pagesPointer to the number of active pages
continousPointer to the number of continuous triggered pages
void 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.

int 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.

Returns:
The version number is given multiplied times 100.
RunMode Slt::getRunMode ( )

Get System state.

The system state is defined by the configuration of the signal sources and the level of the signals.

std::string Slt::getRunModeText ( )

Give text output for the run modes.

std::string Slt::getRunModeText ( RunMode  mode)
int Slt::getVersion ( int  unit = 0) [virtual]

Get the version of the board.

The format is major version * 100 + minor version number. E.g. 1.2 will result in the return value 120

Reimplemented from SubrackBoardBase.

void Slt::readDeadTime ( unsigned long *  high,
unsigned long *  low 
)

Read dead time counter.

void Slt::readDeadTime ( unsigned long long *  time)

Read dead time counter.

int 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.

void Slt::readVetoTime ( unsigned long *  high,
unsigned long *  low 
)

Read dead time counter.

void Slt::readVetoTime ( unsigned long long *  time)

Read dead time counter.

unsigned long 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.

Returns:
The second since beginning of GPS time when the crate was synchronized. A value of zero indicates that the setting failed. Repeat the function.

Member Data Documentation

Definition at line 402 of file Slt.h.

Definition at line 416 of file Slt.h.

Definition at line 410 of file Slt.h.

The register contains the pointer to the actual page that is in use to record the ADC data.

To switch the page pointer to the next free page (

See also:
NextPage) use the command PageMaintenance.

Definition at line 435 of file Slt.h.

Definition at line 400 of file Slt.h.

Definition at line 398 of file Slt.h.

Definition at line 297 of file Slt.h.

Interval of the dead time checks.

Definition at line 544 of file Slt.h.

unsigned long long Slt::deadStart[24]

Dead time counter at start in interval.

Definition at line 547 of file Slt.h.

Counter for the dead-time.

Use the command reset dead-time to reset the counter before starting the data aquisition run.

Definition at line 536 of file Slt.h.

Definition at line 538 of file Slt.h.

The register gives the actual status of the SLT board.

Changes (from low to high) in this register will cause the system to generate an interrupt. In oposite to the interrupt status register (IRstatus) this register will be not cleared with the interrupt acknowledge cycle. So the register can be used to observe a kind of "error status" of the system.

Definition at line 327 of file Slt.h.

The register contains the interrupt mask.

High bits will disable the interrupt and low bits will enable it.

Definition at line 312 of file Slt.h.

The register gives the actual interrupt status of the SLT board.

After the interrupt acknowledge cycle the register is cleared.

Definition at line 307 of file Slt.h.

Definition at line 315 of file Slt.h.

Definition at line 497 of file Slt.h.

Definition at line 520 of file Slt.h.

Set parameter for the multiplicity trigger function.

This is different than the multiplicity evaluation implemented togehter with the track finder trigger

Definition at line 514 of file Slt.h.

The register contains the pointer to next page the that will be used by the page controller if a next page signal occures.

The appropriate page is calculated automatically by the page controller.

Definition at line 443 of file Slt.h.

Definition at line 284 of file Slt.h.

Definition at line 287 of file Slt.h.

Each write access to this register will cause the page pointer (.

See also:
ActualPage) of SLT and FLT to switch to the next free page (
NextPage). This command will not generate an interrupt. It's main purpose is to set the data pointer during inhibit mode to a valid page before starting the system again.

Definition at line 354 of file Slt.h.

The page status registers keep track of the pages filled with event data.

Bit values of one represent pages filled with valid event data.

Definition at line 425 of file Slt.h.

Definition at line 495 of file Slt.h.

Each write access to this register will continue/start the system, if the system is stopped due to missing free pages.

Before starting the system make sure, there are enough free pages and the page pointer (

See also:
ActualPage) is set to a valid page.

Definition at line 364 of file Slt.h.

Definition at line 404 of file Slt.h.

Definition at line 418 of file Slt.h.

Definition at line 412 of file Slt.h.

Reset veto- and dead-time counter.

Definition at line 541 of file Slt.h.

Definition at line 459 of file Slt.h.

Definition at line 503 of file Slt.h.

Definition at line 501 of file Slt.h.

Definition at line 507 of file Slt.h.

The lowest eight bit mask the interrupt for the alarm generated by the corresponding sensor.

To generate an interupt for one of the sensors the generall interrupt mask has also to be unmasked. The register will be masked after reset.

  • 0 alarm interrupt is unmasked
  • 1 alarm interrupt is masked

Definition at line 480 of file Slt.h.

The lowest eight bit show the status of the eight sensors.

If the sensor data is out of specified range the status bit will show up with a one.

Definition at line 487 of file Slt.h.

Definition at line 505 of file Slt.h.

Definition at line 445 of file Slt.h.

Definition at line 447 of file Slt.h.

Definition at line 457 of file Slt.h.

Definition at line 299 of file Slt.h.

Definition at line 461 of file Slt.h.

Not available any more! Use SwSltTrigger instead.

Definition at line 339 of file Slt.h.

Read the sensor values from the Slt monitoring ADC.

Definition at line 394 of file Slt.h.

Each write access to this register will continue/start the system, if the system is stopped due to a software inhibit.

Definition at line 387 of file Slt.h.

Definition at line 396 of file Slt.h.

Each write access to this register will stop the system.

This command is always active independantly from the selected inhibit source.

Definition at line 381 of file Slt.h.

Each write access to this register will cause a trigger signal.

After the coincidence time T1 a next page signal is driven if the page controller is in normal mode of operation (Make sure the next page source is set to internal). The command has no effect, if the trigger source is not selected or the system is stopped by an inhibit.

Definition at line 376 of file Slt.h.

Definition at line 391 of file Slt.h.

Coincidence time T1 [100ns].

The system will generate a next page signal T1 * 100ns after the trigger was detected.

Definition at line 468 of file Slt.h.

Definition at line 450 of file Slt.h.

Definition at line 452 of file Slt.h.

Definition at line 454 of file Slt.h.

Definition at line 499 of file Slt.h.

Definition at line 518 of file Slt.h.

List of all registers.

Definition at line 294 of file Slt.h.

Definition at line 492 of file Slt.h.

Definition at line 290 of file Slt.h.

The version is given by a 16 bit integer.

The number has to be divided by 100 to get the actual version. (Example: The number 104 means version 1.04)

Definition at line 334 of file Slt.h.

unsigned long long Slt::vetoStart[24]

Veto counter at start of interval.

Definition at line 550 of file Slt.h.

Counter for the veto-time.

Use the command reset dead-time to reset the counter before starting the data aquisition run.

Definition at line 528 of file Slt.h.

Definition at line 530 of file Slt.h.


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