#include <Source.h>
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. | |
Source & | operator= (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... |
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.
Definition at line 62 of file Source.h.
PSEvt::Source::Source | ( | NoSource | ) | [inline, explicit] |
PSEvt::Source::Source | ( | ) |
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.
Source & PSEvt::Source::operator= | ( | const std::string & | spec | ) |
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.
[in] | amap | Alias map instance. |
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().