NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Private Types | Private Attributes | Friends | List of all members
CBAMDataLoader_Impl Class Reference

Search Toolkit Book for CBAMDataLoader_Impl

#include <sra/data_loaders/bam/impl/bamloader_impl.hpp>

+ Inheritance diagram for CBAMDataLoader_Impl:
+ Collaboration diagram for CBAMDataLoader_Impl:

Classes

struct  SDirSeqInfo
 

Public Types

typedef pair< CBamFileInfo *, const CBamRefSeqInfo * > TRefSeqInfo
 
typedef vector< CSeq_id_HandleTIds
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CBAMDataLoader_Impl (const CBAMDataLoader::SLoaderParams &params)
 
 ~CBAMDataLoader_Impl (void)
 
void AddSrzDef (void)
 
void AddBamFile (const CBAMDataLoader::SBamFileName &bam)
 
void OpenBAMFiles ()
 
void OpenBAMFilesOnce ()
 
bool BAMFilesOpened () const
 
CRef< CBAMBlobIdGetShortSeqBlobId (const CSeq_id_Handle &idh)
 
CRef< CBAMBlobIdGetRefSeqBlobId (const CSeq_id_Handle &idh)
 
CBamRefSeqInfoGetRefSeqInfo (const CBAMBlobId &blob_id)
 
void LoadBAMEntry (const CBAMBlobId &blob_id, CTSE_LoadLock &load_lock)
 
void LoadChunk (const CBAMBlobId &blob_id, CTSE_Chunk_Info &chunk)
 
double EstimateLoadSeconds (const CBAMBlobId &blob_id, const CTSE_Chunk_Info &chunk, Uint4 bytes)
 
CBAMDataLoader::TAnnotNames GetPossibleAnnotNames (void) const
 
bool IsShortSeq (const CSeq_id_Handle &idh)
 
void GetIds (const CSeq_id_Handle &idh, TIds &ids)
 
CDataSource::SAccVerFound GetAccVer (const CSeq_id_Handle &idh)
 
CDataSource::SGiFound GetGi (const CSeq_id_Handle &idh)
 
string GetLabel (const CSeq_id_Handle &idh)
 
TTaxId GetTaxId (const CSeq_id_Handle &idh)
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Private Types

typedef map< string, CRef< CBamFileInfo > > TBamFiles
 
typedef vector< SDirSeqInfoTSeqInfos
 

Private Attributes

CMutex m_Mutex
 
CBamMgr m_Mgr
 
string m_DirPath
 
TSeqInfos m_SeqInfos
 
TBamFiles m_BamFiles
 
AutoPtr< IIdMapperm_IdMapper
 

Friends

class CBamFileInfo
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Detailed Description

Definition at line 268 of file bamloader_impl.hpp.

Member Typedef Documentation

◆ TBamFiles

Definition at line 315 of file bamloader_impl.hpp.

◆ TIds

Definition at line 296 of file bamloader_impl.hpp.

◆ TRefSeqInfo

Definition at line 283 of file bamloader_impl.hpp.

◆ TSeqInfos

Definition at line 316 of file bamloader_impl.hpp.

Constructor & Destructor Documentation

◆ CBAMDataLoader_Impl()

CBAMDataLoader_Impl::CBAMDataLoader_Impl ( const CBAMDataLoader::SLoaderParams params)
explicit

◆ ~CBAMDataLoader_Impl()

CBAMDataLoader_Impl::~CBAMDataLoader_Impl ( void  )

Definition at line 470 of file bamloader_impl.cpp.

References GetDebugLevel(), Info(), LOG_POST_X, s_AttachTime, and s_CreateTime.

Member Function Documentation

◆ AddBamFile()

void CBAMDataLoader_Impl::AddBamFile ( const CBAMDataLoader::SBamFileName bam)

Definition at line 577 of file bamloader_impl.cpp.

References CDirEntry::GetBase(), info, and m_SeqInfos.

Referenced by CBAMDataLoader_Impl().

◆ AddSrzDef()

void CBAMDataLoader_Impl::AddSrzDef ( void  )

◆ BAMFilesOpened()

bool CBAMDataLoader_Impl::BAMFilesOpened ( ) const

Definition at line 528 of file bamloader_impl.cpp.

References map_checker< Container >::empty(), m_BamFiles, and m_Mutex.

Referenced by GetShortSeqBlobId().

◆ EstimateLoadSeconds()

double CBAMDataLoader_Impl::EstimateLoadSeconds ( const CBAMBlobId blob_id,
const CTSE_Chunk_Info chunk,
Uint4  bytes 
)

◆ GetAccVer()

CDataSource::SAccVerFound CBAMDataLoader_Impl::GetAccVer ( const CSeq_id_Handle idh)

◆ GetGi()

CDataSource::SGiFound CBAMDataLoader_Impl::GetGi ( const CSeq_id_Handle idh)

◆ GetIds()

void CBAMDataLoader_Impl::GetIds ( const CSeq_id_Handle idh,
TIds ids 
)

Definition at line 663 of file bamloader_impl.cpp.

