fdhwlib  2.0.25
FEbaseEvent Class Reference

#include <febaseevent.h>

Inheritance diagram for FEbaseEvent:
FE4event FEevent

List of all members.

Public Member Functions


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 32 pages, numbered from 1 to 32. 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.

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.

Definition at line 53 of file febaseevent.h.


Constructor & Destructor Documentation

FEbaseEvent::FEbaseEvent ( )
virtual FEbaseEvent::~FEbaseEvent ( ) [virtual]

Member Function Documentation

virtual void FEbaseEvent::disableLeftNeigborTrig ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::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.

Reimplemented in FE4event, and FEevent.

virtual void FEbaseEvent::disableNextPage ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::disablePageErr ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::disableRightNeighborTrig ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::enableLeftNeighborTrig ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::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.

Reimplemented in FE4event, and FEevent.

virtual void FEbaseEvent::enableNextPage ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::enablePageErr ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::enableRightNeighborTrig ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::forceTrigger ( ) [virtual]

Generate a software trigger signal.

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

Reimplemented in FEevent, and FE4event.

virtual int FEbaseEvent::getActualPage ( ) [virtual]

Get the index of the actual page.

Returns:
1-64

Reimplemented in FE4event, and FEevent.

virtual int FEbaseEvent::getCoincidenceTime ( ) [virtual]

Get the coincidence time of the Flt trigger signal.

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

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

Reimplemented in FEevent, and FE4event.

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

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

Reimplemented in FEevent.

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

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

Reimplemented in FE4event, and FEevent.

virtual int FEbaseEvent::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 in FEevent, and FE4event.

virtual int FEbaseEvent::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 in FE4event, and FEevent.

virtual int FEbaseEvent::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 in FEevent, and FE4event.

virtual int FEbaseEvent::getNumFreePages ( ) [virtual]

Return the number of currently free pages.

Reimplemented in FE4event.

virtual int FEbaseEvent::getOldestPage ( ) [virtual]

Return the page number (1..64) of the oldest page, 0 if no page filled.

Reimplemented in FE4event.

virtual void FEbaseEvent::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 in FE4event, and FEevent.

virtual void FEbaseEvent::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 in FEevent.

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

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

Reimplemented in FE4event, and FEevent.

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

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

Reimplemented in FE4event, and FEevent.

virtual int FEbaseEvent::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.

Reimplemented in FE4event, and FEevent.

virtual bool FEbaseEvent::isEnabledLeftNeigborTrig ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual bool FEbaseEvent::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.

Reimplemented in FEevent, and FE4event.

virtual bool FEbaseEvent::isEnabledNextPage ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual bool FEbaseEvent::isEnabledPageErr ( ) [virtual]

Reimplemented in FEevent, and FE4event.

virtual bool FEbaseEvent::isEnabledRightNeighborTrig ( ) [virtual]

Reimplemented in FEevent, and FE4event.

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

Check the state of the specified page.

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

Reimplemented in FE4event, and FEevent.

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

Returns the content of the page status register.

The class SltPageStatus also provide methods to access the data.

Reimplemented in FEevent.

virtual void FEbaseEvent::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. 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 in FE4event, and FEevent.

virtual unsigned long FEbaseEvent::isInUse ( ) [virtual]

Reimplemented in FEevent.

virtual bool FEbaseEvent::isPageFull ( ) [virtual]

Return true, if allpages are full.

virtual bool FEbaseEvent::isPageReady ( ) [virtual]

Return true, if there is any page filled (ready).

Reimplemented in FE4event.

virtual void FEbaseEvent::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)

Reimplemented in FEevent, and FE4event.

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

Read trigger data.

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

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::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 in FEevent.

virtual void FEbaseEvent::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 in FEevent.

virtual void FEbaseEvent::readMultiplicityPage ( int  start,
unsigned long *  data 
) [virtual]

Read the MultiplicityPage (new for V4; see SLT docu).

Reimplemented in FE4event.

virtual void FEbaseEvent::readSltPage ( int  start,
unsigned long *  data 
) [virtual]

Read the SLT page (new for V4; see SLT docu).

Reimplemented in FE4event.

virtual void FEbaseEvent::resetPages ( ) [virtual]

Clear all pages.

Reimplemented in FE4event.

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

Set the coincidence time (multiples of 100ns)

Reimplemented in FEevent, and FE4event.

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

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

Reimplemented in FEevent, and FE4event.

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

Mark the specified page as free.

Reimplemented in FE4event, and FEevent.

virtual void FEbaseEvent::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.

Reimplemented in FE4event, and FEevent.

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

Set the trigger source as described with getTriggerSource().

Reimplemented in FE4event, and FEevent.

virtual int FEbaseEvent::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-32/1-64).

Reimplemented in FEevent, and FE4event.

virtual void FEbaseEvent::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 in FEevent, and FE4event.


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