fdhwlib
2.0.25
|
#include <fe4event.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 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.
Definition at line 56 of file fe4event.h.
FE4event::FE4event | ( | hw4::SubrackAuger * | s | ) |
void FE4event::disableLeftNeigborTrig | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
void FE4event::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 from FEbaseEvent.
void FE4event::disableNextPage | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
void FE4event::disablePageErr | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
void FE4event::disableRightNeighborTrig | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
void FE4event::enableLeftNeighborTrig | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
void FE4event::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 from FEbaseEvent.
void FE4event::enableNextPage | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
void FE4event::enablePageErr | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
void FE4event::enableRightNeighborTrig | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
void FE4event::forceTrigger | ( | ) | [virtual] |
Generate a software trigger signal.
The trigger will also be generated, if the trigger source software is not selected!
Reimplemented from FEbaseEvent.
int FE4event::getActualPage | ( | ) | [virtual] |
int FE4event::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.
Reimplemented from FEbaseEvent.
unsigned long FE4event::getLastTriggerTimeStampLow | ( | int | page | ) | [virtual] |
Get the lower long word of the last trigger before the time stamp.
Reimplemented from FEbaseEvent.
int FE4event::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.
For col=0 the setting of the first found FLT is returned.
For V4 the parameter fpga is ignored.
Reimplemented from FEbaseEvent.
int FE4event::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 FE4event::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 (11bit value, 1 digit = 50ns (?-tb-)).
Reimplemented from FEbaseEvent.
virtual int FE4event::getNumFreePages | ( | ) | [virtual] |
Return the number of currently free pages.
Reimplemented from FEbaseEvent.
virtual int FE4event::getOldestPage | ( | ) | [virtual] |
Return the page number (1..64) of the oldest page, 0 if no page filled.
Reimplemented from FEbaseEvent.
void FE4event::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 FE4event::getTimeStamp | ( | int | page, |
FE4timeStamp * | timeStamp | ||
) |
Get the time stamp of the page.
The class FE4TimeStamp provides all functions to decode the information collected in the time stamps.
unsigned long FE4event::getTimeStampHigh | ( | int | page | ) | [virtual] |
Get the higher long word of the time stamp of the next page signal.
Reimplemented from FEbaseEvent.
unsigned long FE4event::getTimeStampLow | ( | int | page | ) | [virtual] |
Get the lower long word of the time stamp the next page signal.
Reimplemented from FEbaseEvent.
int FE4event::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);
Reimplemented from FEbaseEvent.
bool FE4event::isEnabledLeftNeigborTrig | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
bool FE4event::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 from FEbaseEvent.
bool FE4event::isEnabledNextPage | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
bool FE4event::isEnabledPageErr | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
bool FE4event::isEnabledRightNeighborTrig | ( | ) | [virtual] |
Reimplemented from FEbaseEvent.
bool FE4event::isInUse | ( | int | page | ) | [virtual] |
Check the state of the specified page.
Reimplemented from FEbaseEvent.
void FE4event::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. |
Reimplemented from FEbaseEvent.
virtual bool FE4event::isPageReady | ( | ) | [virtual] |
Return true, if there is any page filled (ready).
Reimplemented from FEbaseEvent.
void FE4event::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.
Reimplemented from FEbaseEvent.
void FE4event::read | ( | int | page, |
int | start, | ||
unsigned long * | data | ||
) | [virtual] |
Read trigger data.
page | Page number 1..64 |
start | 0..1999 |
data | Array with the returned data |
Reimplemented from FEbaseEvent.
void FE4event::readMultiplicity | ( | int | page, |
unsigned short * | data | ||
) |
Read the multiplicity of the trigger for an event.
The multiplicity of 0..440 (9bit) is given every 100ns. The complete multiplicity for the event consists of 1000 values.
Note: Not implemented !
void FE4event::readMultiplicity | ( | int | page, |
int | start, | ||
unsigned short * | data | ||
) |
Read the multiplicity.
page | Page number 1..64 |
start | 0..999 |
data | Array with the returned data |
Note: Not implemented !
void FE4event::readMultiplicityPage | ( | int | pageStartOffset, |
unsigned long * | data | ||
) | [virtual] |
Read the MultiplicityPage (new for V4; see SLT docu).
The multiplicity page provides the projection and the multiplicity information of a event. STILL UNDER DEVELOPMENT! -tb-
pageStartOffset | 0..999 ; (this should be the value of the event status register) |
data | Array with the returned data |
Reimplemented from FEbaseEvent.
void FE4event::readSltPage | ( | int | pageStartOffset, |
unsigned long * | data | ||
) | [virtual] |
Read the SLT page (new for V4; see SLT docu).
The SLT page provides the extended pixel trigger data, the pattern number and the global trigger flag of a event. (Be sure to enable the pixel trigger bus and to set the SLT Control register Run bit to Run mode (not test mode)!!) Check the page management ("automatic" is recommended). One timeslot is 100 ns. STILL UNDER DEVELOPMENT! -tb-
pageStartOffset | 0..1999 ; (this should be the value of the event status register) |
data | Array with the returned data. You can use a 2d array (example: unsigned long someData[100][20]; ... readSltPage(pageStartOffset,&someData[0][0]);). |
Reimplemented from FEbaseEvent.
virtual void FE4event::resetPages | ( | ) | [virtual] |
Clear all pages.
Reimplemented from FEbaseEvent.
void FE4event::setCoincidenceTime | ( | int | time | ) | [virtual] |
Set the coincidence time (multiples of 100ns).
(3 bit value, 0<= time <=7)
Reimplemented from FEbaseEvent.
void FE4event::setNextPageDelay | ( | int | delay | ) | [virtual] |
Set the delay between trigger and next page signal in multiples of 50ns.
Reimplemented from FEbaseEvent.
void FE4event::setPageFree | ( | int | page | ) | [virtual] |
Mark the specified page as free.
In V4 'page' is not needed (ignored). Always the oldest page is released
Reimplemented from FEbaseEvent.
void FE4event::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 from FEbaseEvent.
void FE4event::setTriggerSource | ( | int | source | ) | [virtual] |
Set the trigger source as described with getTriggerSource().
Reimplemented from FEbaseEvent.
int FE4event::waitForNextPage | ( | ) | [virtual] |
Blocks the execution until a next page signal occurs.
Reimplemented from FEbaseEvent.
void FE4event::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.
hw4::SubrackAuger* FE4event::s [private] |
Definition at line 375 of file fe4event.h.