References IsShortSeq().

Referenced by CBAMDataLoader::GetIds().

◆ GetLabel()

string CBAMDataLoader_Impl::GetLabel ( const CSeq_id_Handle idh)

Definition at line 695 of file bamloader_impl.cpp.

References GetLabel(), IsShortSeq(), and string.

Referenced by CBAMDataLoader::GetLabel().

◆ GetPossibleAnnotNames()

CBAMDataLoader::TAnnotNames CBAMDataLoader_Impl::GetPossibleAnnotNames ( void  ) const

Definition at line 645 of file bamloader_impl.cpp.

References ITERATE, m_SeqInfos, names, and ct::sort().

Referenced by CBAMDataLoader::GetPossibleAnnotNames().

◆ GetRefSeqBlobId()

CRef< CBAMBlobId > CBAMDataLoader_Impl::GetRefSeqBlobId ( const CSeq_id_Handle idh)

Definition at line 634 of file bamloader_impl.cpp.

References ITERATE, m_BamFiles, and OpenBAMFiles().

Referenced by CBAMDataLoader::GetRecords().

◆ GetRefSeqInfo()

CBamRefSeqInfo * CBAMDataLoader_Impl::GetRefSeqInfo ( const CBAMBlobId blob_id)

◆ GetShortSeqBlobId()

CRef< CBAMBlobId > CBAMDataLoader_Impl::GetShortSeqBlobId ( const CSeq_id_Handle idh)

Definition at line 621 of file bamloader_impl.cpp.

References BAMFilesOpened(), ITERATE, and m_BamFiles.

Referenced by CBAMDataLoader::GetBlobId(), and IsShortSeq().

◆ GetTaxId()

TTaxId CBAMDataLoader_Impl::GetTaxId ( const CSeq_id_Handle idh)

Definition at line 704 of file bamloader_impl.cpp.

References INVALID_TAX_ID, IsShortSeq(), and ZERO_TAX_ID.

Referenced by CBAMDataLoader::GetTaxId().

◆ IsShortSeq()

bool CBAMDataLoader_Impl::IsShortSeq ( const CSeq_id_Handle idh)

Definition at line 713 of file bamloader_impl.cpp.

References GetShortSeqBlobId().

Referenced by GetAccVer(), GetGi(), GetIds(), GetLabel(), and GetTaxId().

◆ LoadBAMEntry()

void CBAMDataLoader_Impl::LoadBAMEntry ( const CBAMBlobId blob_id,
CTSE_LoadLock load_lock 
)

Definition at line 598 of file bamloader_impl.cpp.

References GetRefSeqInfo(), and RETRY.

Referenced by CBAMDataLoader::GetBlobById().

◆ LoadChunk()

void CBAMDataLoader_Impl::LoadChunk ( const CBAMBlobId blob_id,
CTSE_Chunk_Info chunk 
)

Definition at line 605 of file bamloader_impl.cpp.

References GetRefSeqInfo(), and RETRY.

Referenced by CBAMDataLoader::GetChunk().

◆ OpenBAMFiles()

void CBAMDataLoader_Impl::OpenBAMFiles ( )

Definition at line 571 of file bamloader_impl.cpp.

References OpenBAMFilesOnce(), and RETRY.

Referenced by CBAMDataLoader_Impl(), GetRefSeqBlobId(), and GetRefSeqInfo().

◆ OpenBAMFilesOnce()

void CBAMDataLoader_Impl::OpenBAMFilesOnce ( )

Friends And Related Function Documentation

◆ CBamFileInfo

friend class CBamFileInfo
friend

Definition at line 304 of file bamloader_impl.hpp.

Referenced by OpenBAMFilesOnce().

Member Data Documentation

◆ m_BamFiles

TBamFiles CBAMDataLoader_Impl::m_BamFiles
private

◆ m_DirPath

string CBAMDataLoader_Impl::m_DirPath
private

Definition at line 321 of file bamloader_impl.hpp.

Referenced by AddSrzDef(), CBAMDataLoader_Impl(), and OpenBAMFilesOnce().

◆ m_IdMapper

AutoPtr<IIdMapper> CBAMDataLoader_Impl::m_IdMapper
private

Definition at line 324 of file bamloader_impl.hpp.

Referenced by AddSrzDef(), and CBAMDataLoader_Impl().

◆ m_Mgr

CBamMgr CBAMDataLoader_Impl::m_Mgr
private

Definition at line 320 of file bamloader_impl.hpp.

◆ m_Mutex

CMutex CBAMDataLoader_Impl::m_Mutex
mutableprivate

Definition at line 319 of file bamloader_impl.hpp.

Referenced by BAMFilesOpened(), and OpenBAMFilesOnce().

◆ m_SeqInfos

TSeqInfos CBAMDataLoader_Impl::m_SeqInfos
private

Definition at line 322 of file bamloader_impl.hpp.

Referenced by AddBamFile(), AddSrzDef(), GetPossibleAnnotNames(), and OpenBAMFilesOnce().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:38 2024 by modify_doxy.py rev. 669887