27 #ifndef NIDAS_CORE_SAMPLEPIPELINE_H
28 #define NIDAS_CORE_SAMPLEPIPELINE_H
33 namespace nidas {
namespace core {
size_t getNumDiscardedProcSamples() const
Number of processed samples discarded because sorter was getting too big.
Definition: SamplePipeline.h:255
virtual const SampleStats & getSampleStats() const =0
virtual size_t size() const =0
Number of samples that have not be distributed.
virtual ~SamplePipeline()
Definition: SamplePipeline.cc:62
size_t getSorterNumProcSamples() const
Number of processed samples currently in the sorter.
Definition: SamplePipeline.h:205
virtual std::list< const SampleTag * > getSampleTags() const =0
What SampleTags am I a SampleSource for?
void addSampleTag(const SampleTag *tag)
Add a SampleTag to this SampleSource.
Definition: SamplePipeline.h:111
bool _keepStats
Definition: SamplePipeline.h:411
virtual int getClientCount() const =0
How many SampleClients are currently in my list.
void disconnect(SampleSource *src)
Remove a SampleSource from the SamplePipeline.
Definition: SamplePipeline.cc:222
SampleTagIterator getSampleTagIterator() const
Definition: SamplePipeline.h:126
Interface for a Thread for buffering samples.
Definition: SampleThread.h:52
std::string _name
Definition: SamplePipeline.h:383
void removeSampleTag(const SampleTag *tag)
Definition: SamplePipeline.h:116
void procinit()
Definition: SamplePipeline.cc:145
void setRawSorterLength(float val)
Set length of raw SampleSorter, in seconds.
Definition: SamplePipeline.h:281
virtual void removeSampleTag(const SampleTag *)=0
SampleSource * getRawSampleSource()
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
Definition: SamplePipeline.h:88
size_t getNumDiscardedRawSamples() const
Number of raw samples discarded because sorter was getting too big.
Definition: SamplePipeline.h:246
Pure virtual interface for a source of Samples.
Definition: SampleSource.h:48
SampleSource * getProcessedSampleSource()
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
Definition: SamplePipeline.h:94
size_t getRawHeapMax() const
Definition: SamplePipeline.h:311
virtual size_t getNumDiscardedSamples() const =0
Number of samples discarded because of _heapSize > _heapMax and heapBlock == true.
void setRawLateSampleCacheSize(unsigned int val)
Get the size of the late sample cache in the raw sample sorter.
Definition: SamplePipeline.h:343
std::list< const SampleTag * > getSampleTags() const
What SampleTags am I a SampleSource for?
Definition: SamplePipeline.h:121
size_t getSorterNumProcBytesMax() const
Current size in bytes of the processed sample sorter.
Definition: SamplePipeline.h:237
size_t getSorterNumProcBytes() const
Current size in bytes of the processed sample sorter.
Definition: SamplePipeline.h:221
std::string getName() const
Definition: SamplePipeline.h:86
virtual size_t getHeapMax() const =0
void interrupt()
Interrupt the SampleSorters in this pipeline.
Definition: SamplePipeline.cc:73
void setHeapBlock(bool val)
Definition: SamplePipeline.h:330
size_t getNumFutureRawSamples() const
Number of raw samples discarded because their timetags were in the future.
Definition: SamplePipeline.h:264
Pure virtual interface of a client of Samples.
Definition: SampleClient.h:38
float getRawSorterLength() const
Definition: SamplePipeline.h:286
bool getRealTime() const
Definition: SamplePipeline.h:184
void join()
Join the SampleSorters in this pipeline.
Definition: SamplePipeline.cc:84
SampleThread * _procSorter
Definition: SamplePipeline.h:391
nidas::util::Mutex _procMutex
Definition: SamplePipeline.h:389
void setProcHeapMax(size_t val)
Set the maximum amount of heap memory to use for sorting samples.
Definition: SamplePipeline.h:318
virtual void flush()=0
Both SampleClient and SampleSource have a flush() method.
const SampleStats & getSampleStats() const
Definition: SamplePipeline.h:189
size_t getSorterNumRawSamples() const
Number of raw samples currently in the sorter.
Definition: SamplePipeline.h:197
size_t _procHeapMax
Definition: SamplePipeline.h:407
unsigned int getRawLateSampleCacheSize() const
Cache this number of samples with potentially anomalous, late time tags in the raw sample sorter...
Definition: SamplePipeline.h:353
SampleThread * _rawSorter
Definition: SamplePipeline.h:387
bool getHeapBlock() const
Definition: SamplePipeline.h:332
float getProcSorterLength() const
Definition: SamplePipeline.h:299
bool _heapBlock
Definition: SamplePipeline.h:409
void flush()
Purge samples from the SampleSorters in this pipeline.
Definition: SamplePipeline.h:161
std::list< const SampleTag * > _sampleTags
Definition: SamplePipeline.h:393
size_t getSorterNumRawBytesMax() const
Current size in bytes of the raw sample sorter.
Definition: SamplePipeline.h:229
virtual size_t getHeapSize() const =0
Get the current amount of heap being used for sorting.
virtual size_t getNumFutureSamples() const =0
Number of samples discarded because their timetags were in the future.
Class for iterating over the SampleTags of a Project, Site, DSMConfig, or a SampleSource.
Definition: NidsIterators.h:217
virtual SampleTagIterator getSampleTagIterator() const =0
void addSampleClient(SampleClient *client)
Add a SampleClient that wants all processed samples.
Definition: SamplePipeline.cc:269
unsigned int _procLateSampleCacheSize
Definition: SamplePipeline.h:415
void removeSampleClient(SampleClient *client)
Remove a SampleClient from this SampleSource.
Definition: SamplePipeline.cc:292
Class describing a group of variables that are sampled and handled together.
Definition: SampleTag.h:87
size_t getNumFutureProcSamples() const
Number of processed samples discarded because their timetags were in the future.
Definition: SamplePipeline.h:273
virtual void addSampleTag(const SampleTag *)=0
Add a SampleTag to this SampleSource.
size_t _rawHeapMax
Definition: SamplePipeline.h:405
A source of samples.
Definition: SampleStats.h:41
void removeSampleClientForTag(SampleClient *, const SampleTag *)
Remove a SampleClient for a given SampleTag from this SampleSource.
Definition: SamplePipeline.cc:341
SamplePipeline & operator=(const SamplePipeline &x)
No assignment.
void rawinit()
Definition: SamplePipeline.cc:117
float _procSorterLength
seconds
Definition: SamplePipeline.h:403
SamplePipeline()
Definition: SamplePipeline.cc:40
nidas::util::Mutex _rawMutex
Definition: SamplePipeline.h:385
SamplePipeline sorts samples that are coming from one or more inputs.
Definition: SamplePipeline.h:79
int getClientCount() const
How many SampleClients are currently in my list.
Definition: SamplePipeline.h:152
void connect(SampleSource *src)
Add an input to be merged and sorted.
Definition: SamplePipeline.cc:173
void setProcLateSampleCacheSize(unsigned int val)
Get the size of the late sample cache in the processed sample sorter.
Definition: SamplePipeline.h:362
std::list< const DSMConfig * > _dsmConfigs
Definition: SamplePipeline.h:395
size_t getSorterNumRawBytes() const
Current size in bytes of the raw sample sorter.
Definition: SamplePipeline.h:213
bool _realTime
Definition: SamplePipeline.h:397
unsigned int getProcLateSampleCacheSize() const
Cache this number of samples with potentially anomalous, late time tags in the processed sample sorte...
Definition: SamplePipeline.h:372
A C++ wrapper for a POSIX mutex.
Definition: ThreadSupport.h:154
void setRealTime(bool val)
Definition: SamplePipeline.h:177
void setProcSorterLength(float val)
Set length of processed SampleSorter, in seconds.
Definition: SamplePipeline.h:294
float _rawSorterLength
seconds
Definition: SamplePipeline.h:400
void setRawHeapMax(size_t val)
Set the maximum amount of heap memory to use for sorting samples.
Definition: SamplePipeline.h:309
void addSampleClientForTag(SampleClient *, const SampleTag *)
Add a SampleClient that wants samples which have been merged from various inputs, sorted...
Definition: SamplePipeline.cc:323
unsigned int _rawLateSampleCacheSize
Definition: SamplePipeline.h:413
size_t getProcHeapMax() const
Definition: SamplePipeline.h:320
void setKeepStats(bool val)
Definition: SamplePipeline.h:334