CFEL - ASG Software Suite  2.5.0
CASS
Public Types | Public Member Functions | Private Attributes | List of all members
cass::XtcIterator Class Reference

Iteration over XTC's. More...

#include <xtciterator.hpp>

+ Inheritance diagram for cass::XtcIterator:
+ Collaboration diagram for cass::XtcIterator:

Public Types

enum  { Stop, Continue }
 enum for more convenient code More...
 

Public Member Functions

 XtcIterator (Pds::Xtc *xtc, FormatConverter::usedConverters_t &converters, CASSEvent *cassevent, unsigned depth)
 constructor. More...
 
int process (Pds::Xtc *xtc_orig)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. function that is called for each xtc found in the xtc. More...
 

Private Attributes

unsigned _depth
 counts the recursivness of this More...
 
FormatConverter::usedConverters_t_converters
 reference to the converters More...
 
CASSEvent_cassevent
 pointer to the cassevent to work on More...
 

Detailed Description

Iteration over XTC's.

class that will iterate over an xtc using the xtciterator provided by the lcls libary

Author
Lutz Foucar

Definition at line 38 of file xtciterator.hpp.

Member Enumeration Documentation

anonymous enum

enum for more convenient code

Enumerator
Stop 
Continue 

Definition at line 42 of file xtciterator.hpp.

Constructor & Destructor Documentation

cass::XtcIterator::XtcIterator ( Pds::Xtc *  xtc,
FormatConverter::usedConverters_t converters,
CASSEvent cassevent,
unsigned  depth 
)
inline

constructor.

Parameters
xtcthe xtc which contents we iterate over
convertersthe map that contains the used converters
casseventour event to write the information from the xtc to
depthThe Depth of recursion when called recursivly

Definition at line 51 of file xtciterator.hpp.

Member Function Documentation

int cass::XtcIterator::process ( Pds::Xtc *  xtc_orig)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. function that is called for each xtc found in the xtc.

will check whether its an id or another xtc. if its another xtc it will call this with increased recursion depth, otherwise it will call the format converter for the id.

output information about the xtc

if it is another xtc, then iterate through it

otherwise use the responsible format converter for this xtc

need to check wether the xtc is compressed

check if the datagram is a known xtc, if not skip this datagram and continue with the next one.

if it is known check the damage state and only continue when its a user defined damage value, as it will mark only a broken beamline data

in all other cases just use the appropriate converter for the datagram

Definition at line 68 of file xtciterator.hpp.

References _cassevent, _converters, cass::Log::add(), Continue, cass::Log::DEBUG4, cass::Destroy(), cass::Log::ERROR, iterate(), Stop, cass::toString(), cass::Log::VERBOSEINFO, and cass::Log::WARNING.

Member Data Documentation

CASSEvent* cass::XtcIterator::_cassevent
private

pointer to the cassevent to work on

Definition at line 158 of file xtciterator.hpp.

Referenced by process().

FormatConverter::usedConverters_t& cass::XtcIterator::_converters
private

reference to the converters

Definition at line 155 of file xtciterator.hpp.

Referenced by process().

unsigned cass::XtcIterator::_depth
private

counts the recursivness of this

Definition at line 152 of file xtciterator.hpp.


The documentation for this class was generated from the following file: