fdhwlib
2.0.25
|
#include <FEevent.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 64 (SLT_PAGES) pages, numbered from 1 to 64. 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 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.
Changes:
FEevent::FEevent | ( | Subrack * | s | ) |
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:
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:
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:
Reimplemented from FEbaseEvent.
int FEevent::getActualPage | ( | ) | [virtual] |
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.
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.
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).
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.
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. |
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:
Example: To select internal and left trigger use the folloing command.
setTriggerSource(SLT_TRIGGER_INT | SLT_TRIGGER_LEFT);
Changes:
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:
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.
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.
status | Page 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.
Changes:
Reimplemented from FEbaseEvent.
void FEevent::read | ( | int | page, |
int | start, | ||
unsigned long * | data | ||
) | [virtual] |
Read trigger date.
page | Page number 1..64 |
start | 0..1999 |
data | Array 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.
page | Page number 1..64 |
start | 0..999 |
data | Array 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:
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.
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.
Subrack* FEevent::s [private] |