PSEvt::Source Class Reference
[PSEvt package]

This class implements source matching for finding data inside event. More...

#include <Source.h>

List of all members.

Public Types

 null
 Special constant to be used as argument for constructor.
enum  NoSource { null }
 Special enum type to signify objects without source. More...

Public Member Functions

 Source (NoSource)
 Make source which matches objects without source only.
 Source ()
 Match for any source.
 Source (const Pds::Src &src)
 Exact match for source.
 Source (Pds::DetInfo::Detector det, uint32_t detId, Pds::DetInfo::Device dev, uint32_t devId)
 Exact match for DetInfo source.
 Source (Pds::BldInfo::Type type)
 Exact match for BldInfo.
 Source (const std::string &spec)
 Matching specified via string.
Sourceoperator= (const std::string &spec)
 Assign a string specification.
SrcMatch srcMatch (const AliasMap &amap) const
 Returns object which can be used to match Src instances.
void print (std::ostream &out) const
 Format Source contents.

Classes

class  SrcMatch
 Helper class which provides logic for matching Source values to Src instances. More...


Detailed Description

This class implements source matching for finding data inside event.

Event dictionary has to support location of the event data without complete source address specification. This class provides facility for matching the data source address against partially-specified match.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

See also:
Event
Version:
$Id: Source.h 7815 2014-03-09 07:47:26Z salnikov@SLAC.STANFORD.EDU $
Author:
Andrei Salnikov

Definition at line 62 of file Source.h.


Member Enumeration Documentation

enum PSEvt::Source::NoSource

Special enum type to signify objects without source.

Enumerator:
null  Special constant to be used as argument for constructor.

Definition at line 108 of file Source.h.


Constructor & Destructor Documentation

PSEvt::Source::Source ( NoSource   )  [inline, explicit]

Make source which matches objects without source only.

Definition at line 115 of file Source.h.

PSEvt::Source::Source (  ) 

Match for any source.

This object will match any source.

Definition at line 67 of file Source.cpp.

PSEvt::Source::Source ( const Pds::Src &  src  )  [explicit]

Exact match for source.

This object will match fully-specified source. Note that Source(Pds::Src()) is equivalent to Source(null).

Definition at line 73 of file Source.cpp.

PSEvt::Source::Source ( Pds::DetInfo::Detector  det,
uint32_t  detId,
Pds::DetInfo::Device  dev,
uint32_t  devId 
)

Exact match for DetInfo source.

This object will match fully-specified DetInfo source.

Definition at line 84 of file Source.cpp.

PSEvt::Source::Source ( Pds::BldInfo::Type  type  )  [explicit]

Exact match for BldInfo.

This object will match fully-specified BldInfo source.

Definition at line 95 of file Source.cpp.

PSEvt::Source::Source ( const std::string &  spec  )  [explicit]

Matching specified via string.

Argument string can be either alias name or match string in one of these formats: "" - match anything "DetInfo(det.detId:dev.devId)" - fully or partially specified DetInfo "det.detId:dev.devId" - same as above "DetInfo(det-detId|dev.devId)" - same as above "det-detId|dev.devId" - same as above "BldInfo(type)" - fully specified BldInfo "type" - same as above "BldInfo()" - any BldInfo "ProcInfo(ipAddr)" - fully specified ProcInfo "ProcInfo()" - any ProcInfo

Definition at line 101 of file Source.cpp.


Member Function Documentation

Source & PSEvt::Source::operator= ( const std::string &  spec  ) 

Assign a string specification.

Definition at line 108 of file Source.cpp.

void PSEvt::Source::print ( std::ostream &  out  )  const

Format Source contents.

Definition at line 293 of file Source.cpp.

Referenced by PSEvt::operator<<().

Source::SrcMatch PSEvt::Source::srcMatch ( const AliasMap amap  )  const

Returns object which can be used to match Src instances.

If Source instance was constructed from a string then this method tries to resolve string as an alias. If alias is not found then it tries to parse the string according to the definitions above. If parsing fails then exception is thrown.

Parameters:
[in] amap Alias map instance.
Exceptions:
PSEvt::ExceptionSourceFormat if string cannot be parsed

Definition at line 277 of file Source.cpp.

References amap, parse(), and PSEvt::AliasMap::src().

Referenced by checkAny(), checkAnyBldInfo(), checkAnyDetInfo(), checkAnyProcInfo(), checkBldInfo(), checkBldInfoEBeam(), checkDetInfo(), checkDetInfo0000(), checkDetInfo1111(), checkDetInfoMatch(), checkNoSrc(), checkProcInfo1(), PSEvt::ProxyDict::getImpl(), and PSEvt::ProxyDict::keysImpl().


The documentation for this class was generated from the following files:
Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7