(
void);
63 virtual int Run(
void);
64 virtual void Exit(
void);
68 void x_WalkIndex(
boolnoMultiFetch,
boolnoGetData,
boolprereadIndex );
83arg_desc->SetUsageContext(
GetArguments().GetProgramBasename(),
84 "Update an ASN cache from ID dump updates.");
86arg_desc->AddKey(
"index",
"Index",
87 "Directory path for the ASN index to be measured.",
90arg_desc->AddFlag(
"nomf",
"Use cursor multifetch",
false);
91arg_desc->AddFlag(
"nodata",
"Get index data",
false);
92arg_desc->AddFlag(
"nopreread",
"Do not preread the dump index " 93 "(Use if the ID dump is not on panfs).",
false);
106 CDirasn_index_dir( args[
"index"].AsString() );
107 if(! asn_index_dir.
Exists() ) {
108 LOG_POST(
Error<<
"ASN index directory "<< asn_index_dir.
GetPath() <<
" does not exist!");
110}
else if( ! asn_index_dir.
IsDir() ) {
112<<
"valid ASN index directory!");
120 booluseMultiFetch = args[
"nomf"];
121 boolgetData = args[
"nodata"];
122 boolprereadIndex = args[
"nopreread"];
124 x_WalkIndex( useMultiFetch, getData, prereadIndex );
134 if( prereadIndex ) {
140 if( useMultiFetch ) {
146 if( getData )
LOG_POST(
Info<<
"Get data activated.");
148 Uint4entry_count = 0;
180 while( dump_index_stream ) {
185<< preread_sw.
Elapsed() <<
" seconds.");
205 int main(
intargc,
const char* argv[])
Berkeley BDB file cursor.
This is a simple BDB structure holding information about a given accession and its indexed location.
TChunkId GetChunkId() const
TOffset GetOffset() const
TTimestamp GetTimestamp() const
TVersion GetVersion() const
TSeqLength GetSeqLength() const
TSeqId GetSeqId() const
accessors
Berkeley DB file cursor class.
virtual void Init(void)
Initialize the application.
void x_WalkIndex(bool noMultiFetch, bool noGetData, bool prereadIndex)
virtual void Exit(void)
Cleanup on application exit.
virtual int Run(void)
Run the application.
The NCBI C++ standard methods for dealing with std::string.
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
@ eInputFile
Name of file (must exist and be readable)
void SetCacheSize(unsigned int cache_size)
Set Berkeley DB memory cache size for the file (default is 256K).
void SetCondition(ECondition cond_from, ECondition cond_to=eNotSet)
Set search condition(type of interval)
void Open(const string &filename, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
Open file with specified access mode.
const string & GetFileName() const
Return file name.
void InitMultiFetch(size_t buffer_size, EMultiFetchMode mfm=eFetchAll)
Init multi-row fetch.
EBDB_ErrCode Fetch(EFetchDirection fdir=eDefault)
Fetch record.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")
Set diagnostic stream.
void Error(CExceptionArgs_Base &args)
void Info(CExceptionArgs_Base &args)
static void SetLogging(ESwitch on_off_default)
Enable or disable logging of errors from the File API classes.
virtual bool Exists(void) const
Check if directory "dirname" exists.
bool IsDir(EFollowLinks follow=eFollowLinks) const
Check whether a directory entry is a directory.
const string & GetPath(void) const
Get entry path.
uint32_t Uint4
4-byte (32-bit) unsigned integer
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
@ eStart
Start timer immediately after creating.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
Defines: CTimeFormat - storage class for time format.
const SIZE_TYPE kBufferSize
int main(int argc, const char *argv[])
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4