nidas  v1.2-1520
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
NidsMerge Class Reference
Inheritance diagram for NidsMerge:
Inheritance graph
[legend]

Public Member Functions

 NidsMerge ()
 
int parseRunstring (int argc, char **argv) throw ()
 
int run () throw ()
 
int usage (const char *argv0)
 
void sendHeader (dsm_time_t thead, SampleOutput *out) throw (n_u::IOException)
 Method called to write a header to an SampleOutput. More...
 
void printHeader ()
 for debugging. More...
 

Static Public Member Functions

static int main (int argc, char **argv) throw ()
 
static void setDefaults (SampleInputHeader &header)
 
static void sendDefaultHeader (SampleOutput *output) throw (nidas::util::IOException)
 

Private Member Functions

bool receiveAllowedDsm (SampleOutputStream &, const Sample *)
 receiveAllowedDsm writes the passed sample to the stream if the DSM id of the sample is in allowed_dsms. More...
 
void flushSorter (dsm_time_t tcur, SampleOutputStream &outStream)
 

Private Attributes

vector< list< string > > inputFileNames
 
string outputFileName
 
vector< dsm_time_tlastTimes
 
long long readAheadUsecs
 
UTime startTime
 
UTime endTime
 
int outputFileLength
 
SampleInputHeader header
 
string configName
 
list< unsigned int > allowed_dsms
 
SortedSampleSet3 sorter
 
vector< size_t > samplesRead
 
vector< size_t > samplesUnique
 
unsigned long ndropped
 
NidasApp _app
 
BadSampleFilterArg FilterArg
 
NidasAppArg KeepOpening
 

Constructor & Destructor Documentation

NidsMerge::NidsMerge ( )

Member Function Documentation

void NidsMerge::flushSorter ( dsm_time_t  tcur,
SampleOutputStream outStream 
)
private
int NidsMerge::main ( int  argc,
char **  argv 
)
throw (
)
static
int NidsMerge::parseRunstring ( int  argc,
char **  argv 
)
throw (
)
void NidsMerge::printHeader ( )
bool NidsMerge::receiveAllowedDsm ( SampleOutputStream stream,
const Sample sample 
)
private

receiveAllowedDsm writes the passed sample to the stream if the DSM id of the sample is in allowed_dsms.

If allowed_dsms is empty, the sample is written to the stream. Returns whatever stream.receive(sample) returns, or else true, so a return of false means the write to the output stream failed.

References allowed_dsms, nidas::core::Sample::getDSMId(), and nidas::dynld::SampleOutputStream::receive().

Referenced by flushSorter().

int NidsMerge::run ( )
throw (
)
void HeaderSource::sendDefaultHeader ( SampleOutput output)
throw (nidas::util::IOException
)
staticinherited
void NidsMerge::sendHeader ( dsm_time_t  ,
SampleOutput output 
)
throw (n_u::IOException
)
virtual

Method called to write a header to an SampleOutput.

Derived classes implement as they see fit.

Implements nidas::core::HeaderSource.

void HeaderSource::setDefaults ( SampleInputHeader header)
staticinherited
int NidsMerge::usage ( const char *  argv0)

Member Data Documentation

NidasApp NidsMerge::_app
private

Referenced by run().

list<unsigned int> NidsMerge::allowed_dsms
private

Referenced by receiveAllowedDsm().

string NidsMerge::configName
private
UTime NidsMerge::endTime
private

Referenced by run().

BadSampleFilterArg NidsMerge::FilterArg
private

Referenced by run().

SampleInputHeader NidsMerge::header
private

Referenced by printHeader(), and run().

vector<list<string> > NidsMerge::inputFileNames
private

Referenced by run().

NidasAppArg NidsMerge::KeepOpening
private

Referenced by run().

vector<dsm_time_t> NidsMerge::lastTimes
private

Referenced by run().

unsigned long NidsMerge::ndropped
private

Referenced by run().

int NidsMerge::outputFileLength
private

Referenced by run().

string NidsMerge::outputFileName
private

Referenced by run().

long long NidsMerge::readAheadUsecs
private

Referenced by run().

vector<size_t> NidsMerge::samplesRead
private

Referenced by flushSorter(), and run().

vector<size_t> NidsMerge::samplesUnique
private

Referenced by flushSorter(), and run().

SortedSampleSet3 NidsMerge::sorter
private

Referenced by flushSorter(), and run().

UTime NidsMerge::startTime
private

Referenced by run().


The documentation for this class was generated from the following file: