8#ifndef NIDAS_CORE_SAMPLEMATCHER_H
9#define NIDAS_CORE_SAMPLEMATCHER_H
14namespace nidas {
namespace core {
28 parse_range(
const std::string& rngstr,
int& rngid1,
int& rngid2);
37 match(
int dsmid,
int sid);
Match samples according to DSM and Sample ID ranges, and configure the ranges with criteria in text f...
Definition SampleMatcher.h:21
nidas::util::UTime _startTime
Definition SampleMatcher.h:144
void setEndTime(nidas::util::UTime end)
Set the time after which samples will not match.
Definition SampleMatcher.h:127
SampleMatcher()
Construct an empty SampleMatcher with no ranges.
Definition SampleMatcher.cc:128
id_lookup_t _lookup
Definition SampleMatcher.h:143
int numRanges()
The number of ranges added to this SampleMatcher.
Definition SampleMatcher.h:103
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:232
nidas::util::UTime getEndTime()
Definition SampleMatcher.h:133
range_matches_t _ranges
Definition SampleMatcher.h:142
nidas::util::UTime getStartTime()
Definition SampleMatcher.h:118
void setStartTime(nidas::util::UTime start)
Set the time before which samples will not match.
Definition SampleMatcher.h:112
bool addCriteria(const std::string &ctext)
Add a sample range using this syntax:
Definition SampleMatcher.cc:140
dsm_sample_id_t _first_dsmid
Definition SampleMatcher.h:146
bool match(dsm_sample_id_t id)
Return true if the given id satisfies the current range criteria.
Definition SampleMatcher.cc:164
std::vector< RangeMatcher > range_matches_t
Definition SampleMatcher.h:140
std::map< dsm_sample_id_t, bool > id_lookup_t
Definition SampleMatcher.h:139
nidas::util::UTime _endTime
Definition SampleMatcher.h:145
Interface to a data sample.
Definition Sample.h:190
A class for parsing, formatting and doing operations on time, based on Unix time conventions,...
Definition UTime.h:95
unsigned int dsm_sample_id_t
Definition Sample.h:64
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31
Definition SampleMatcher.h:23
bool include
Definition SampleMatcher.h:49
int dsm1
Definition SampleMatcher.h:45
static const int MATCH_ALL
Definition SampleMatcher.h:25
int dsm2
Definition SampleMatcher.h:46
bool match(int dsmid, int sid)
Return true when dsmid and sid are matched by this range.
Definition SampleMatcher.cc:101
void set_first_dsm(int dsmid)
Fill in any MATCH_FIRST references with the given dsmid.
Definition SampleMatcher.cc:120
void parse_range(const std::string &rngstr, int &rngid1, int &rngid2)
Definition SampleMatcher.cc:30
static const int MATCH_FIRST
Definition SampleMatcher.h:24
int sid1
Definition SampleMatcher.h:47
bool parse_specifier(const std::string &specifier)
Definition SampleMatcher.cc:59
int sid2
Definition SampleMatcher.h:48