nidas v1.2.3
|
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) |
Method called to write a header to an SampleOutput. | |
void | printHeader () |
for debugging. | |
Static Public Member Functions | |
static int | main (int argc, char **argv) throw () |
static void | setDefaults (SampleInputHeader &header) |
static void | sendDefaultHeader (SampleOutput *output) |
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. | |
void | flushSorter (dsm_time_t tcur, SampleOutputStream &outStream) |
Private Attributes | |
vector< list< string > > | inputFileNames |
string | outputFileName |
vector< dsm_time_t > | lastTimes |
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 |
NidsMerge::NidsMerge | ( | ) |
|
private |
References nidas::core::getSample(), receiveAllowedDsm(), samplesRead, samplesUnique, sorter, and tformat().
Referenced by run().
References nidas::core::getSample(), and nidas::core::NidasApp::setupSignals().
Referenced by main().
References nidas::core::NidasAppArg::acceptShortFlag(), nidas::core::NidasAppInputFilesArg::allowFiles, nidas::core::NidasAppInputFilesArg::allowSockets, check_fileset(), DLOG, nidas::core::NidasApp::enableArguments(), nidas::core::NidasApp::EndTime, nidas::core::NidasApp::getEndTime(), nidas::core::getSample(), nidas::core::NidasApp::getStartTime(), nidas::core::NidasApp::Help, nidas::core::NidasApp::helpRequested(), nidas::core::NidasApp::InputFiles, LOG_DEBUG, nidas::core::NidasApp::LogConfig, nidas::core::NidasApp::LogFields, nidas::core::NidasApp::LogParam, nidas::core::NidasApp::LogShow, nidas::core::NidasApp::nextArg(), nidas::core::NidasApp::outputFileLength(), nidas::core::NidasApp::outputFileName(), nidas::core::NidasApp::OutputFiles, nidas::core::NidasApp::parseNext(), nidas::core::NidasApp::startArgs(), nidas::core::NidasApp::StartTime, usage(), USECS_PER_SEC, and nidas::core::NidasApp::Version.
void NidsMerge::printHeader | ( | ) |
for debugging.
References nidas::core::SampleInputHeader::getArchiveVersion(), nidas::core::SampleInputHeader::getConfigName(), nidas::core::SampleInputHeader::getConfigVersion(), nidas::core::SampleInputHeader::getProjectName(), nidas::core::getSample(), nidas::core::SampleInputHeader::getSoftwareVersion(), nidas::core::SampleInputHeader::getSystemName(), and header.
Referenced by sendHeader().
|
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.
Referenced by flushSorter().
int NidsMerge::run | ( | ) | ||||
throw | ( | ) |
References _app, nidas::core::NidasAppArg::asBool(), nidas::dynld::SampleInputStream::close(), nidas::dynld::SampleOutputStream::close(), DLOG, endTime, FilterArg, nidas::dynld::SampleOutputStream::flush(), flushSorter(), nidas::util::UTime::format(), nidas::core::FileSet::getFileSet(), nidas::core::BadSampleFilterArg::getFilter(), nidas::core::getSample(), nidas::core::Sample::getTimeTag(), header, inputFileNames, nidas::core::NidasApp::interrupted(), nidas::util::UTime::isMin(), KeepOpening, lastTimes, ndropped, outputFileLength, outputFileName, readAheadUsecs, samplesRead, samplesUnique, nidas::core::BadSampleFilter::setDefaultTimeRange(), nidas::core::SampleOutputBase::setHeaderSource(), sorter, startTime, tformat(), and nidas::util::UTime::toUsecs().
|
staticinherited |
nidas::util::IOException |
References nidas::core::HeaderSource::setDefaults(), and nidas::core::SampleInputHeader::write().
Referenced by nidas::core::SampleOutputBase::createNextFile(), and nidas::dynld::raf::SyncRecordGenerator::sendHeader().
|
virtual |
Method called to write a header to an SampleOutput.
Derived classes implement as they see fit.
nidas::util::IOException |
Implements nidas::core::HeaderSource.
References configName, header, printHeader(), nidas::core::SampleInputHeader::setConfigName(), and nidas::core::SampleInputHeader::write().
|
staticinherited |
References nidas::core::Version::getArchiveVersion(), nidas::core::Project::getInstance(), nidas::core::Version::getSoftwareVersion(), nidas::core::SampleInputHeader::setArchiveVersion(), nidas::core::SampleInputHeader::setConfigName(), nidas::core::SampleInputHeader::setConfigVersion(), nidas::core::SampleInputHeader::setProjectName(), nidas::core::SampleInputHeader::setSoftwareVersion(), and nidas::core::SampleInputHeader::setSystemName().
Referenced by nidas::core::HeaderSource::sendDefaultHeader().
References _app, and nidas::core::NidasApp::usage().
Referenced by receiveAllowedDsm().
|
private |
Referenced by sendHeader().
|
private |
Referenced by run().
|
private |
Referenced by printHeader(), run(), and sendHeader().
|
private |
Referenced by run().
|
private |
Referenced by run().
|
private |
Referenced by run().
|
private |
Referenced by run().
|
private |
Referenced by flushSorter(), and run().
|
private |
Referenced by flushSorter(), and run().
|
private |
Referenced by flushSorter(), and run().