8 #ifndef NIDAS_CORE_SAMPLEMATCHER_H
9 #define NIDAS_CORE_SAMPLEMATCHER_H
14 namespace nidas {
namespace core {
137 #endif // NIDAS_CORE_SAMPLEMATCHER_H
Definition: SampleMatcher.h:22
nidas::util::UTime getEndTime()
Definition: SampleMatcher.h:119
A class for parsing, formatting and doing operations on time, based on Unix time conventions, where leap seconds are ignored, so that there are always 60 seconds in a minute, 3600 seconds in an hour and 86400 seconds in a day.
Definition: UTime.h:76
unsigned int dsm_sample_id_t
Definition: Sample.h:63
RangeMatcher(int d1, int d2, int s1, int s2, int inc)
Construct a RangeMatcher with the given range endpoints: d1 <= DSM ID <= d2, s1 <= Sample ID <= s2...
Definition: SampleMatcher.cc:50
bool exclusiveMatch()
Return true if this matcher can only match a single ID pair (DSM,SID), meaning only one range has bee...
Definition: SampleMatcher.cc:159
bool match(dsm_sample_id_t id)
Return true if the given id satisfies the current range criteria.
Definition: SampleMatcher.cc:106
int sid1
Definition: SampleMatcher.h:33
nidas::util::UTime _endTime
Definition: SampleMatcher.h:131
range_matches_t _ranges
Definition: SampleMatcher.h:128
int numRanges()
The number of ranges added to this SampleMatcher.
Definition: SampleMatcher.h:89
std::map< dsm_sample_id_t, bool > id_lookup_t
Definition: SampleMatcher.h:125
int dsm2
Definition: SampleMatcher.h:32
id_lookup_t _lookup
Definition: SampleMatcher.h:129
std::vector< RangeMatcher > range_matches_t
Definition: SampleMatcher.h:126
bool addCriteria(const std::string &ctext)
Add a sample range using this syntax:
Definition: SampleMatcher.cc:67
nidas::util::UTime _startTime
Definition: SampleMatcher.h:130
bool include
Definition: SampleMatcher.h:35
int dsm1
Definition: SampleMatcher.h:31
nidas::util::UTime getStartTime()
Definition: SampleMatcher.h:104
void setEndTime(nidas::util::UTime end)
Set the time after which samples will not match.
Definition: SampleMatcher.h:113
int sid2
Definition: SampleMatcher.h:34
Interface to a data sample.
Definition: Sample.h:189
Match samples according to DSM and Sample ID ranges, and configure the ranges with criteria in text f...
Definition: SampleMatcher.h:20
void setStartTime(nidas::util::UTime start)
Set the time before which samples will not match.
Definition: SampleMatcher.h:98
SampleMatcher()
Construct an empty SampleMatcher with no ranges.
Definition: SampleMatcher.cc:56