Page History
...
Code Block |
---|
static const char* name(Type type); |
Class TimeStamp
Class
...
Public Types:
Code Block |
---|
enum {NumFiducialBits = 17};
enum {MaxFiducials = (1<<17)-32};
enum {ErrFiducial = (1<<17)-1};
|
Public Member Functions:
Code Block |
---|
TimeStamp();
TimeStamp(const TimeStamp&);
TimeStamp(const TimeStamp&, unsigned control);
TimeStamp(unsigned ticks, unsigned fiducials, unsigned vector, unsigned control=0);
unsigned ticks () const;
unsigned fiducials() const;
unsigned control () const;
unsigned vector () const;
TimeStamp& operator= (const TimeStamp&);
bool operator==(const TimeStamp&) const;
bool operator>=(const TimeStamp&) const;
bool operator<=(const TimeStamp&) const;
bool operator< (const TimeStamp&) const;
bool operator> (const TimeStamp&) const;
|
Class TransitionId
Public Types:
Code Block |
---|
enum Value {
Unknown, Reset,
Map, Unmap,
Configure, Unconfigure,
BeginRun, EndRun,
BeginCalibCycle, EndCalibCycle,
Enable, Disable,
L1Accept,
NumberOf };
|
Static Public Member Functions:
Code Block |
---|
static const char* name(TransitionId::Value id);
|
Class TypeId
Public Types:
Code Block |
---|
enum Type {
Any,
Id_Xtc, // generic hierarchical container
Id_Frame, // raw image
Id_AcqWaveform,
Id_AcqConfig,
Id_TwoDGaussian, // 2-D Gaussian + covariances
Id_Opal1kConfig,
Id_FrameFexConfig,
Id_EvrConfig,
Id_TM6740Config,
Id_ControlConfig,
Id_pnCCDframe,
Id_pnCCDconfig,
Id_Epics, // Epics Data Type
Id_FEEGasDetEnergy,
Id_EBeam,
Id_PhaseCavity,
Id_PrincetonFrame,
Id_PrincetonConfig,
Id_EvrData,
Id_FrameFccdConfig,
Id_FccdConfig,
Id_IpimbData,
Id_IpimbConfig,
Id_EncoderData,
Id_EncoderConfig,
Id_EvrIOConfig,
Id_PrincetonInfo,
Id_CspadElement,
Id_CspadConfig,
Id_IpmFexConfig, // LUSI Diagnostics
Id_IpmFex,
Id_DiodeFexConfig,
Id_DiodeFex,
Id_PimImageConfig,
NumberOf};
|
Public Member Functions:
Code Block |
---|
TypeId() {}
TypeId(const TypeId& v);
TypeId(Type type, uint32_t version);
Type id() const;
uint32_t version() const;
uint32_t value() const;
static const char* name(Type type);
|
Class XtcFileIterator
Public Member Functions:
Code Block |
---|
// Constructor and destructor
XtcFileIterator(int fd, size_t maxDgramSize);
~XtcFileIterator();
Dgram* next();
|
Class Xtc
Code Block |
---|
Xtc() : damage(0), extent(0) {};
Xtc(const Xtc& xtc) :
damage(xtc.damage), src(xtc.src), contains(xtc.contains), extent(sizeof(Xtc)) {}
Xtc(const TypeId& type) :
damage(0), contains(type), extent(sizeof(Xtc)) {}
Xtc(const TypeId& type, const Src& _src) :
damage(0), src(_src), contains(type), extent(sizeof(Xtc)) {}
Xtc(const TypeId& _tag, const Src& _src, unsigned _damage) :
damage(_damage), src(_src), contains(_tag), extent(sizeof(Xtc)) {}
Xtc(const TypeId& _tag, const Src& _src, const Damage& _damage) : damage(_damage), src(_src), contains(_tag), extent(sizeof(Xtc)) {}
void* operator new(size_t size, char* p) { return (void*)p; }
void* operator new(size_t size, Xtc* p) { return p->alloc(size); }
char* payload() const { return (char*)(this+1); }
int sizeofPayload() const { return extent - sizeof(Xtc); }
Xtc* next() { return (Xtc*)((char*)this+extent); }
const Xtc* next() const { return (const Xtc*)((char*)this+extent); }
void* alloc(uint32_t size) { void* buffer = next(); extent += size; return buffer; }
Damage damage;
Src src;
TypeId contains;
uint32_t extent;
|
Class XtcIterator
This is an abstract class.
This class allows iteration over a collection of "odfInXtcs" (odf = online data flow). An "event" generated from DataFlow consists of data described by a collection of "odfInXtcs". Therefore, this class is instrumental in the navigation of an event's data. The set of "odfInXtcs" is determined by passing (typically to the constructor) a root "odfInXtc" which describes the collection of "odfInXtcs" to process. This root, for example is provided by an event's datagram. As this is an Abstract-Base-Class, it is expected that an application will subclass from this class, providing an implementation of the "process" method. This method will be called back for each "odfInXtc" in the collection. Note that the "odfInXtc" to process is passed as an argument. If the "process" method wishes to abort the iteration a zero (0) value is returned. The iteration is initiated by calling the "iterate" member function.
Public Member Functions:
Constructors and destructor:
Code Block |
---|
XtcIterator(Xtc* root);
XtcIterator() {}
virtual ~XtcIterator() {}
|
The first constructor takes an argument the "Xtc" which defines the collection to iterate over.
Code Block |
---|
virtual int process(Xtc* xtc) = 0;
|
This function is pure virtual and must be implemented by all derived classes.
Code Block |
---|
void iterate();
|
This function commences iteration over the collection specified by the constructor.
Code Block |
---|
void iterate(Xtc*);
|
Iterate over the collection specifed as an argument to the function. For each "Xtc" found call back the "process" function. If the "process" function returns zero (0) the iteration is aborted and control is returned to the caller. Otherwise, control is returned when all elements of the collection have been scanned.
Code Block |
---|
const Xtc* root() const;
|
This function returns the collection specified by the constructor.