Belle II Software development
|
A class to represent a digitized signal. Unit is nano second. More...
#include <Signal.h>
Public Member Functions | |
TRGSignal (const TRGClock &=Belle2_GDL::GDLSystemClock) | |
Constructor. | |
TRGSignal (const TRGTime &t0, const TRGTime &t1) | |
Constructor with clock and timing(t0 leading, t1 trailing). | |
TRGSignal (const TRGClock &c, int t0, int t1) | |
Constructor with clock and timing(t0 leading, t1 trailing). | |
TRGSignal (const TRGClock &c, double t0, double t1) | |
Constructor with clock and timing(t0 leading, t1 trailing). | |
TRGSignal (const std::string &name, const TRGClock &=Belle2_GDL::GDLSystemClock) | |
Constructor with name. | |
TRGSignal (const TRGSignal &) | |
Copy constructor. | |
TRGSignal (const TRGTime &) | |
Constructor. | |
TRGSignal & | operator= (const TRGSignal &)=default |
Default assignment operator. | |
virtual | ~TRGSignal () |
Destructor. | |
const std::string & | name (void) const |
returns name. | |
const TRGClock & | clock (void) const |
returns clock. | |
unsigned | nSignals (void) const |
returns # of signals. | |
unsigned | nEdges (void) const |
returns # of edges. | |
unsigned | width (unsigned i=0) const |
returns width of i'th signal (i=0,1,2,...). | |
bool | active (void) const |
returns true if there is a signal. | |
bool | active (int clk0, int clk1) const |
returns true if there is a signal. | |
bool | state (int clockPosition) const |
returns true if signal is active in given clock position. | |
bool | riseEdge (int clockPosition) const |
returns true if signal is active and rising edge in give clock position. | |
std::vector< int > | stateChanges (void) const |
returns a list of clock position of state change. | |
void | dump (const std::string &message="", const std::string &pre="") const |
dumps contents. | |
const std::string & | name (const std::string &newName) |
sets and returns name. | |
void | clear (void) |
clears contents. | |
const TRGClock & | clock (const TRGClock &) |
changes clock. | |
const TRGSignal & | set (double t0, double t1) |
makes a pulse with leading edge at t0 and with trailing edge at t1. | |
const TRGSignal & | set (int t0, int t1, bool state=true) |
makes a pulse with leading edge at clock t0 and with trailing edge at clock t1. | |
const TRGSignal & | unset (int t0, int t1) |
clear(or unset) with leading edge at clock t0 and with trailing edge at clock t1. | |
const TRGSignal & | invert (void) |
makes signal inverted. | |
TRGSignal | operator& (const TRGSignal &) const |
returns AND result. | |
TRGSignal | operator& (const TRGTime &) const |
returns AND result. | |
TRGSignal & | operator&= (const TRGSignal &) |
returns AND result. | |
TRGSignal & | operator&= (const TRGTime &) |
returns AND result. | |
TRGSignal | operator| (const TRGSignal &) const |
returns OR result. | |
TRGSignal | operator| (const TRGTime &) const |
returns OR result. | |
TRGSignal & | operator|= (const TRGSignal &) |
returns OR result. | |
TRGSignal & | operator|= (const TRGTime &) |
returns OR result. | |
TRGSignal & | widen (unsigned width) |
returns widen signals. Signals wider than "width" will be untouched. | |
const TRGTime * | operator[] (unsigned i) const |
returns timing of i'th edge. | |
bool | operator== (const TRGSignal &) const |
returns true if two are the same. | |
bool | operator!= (const TRGSignal &) const |
returns true if two are the same. | |
Private Member Functions | |
void | sort (void) |
Sort operation. | |
bool | consistencyCheck (void) const |
Self-consitency check. True is return if something wrong. | |
Static Private Member Functions | |
static std::vector< TRGTime > | orOperation (const std::vector< TRGTime > &) |
Or operation. | |
Private Attributes | |
std::string | _name |
Name. | |
const TRGClock * | _clock |
Clock. | |
std::vector< TRGTime > | _history |
Timing history. | |
A class to represent a digitized signal. Unit is nano second.
const TRGSignal & set | ( | double | t0, |
double | t1 | ||
) |
makes a pulse with leading edge at t0 and with trailing edge at t1.
t0 and t1 in absolute time.