fdhwlib  2.0.25
FEevent Class Reference

#include <FEevent.h>

Inheritance diagram for FEevent:
FEbaseEvent

List of all members.

Public Member Functions

Private Attributes


Detailed Description

The class collects all functions to handle the events detected by the second level trigger logic.

Basic for the access to the event data (and also to the image data) is the organization in 64 (SLT_PAGES) pages, numbered from 1 to 64. There is always one page in use at the same time

  • called the actual page. The other pages are filled with former events or are free. If an event is detected the page pointer switches to the next free page. To keep the system running it is important to free the filled pages from the application layer.

The trigger logic is separated from the generation of the next page signal. Both signals can be driven by several possible sources. The sources are described at getTriggerSource and getNextPageSource.

When the next page signal occurs two time stamps are available: The time the next page was generated and the time the last trigger was detected. The time of the trigger that finally caused the next page signal can easily be calculated from the next page time stamp and the delay between trigger and next page.

Todo:
Extend the getTimeStamp function to return also the address of the first and last trigger.

Changes:

  • Do not modify the NxPg-Source - should always be internal. Normally it should be sufficient to use the trigger. ak 7.2.01
  • getOldestPage removed (not implemented in the Hardware). ak 7.2.01
  • Description of the data structure of the event memory added (26.7.00, ak).

Definition at line 66 of file FEevent.h.


Constructor & Destructor Documentation

FEevent::FEevent ( Subrack s)

Member Function Documentation

void FEevent::disableLeftNeigborTrig ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::disableNeighborTrig ( ) [virtual]

Disables the second level trigger signals from the neighbor crates to cause a next page if one of neighbor crate detects a trigger.

Changes:

  • 14.5.01 ak. Using the define pragmas instead of constants in the source.

Reimplemented from FEbaseEvent.

void FEevent::disableNextPage ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::disablePageErr ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::disableRightNeighborTrig ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::enableLeftNeighborTrig ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::enableNeighborTrig ( ) [virtual]

Enables the second level trigger signals from the neighbor crates to cause a next page if one the neighbor crate detects a trigger.

Changes:

  • 14.5.01 ak. Using the define pragmas instead of constants in the source.

Reimplemented from FEbaseEvent.

void FEevent::enableNextPage ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::enablePageErr ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::enableRightNeighborTrig ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::forceTrigger ( ) [virtual]

Generate a software trigger signal.

The trigger will also be generated, if the trigger source software is not selected!

Changes:

  • 14.5.01 ak. Using the define pragmas instead of constants in the source.

Reimplemented from FEbaseEvent.

int FEevent::getActualPage ( ) [virtual]

Get the index of the actual page.

Returns:
1-64

Reimplemented from FEbaseEvent.

int FEevent::getCoincidenceTime ( ) [virtual]

Get the coincidence time of the Flt trigger signal.

Within this time two Flt trigger will be considered as belonging to one event.

Returns:
the coincidence time in multiples of 100ns (5..512)

Reimplemented from FEbaseEvent.

unsigned long FEevent::getLastTriggerTimeStampHigh ( int  page) [virtual]

Get the higher long word of the time stamp of the last trigger before the next page.

Reimplemented from FEbaseEvent.

unsigned long FEevent::getLastTriggerTimeStampLow ( int  page) [virtual]

Get the lower long word of the last trigger before the time stamp.

Reimplemented from FEbaseEvent.

int FEevent::getLengthOfBoxcar ( int  col = 0,
int  fpga = 1 
) [virtual]

Length of the BOXCAR-Sum in that is used to smooth the ADC values before making the trigger decision in units of 100ns.

Reimplemented from FEbaseEvent.

int FEevent::getNextPage ( ) [virtual]

Get the index of the page to which the system will proceed after the NxPg signal.

Here out of the free pages that one with the lowest page number is choosen.

Returns:
1-64

Reimplemented from FEbaseEvent.

int FEevent::getNextPageDelay ( ) [virtual]

To avoid the generation of more than one next page from one trigger it is possible to specify a delay between both signals.

The delay can be specified from 0 to 102.3us (10bit value, 1 digit = 100ns).

Returns:
The delay in multiples of 100ns (0-1023).

Reimplemented from FEbaseEvent.

void FEevent::getTimeStamp ( int  page,
unsigned long *  sec,
int *  subSec1,
int *  subSec2,
int *  imgAddr,
int *  evtAddr,
int *  trigger = 0 
) [virtual]

Get the time stamp of a page.

In addition the relativ address of the oldest time bin is returned.

Parameters:
pagePage number
secGPS seconds [s]
subSec1subseconds 0..9999 [100us]
subSec2subseconds 0..1999 [50ns]
imgAddrrelative address of the oldest time bin in the image memory
evtAddrrelative address of the oldest time bin in the event memory
triggerorigin of the trigger.
Todo:
Check the relation between times and address pointer in the hardware with Sascha or Matthias Balzer. Check also mirror.exe!

Reimplemented from FEbaseEvent.

void FEevent::getTimeStamp ( int  page,
FEtimeStamp timeStamp 
) [virtual]

Get the time stamp of the page.

The class FETimeStamp provides all functions to decode the information collected in the time stamps.

Reimplemented from FEbaseEvent.

unsigned long FEevent::getTimeStampHigh ( int  page) [virtual]

Get the higher long word of the time stamp of the next page signal.

Reimplemented from FEbaseEvent.

unsigned long FEevent::getTimeStampLow ( int  page) [virtual]

Get the lower long word of the time stamp the next page signal.

Reimplemented from FEbaseEvent.

int FEevent::getTriggerSource ( ) [virtual]

