10#include "trg/trg/Clock.h"
11#include "trg/trg/Time.h"
12#include "trg/trg/Signal.h"
33 const std::string& name) :
34 _time(clock.position(timing)),
44 const std::string& name) :
88 const std::string& pre)
const
90 cout << pre <<
"time(clock):";
99 if (msg.find(
"name") != string::npos ||
100 msg.find(
"detail") != string::npos) {
101 cout <<
" (" <<
_name <<
")";
109 if (a.time() < b.time()) {
111 }
else if (a.time() == b.time()) {
112 if (a.edge() and (! b.edge()))
114 else if (a.edge() == b.edge())
125 _time = c.position(t);
A class to represent a digitized signal. Unit is nano second.
A class to represent a digitized signal. Unit is nano second.
A class to represent a signal timing in the trigger system.
const TRGClock * _clock
Clock.
int _time
Time in clock unit.
bool _edge
Edge type. true : rising, false : falling.
virtual ~TRGTime()
Destructor.
double absoluteTime(int clockPosition) const
returns absolute time of clock position
const TRGClock & clock(void) const
returns clock.
TRGTime(const TRGTime &)
Copy constructor.
TRGSignal operator|(const TRGTime &) const
oring two TRGTime. A result is TRGSignal.
static bool sortByTime(const TRGTime &a, const TRGTime &b)
returns true if a is older than b.
TRGSignal operator&(const TRGTime &) const
adding two TRGTime. A result is TRGSignal.
void dump(const std::string &message="", const std::string &pre="") const
dumps contents.
Abstract base class for different kinds of events.