fdhwlib
2.0.25
|
#include <febaseevent.h>
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
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.
Definition at line 53 of file febaseevent.h.
FEbaseEvent::FEbaseEvent | ( | ) |
virtual FEbaseEvent::~FEbaseEvent | ( | ) | [virtual] |
virtual void FEbaseEvent::disableLeftNeigborTrig | ( | ) | [virtual] |
virtual void FEbaseEvent::disableNeighborTrig | ( | ) | [virtual] |
virtual void FEbaseEvent::disableRightNeighborTrig | ( | ) | [virtual] |
virtual void FEbaseEvent::enableLeftNeighborTrig | ( | ) | [virtual] |
virtual void FEbaseEvent::enableNeighborTrig | ( | ) | [virtual] |
virtual void FEbaseEvent::enableRightNeighborTrig | ( | ) | [virtual] |
virtual void FEbaseEvent::forceTrigger | ( | ) | [virtual] |
virtual int FEbaseEvent::getActualPage | ( | ) | [virtual] |
virtual int FEbaseEvent::getCoincidenceTime | ( | ) | [virtual] |
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] |
virtual int FEbaseEvent::getLengthOfBoxcar | ( | int | col = 0 , |
int | fpga = 1 |
||
) | [virtual] |
virtual int FEbaseEvent::getNextPage | ( | ) | [virtual] |
virtual int FEbaseEvent::getNextPageDelay | ( | ) | [virtual] |
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.
page | Page number |
sec | GPS seconds [s] |
subSec1 | subseconds 0..9999 [100us] |
subSec2 | subseconds 0..1999 [50ns] |
imgAddr | relative address of the oldest time bin in the image memory |
evtAddr | relative address of the oldest time bin in the event memory |
trigger | origin of the trigger. |
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] |
virtual unsigned long FEbaseEvent::getTimeStampLow | ( | int | page | ) | [virtual] |
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:
Example: To select internal and left trigger use the folloing command.
setTriggerSource(SLT_TRIGGER_INT | SLT_TRIGGER_LEFT);
virtual bool FEbaseEvent::isEnabledLeftNeigborTrig | ( | ) | [virtual] |
virtual bool FEbaseEvent::isEnabledNeighborTrig | ( | ) | [virtual] |
virtual bool FEbaseEvent::isEnabledRightNeighborTrig | ( | ) | [virtual] |
virtual bool FEbaseEvent::isInUse | ( | int | page | ) | [virtual] |
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.
status | Page status, status[0] Low Status bits for the pages 1-32, status[1] Status bits for the pages 33-64. |
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.
virtual void FEbaseEvent::read | ( | int | page, |
int | start, | ||
unsigned long * | data | ||
) | [virtual] |
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.
page | Page number 1..64 |
start | 0..999 |
data | Array 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] |
virtual void FEbaseEvent::setNextPageDelay | ( | int | delay | ) | [virtual] |
virtual void FEbaseEvent::setPageFree | ( | int | page | ) | [virtual] |
virtual void FEbaseEvent::setPageInUse | ( | int | page | ) | [virtual] |
virtual void FEbaseEvent::setTriggerSource | ( | int | source | ) | [virtual] |
Set the trigger source as described with getTriggerSource().
virtual int FEbaseEvent::waitForNextPage | ( | ) | [virtual] |
virtual void FEbaseEvent::waitForPageErr | ( | ) | [virtual] |