There are four possible sources for the generation of a second level trigger signal: The normal one - a matching pattern is detected, a second level trigger at one of the neighbor crates, the external trigger or a software trigger.

To select an arbitrary combination of these choises use the defined bitfields:

  • SLT_TRIGGER_SW software trigger,
  • SLT_TRIGGER_LEFT left neighbor
  • SLT_TRIGGER_RIGHT right neighbor,
  • SLT_TRIGGER_INT internal source,
  • SLT_TRIGGER_EXT external trigger,

Example: To select internal and left trigger use the folloing command.

      setTriggerSource(SLT_TRIGGER_INT | SLT_TRIGGER_LEFT);
      
Returns:
The possible trigger sources.

Changes:

  • 9.6.01 ak. The trigger sources can now be used in an arbitrary combination!
  • 14.5.01 ak. Using the define pragmas instead of constants in the source.

Reimplemented from FEbaseEvent.

bool FEevent::isEnabledLeftNeigborTrig ( ) [virtual]

Reimplemented from FEbaseEvent.

bool FEevent::isEnabledNeighborTrig ( ) [virtual]

Check whether the second level trigger signal from at least one of the neighbor crates is allowed to cause a trigger also for this crate.

Changes:

  • 14.5.01. Using the define pragmas instead of constants in the source.

Reimplemented from FEbaseEvent.

bool FEevent::isEnabledNextPage ( ) [virtual]

Reimplemented from FEbaseEvent.

bool FEevent::isEnabledPageErr ( ) [virtual]

Reimplemented from FEbaseEvent.

bool FEevent::isEnabledRightNeighborTrig ( ) [virtual]

Reimplemented from FEbaseEvent.

bool FEevent::isInUse ( int  page) [virtual]

Check the state of the specified page.

Returns:
false page is free, true page contains event data

Reimplemented from FEbaseEvent.

void FEevent::isInUse ( FEpageStatus status) [virtual]

Returns the content of the page status register.

The class SltPageStatus also provide methods to access the data.

Reimplemented from FEbaseEvent.

void FEevent::isInUse ( unsigned long *  status) [virtual]

Check the states of all pages.

Returns two long word with the state of all pages. The bits 0-31 correspond with the pages 1-32 and 33-64 respectively. Where the values 0 mark a free page and 1 indicates a page with event data.

Parameters:
statusPage status, status[0] Low Status bits for the pages 1-32, status[1] Status bits for the pages 33-64.

Reimplemented from FEbaseEvent.

unsigned long FEevent::isInUse ( ) [virtual]

Reimplemented from FEbaseEvent.

void FEevent::read ( int  page,
unsigned long *  data 
) [virtual]

Read the pixel data of the specified page.

The pixel data of each page is organized in a two dimensional array of 2000 element: In every cycle of 100ns the pixel data of two consecutive columns is read. After 10x100ns = 1us the algorithm starts again with the first column couple. The data can be described by the two dimensional array data[time][col], but there is an constant time displacement depending on the column number. The time span recorded for the 20 columns is 100x1us = 100us.

Each long word contains the pixel information obtained from the first level trigger and the corresponding pattern detected by second level trigger.

  • Bit 31-25 Number of the pattern (SLT)
  • Bit 24 ---
  • Bit 23 External trigger
  • Bit 22 Parity Error
  • Bit 21-0 Pixel information (FLT)

Changes:

  • 15.6.01 ak Functions for coincidence time added.

Reimplemented from FEbaseEvent.

void FEevent::read ( int  page,
int  start,
unsigned long *  data 
) [virtual]

Read trigger date.

Parameters:
pagePage number 1..64
start0..1999
dataArray with the returned data

Reimplemented from FEbaseEvent.

void FEevent::readMultiplicity ( int  page,
unsigned char *  data 
) [virtual]

Read the multiplicity of the trigger for an event.

The multiplicity of 0..255 (8bit) is given every 100ns. The complete multiplicity for the event consists of 1000 values.

Reimplemented from FEbaseEvent.

void FEevent::readMultiplicity ( int  page,
int  start,
unsigned char *  data 
) [virtual]

Read the multiplicity.

Parameters:
pagePage number 1..64
start0..999
dataArray with the returned data

Reimplemented from FEbaseEvent.

void FEevent::setCoincidenceTime ( int  time) [virtual]

Set the coincidence time (multiples of 100ns)

Reimplemented from FEbaseEvent.

void FEevent::setNextPageDelay ( int  delay) [virtual]

Set the delay between trigger and next page signal in multiples of 100ns.

Reimplemented from FEbaseEvent.

void FEevent::setPageFree ( int  page) [virtual]

Mark the specified page as free.

Reimplemented from FEbaseEvent.

void FEevent::setPageInUse ( int  page) [virtual]

Mark the specified page as used.

Be aware that there will be no next page signal for this page. To manipulate the page index the inhibit signal is set for some time - this will interfere the normal mode of operation.

Changes:

  • 14.5.01 ak. The inhibit mask will not be changed temporally any more by this command. It is possible in every mode to inhibit the electronic.

Reimplemented from FEbaseEvent.

void FEevent::setTriggerSource ( int  source) [virtual]

Set the trigger source as described with getTriggerSource().

Reimplemented from FEbaseEvent.

int FEevent::waitForNextPage ( ) [virtual]

Blocks the execution until a next page signal occurs.

Returns:
The number of the page active before the next page signal was generated (1-64).

Reimplemented from FEbaseEvent.

void FEevent::waitForPageErr ( ) [virtual]

If the page management switches to the last page it will generate a page error.

At this time the system is still running, but another next page signal will stop the system (inhibit).

Reimplemented from FEbaseEvent.


Member Data Documentation

Subrack* FEevent::s [private]

Definition at line 377 of file FEevent.h.


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