fdhwlib
2.0.25
|
#include <SltTimeBase.h>
Generalized class for AUGER specific time calculations and conversions.
The SLT (hardware) specific part of it might be implemented in a derived class.
Definition at line 32 of file SltTimeBase.h.
SltTimeBase::SltTimeBase | ( | ) |
Default constructor - doing basic initialisation.
virtual SltTimeBase::~SltTimeBase | ( | ) | [virtual] |
Virtual destructor - empty.
virtual void SltTimeBase::add | ( | SltTimeBase & | time | ) | [virtual] |
Add to the actual time.
virtual void SltTimeBase::addNanoSec | ( | unsigned long | nanosec | ) | [virtual] |
Add to the actual time.
const char* SltTimeBase::cDate | ( | ) |
Return the date as string.
const char* SltTimeBase::cTime | ( | ) |
Return the time as string.
void SltTimeBase::displayTime | ( | FILE * | fout | ) |
Display time.
virtual int SltTimeBase::getAllActiveTriggerSources | ( | ) | [inline, virtual] |
Get a list of all active triggers at the end of the recording for this event (next page signal).
Definition at line 177 of file SltTimeBase.h.
References triggerAllActive.
{ return triggerAllActive; }
virtual int SltTimeBase::getFltOffset | ( | ) | [inline, virtual] |
Get the address of the first time bin for readout of the Flt pages.
Reimplemented in SltTime, and hw4::SltTime.
Definition at line 192 of file SltTimeBase.h.
References isNotImplemented().
{ isNotImplemented("getFltOffset()"); return 0; }
virtual int SltTimeBase::getLastEventPage | ( | ) | [inline, virtual] |
Returns the page number of the last event.
This is not the page number where this event itself has been recorded!
Definition at line 187 of file SltTimeBase.h.
References lastEventPage.
{ return lastEventPage; }
virtual unsigned long SltTimeBase::getLastTrigger | ( | ) | [inline, virtual] |
Get the time stamp - raw data - for the last trigger time stamp.
Reimplemented in SltTime, and hw4::SltTime.
Definition at line 144 of file SltTimeBase.h.
References isNotImplemented().
{ isNotImplemented("getLastTrigger()"); return 0; }
virtual unsigned long SltTimeBase::getNanoSec | ( | ) | [virtual] |
Calculate the number of subseconds in units of 1ns.
unsigned long SltTimeBase::getSec | ( | ) | [inline] |
Get the Seconds (GPS second counter)
Definition at line 65 of file SltTimeBase.h.
References sec.
{ return sec; }
virtual int SltTimeBase::getSltOffset | ( | ) | [inline, virtual] |
Get the address of the first time bin for readout of the Slt pages.
Reimplemented in SltTime, and hw4::SltTime.
Definition at line 198 of file SltTimeBase.h.
References isNotImplemented().
{ isNotImplemented("getSltOffset()"); return 0; }
virtual unsigned long SltTimeBase::getSubSec | ( | ) | [inline, virtual] |
Get the time stamp - raw data format - for the subseconds.
Reimplemented in SltTime, and hw4::SltTime.
Definition at line 101 of file SltTimeBase.h.
References isNotImplemented().
{ isNotImplemented("getSubSec()"); return 0; }
void SltTimeBase::getSubSec | ( | int & | subSec1, |
int & | subSec2 | ||
) | [inline] |
virtual int SltTimeBase::getSubSec1 | ( | ) | [inline, virtual] |
virtual int SltTimeBase::getSubSec2 | ( | ) | [inline, virtual] |
int SltTimeBase::getTriggerSource | ( | ) | [inline] |
Returns the trigger source.
Definition at line 155 of file SltTimeBase.h.
References triggerSource.
{ return triggerSource; }
virtual const char* SltTimeBase::getTriggerSourceBrief | ( | ) | [inline, virtual] |
Returns a brief string for the trigger source.
Reimplemented in SltTime, and hw4::SltTime.
Definition at line 160 of file SltTimeBase.h.
References isNotImplemented().
{ isNotImplemented("getTriggerSourceBrief()"); return ""; }
virtual time_t SltTimeBase::getUTCSec | ( | ) | [virtual] |
Get the number of UTC seconds.
virtual int SltTimeBase::getVersion | ( | ) | [inline, virtual] |
Return the version of the time stamp.
Definition at line 204 of file SltTimeBase.h.
References sltVersion.
{ return sltVersion; }
void SltTimeBase::isNotImplemented | ( | const char * | what | ) | [protected] |
Issues a warning message if a un-implemented method is called.
Referenced by getFltOffset(), getLastTrigger(), getSltOffset(), getSubSec(), getTriggerSourceBrief(), setLastTrigger(), and setSubSec().
virtual SltTimeBase SltTimeBase::mean | ( | const SltTimeBase & | t1, |
const SltTimeBase & | t2 | ||
) | [virtual] |
Calculate the mean value of two time stamps.
virtual SltTimeBase& SltTimeBase::minus | ( | const SltTimeBase & | t1, |
const SltTimeBase & | t2 | ||
) | [virtual] |
Difference of two time stamps (t1 - t2).
All other fields are afterwards invalid !
Referenced by minus().
virtual void SltTimeBase::minus | ( | SltTimeBase & | time | ) | [inline, virtual] |
virtual SltTimeBase& SltTimeBase::operator= | ( | const SltTimeBase & | ) | [virtual] |
Assignment operator.
virtual SltTimeBase& SltTimeBase::operator= | ( | const unsigned long & | ) | [virtual] |
Assignment operator, abbreviation for the method setNanoSec().
Reimplemented in hw4::SltTime.
virtual void SltTimeBase::setAllActiveTriggerSources | ( | int | sources | ) | [inline, virtual] |
Set the field that summarizes all active trigger.
This function is intended only for simulation/test purpose.
Definition at line 170 of file SltTimeBase.h.
References triggerAllActive.
{ triggerAllActive = sources; }
virtual void SltTimeBase::setLastTrigger | ( | unsigned long | ) | [inline, virtual] |
Read the information from the LastTriggerTimeStamp - raw data.
The time stamp also includes information about the active trigger mask, the number of the page with the event before this and the readout pointer.
Reimplemented in SltTime, and hw4::SltTime.
Definition at line 139 of file SltTimeBase.h.
References isNotImplemented().
{ isNotImplemented("setLastTrigger(unsigned long)"); }
virtual void SltTimeBase::setNanoSec | ( | unsigned long | time | ) | [virtual] |
Set the fields with a time [ns].
void SltTimeBase::setSec | ( | unsigned long | gps_time | ) | [inline] |
Set the second counter with GPS seconds.
Definition at line 60 of file SltTimeBase.h.
References sec.
{ sec = gps_time; // 32bit !!! }
virtual void SltTimeBase::setSecFromUTC | ( | time_t | t_utc | ) | [virtual] |
Set the second counter using a UTC time.
The UTC seconds are converted to the correct number of GPS seconds before.
virtual void SltTimeBase::setSubSec | ( | unsigned long | ) | [inline, virtual] |
Set sub-second fields with the information read from the sub-second counter.
Reimplemented in SltTime, and hw4::SltTime.
Definition at line 81 of file SltTimeBase.h.
References isNotImplemented().
{ isNotImplemented("setSubSec(unsigned long)"); }
void SltTimeBase::setSubSec | ( | int | subSec1, |
int | subSec2 | ||
) | [inline] |
void SltTimeBase::setSubSec1 | ( | int | subSec1 | ) | [inline] |
void SltTimeBase::setSubSec2 | ( | int | subSec2 | ) | [inline] |
virtual void SltTimeBase::setSubSecFromNanoSec | ( | unsigned long | time | ) | [virtual] |
Set the sub-second fields to a time in [ns].
If the time is larger than a second the second part is not considered.
void SltTimeBase::setTriggerSource | ( | int | source | ) | [inline] |
Set the value for the initial trigger source.
Definition at line 150 of file SltTimeBase.h.
References triggerSource.
{ triggerSource = source; }
virtual void SltTimeBase::setVersion | ( | int | version | ) | [inline, virtual] |
Set the version of the time stamp.
By default the version of the library is used.
Definition at line 212 of file SltTimeBase.h.
References sltVersion.
{ sltVersion = version; }
friend class CursesEvent [friend] |
Definition at line 43 of file SltTimeBase.h.
friend class EventLoop [friend] |
Definition at line 36 of file SltTimeBase.h.
friend class hw4::SltAuger [friend] |
Definition at line 38 of file SltTimeBase.h.
friend class hw4::SltCmds [friend] |
Definition at line 50 of file SltTimeBase.h.
friend class hw4::SltKatrin [friend] |
Definition at line 39 of file SltTimeBase.h.
friend class hw4::TsBackground [friend] |
Definition at line 46 of file SltTimeBase.h.
friend class KaSubrack [friend] |
Definition at line 41 of file SltTimeBase.h.
friend class SimPageController [friend] |
Definition at line 34 of file SltTimeBase.h.
friend class Slt [friend] |
Definition at line 35 of file SltTimeBase.h.
friend class SltCmds [friend] |
Definition at line 49 of file SltTimeBase.h.
friend class SubrackCmds [friend] |
Definition at line 48 of file SltTimeBase.h.
friend class TsBackground [friend] |
Definition at line 45 of file SltTimeBase.h.
friend class TsEvent [friend] |
Definition at line 44 of file SltTimeBase.h.
int SltTimeBase::lastEventPage [protected] |
The pageNumber gives the memory page of the last event before the actual one (0..SLT_PAGES-1).
The pageNumber is stored in the LastTriggerTimeStamp.
Definition at line 299 of file SltTimeBase.h.
Referenced by getLastEventPage().
int SltTimeBase::lastTrigger [protected] |
11bit, 0..1999, resolution 50ns
Definition at line 269 of file SltTimeBase.h.
unsigned long SltTimeBase::sec [protected] |
Bitfield 32bit, resolution 1s.
Definition at line 260 of file SltTimeBase.h.
int SltTimeBase::sltVersion [protected] |
Version of the slt implementation.
The representation changed with version
Definition at line 305 of file SltTimeBase.h.
Referenced by getVersion(), and setVersion().
int SltTimeBase::subsec1 [protected] |
14bit, 0..9999, resolution 100us
Definition at line 263 of file SltTimeBase.h.
Referenced by getSubSec(), getSubSec1(), setSubSec(), and setSubSec1().
int SltTimeBase::subsec2 [protected] |
11bit, 0..1999, resolution 50ns
Definition at line 266 of file SltTimeBase.h.
Referenced by getSubSec(), getSubSec2(), setSubSec(), and setSubSec2().
int SltTimeBase::triggerAllActive [protected] |
Bit field with all active triggers at the end of the recording for this event.
Definition at line 292 of file SltTimeBase.h.
Referenced by getAllActiveTriggerSources(), and setAllActiveTriggerSources().
int SltTimeBase::triggerSource [protected] |
The trigger source gives information which device has detected the event and caused to switch to the next page.
Possible devices are:
Definition at line 287 of file SltTimeBase.h.
Referenced by getTriggerSource(), and setTriggerSource().