NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CVcfHistogram Class Reference

Search Toolkit Book for CVcfHistogram

CVcfHistogram. More...

#include <gui/widgets/seq_graphic/vcf_histogram.hpp>

+ Inheritance diagram for CVcfHistogram:
+ Collaboration diagram for CVcfHistogram:

Public Types

using THistogramVector = CVCFVariantsBase::svector
 
- 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

 CVcfHistogram (const string &cache_key)
 Copy constructor is invoked by CGraphCache which clones the data for aynchroneous saving operation. More...
 
 CVcfHistogram (const CVcfHistogram &data)
 
virtual ~CVcfHistogram ()
 Init is invoked by CGraphCache when a new instance of CWigGraph is initialized. More...
 
void Init (TGraphCachePool &icache_pool)
 Save is invoked by CGraphCache when cached data needs to be permanently saved into NetCache. More...
 
void Save (TGraphCachePool &icache_pool)
 Initializes the histogram map for a given range. More...
 
void GetHistogram (const TSeqRange &range, CHistogramGlyph::TMap &dmap) const
 Sets the histogram data. More...
 
void SetData (const THistogramVector &data)
 
- 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
 

Static Public Member Functions

static string GetStorageName ()
 Creates a cache key for the given remote file and seq_id the key value is CCompoundID that parsed by constructor when the class is instantiated. More...
 
static string GetCacheKey (const string &annot_name, const size_t bin_width)
 
static void InitHistogramGlyph (size_t bin_width, const TSeqRange &range, const THistogramVector &histogram, CHistogramGlyph::TMap &dmap)
 
static void EraseCachePerAnnotation (const string &annot_name)
 
- 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)
 

Protected Attributes

string m_AnnotName
 
size_t m_BinWidth
 
mutex m_DataMutex
 data access mutex More...
 
string m_DataKey
 
THistogramVector m_Data
 

Static Protected Attributes

static mutex m_KeysMapMutex
 Mutex for the cache keys. More...
 
static map< string, vector< string > > m_KeysMap
 Map of cache keys per annotation. More...
 

Additional Inherited Members

- 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

CVcfHistogram.

Definition at line 45 of file vcf_histogram.hpp.

Member Typedef Documentation

◆ THistogramVector

Definition at line 48 of file vcf_histogram.hpp.

Constructor & Destructor Documentation

◆ CVcfHistogram() [1/2]

CVcfHistogram::CVcfHistogram ( const string cache_key)

◆ CVcfHistogram() [2/2]

CVcfHistogram::CVcfHistogram ( const CVcfHistogram data)

Definition at line 93 of file vcf_histogram.cpp.

◆ ~CVcfHistogram()

virtual CVcfHistogram::~CVcfHistogram ( )
inlinevirtual

Init is invoked by CGraphCache when a new instance of CWigGraph is initialized.

Definition at line 65 of file vcf_histogram.hpp.

Member Function Documentation

◆ EraseCachePerAnnotation()

void CVcfHistogram::EraseCachePerAnnotation ( const string annot_name)
static

◆ GetCacheKey()

string CVcfHistogram::GetCacheKey ( const string annot_name,
const size_t  bin_width 
)
static

◆ GetHistogram()

void CVcfHistogram::GetHistogram ( const TSeqRange range,
CHistogramGlyph::TMap dmap 
) const

Sets the histogram data.

Definition at line 148 of file vcf_histogram.cpp.

References InitHistogramGlyph(), m_BinWidth, m_Data, m_DataMutex, and compile_time_bits::range().

◆ GetStorageName()

static string CVcfHistogram::GetStorageName ( )
inlinestatic

Creates a cache key for the given remote file and seq_id the key value is CCompoundID that parsed by constructor when the class is instantiated.

Definition at line 50 of file vcf_histogram.hpp.

◆ Init()

void CVcfHistogram::Init ( TGraphCachePool icache_pool)

Save is invoked by CGraphCache when cached data needs to be permanently saved into NetCache.

Definition at line 102 of file vcf_histogram.cpp.

References buffer, bm::sparse_vector_deserializer< SV >::deserialize(), bm::sparse_vector< Val, BV >::empty(), ERR_POST, Error(), eUnknown, CRWStreambuf::fOwnReader, m_Data, m_DataKey, m_DataMutex, NCBI_THROW, NcbiEmptyString, and val.

◆ InitHistogramGlyph()

static void CVcfHistogram::InitHistogramGlyph ( size_t  bin_width,
const TSeqRange range,
const THistogramVector histogram,
CHistogramGlyph::TMap dmap 
)
inlinestatic

◆ Save()

void CVcfHistogram::Save ( TGraphCachePool icache_pool)

◆ SetData()

void CVcfHistogram::SetData ( const THistogramVector data)
inline

Definition at line 79 of file vcf_histogram.hpp.

References data, m_Data, and m_DataMutex.

Member Data Documentation

◆ m_AnnotName

string CVcfHistogram::m_AnnotName
protected

Definition at line 100 of file vcf_histogram.hpp.

Referenced by CVcfHistogram().

◆ m_BinWidth

size_t CVcfHistogram::m_BinWidth
protected

Definition at line 101 of file vcf_histogram.hpp.

Referenced by CVcfHistogram(), and GetHistogram().

◆ m_Data

THistogramVector CVcfHistogram::m_Data
protected

Definition at line 106 of file vcf_histogram.hpp.

Referenced by GetHistogram(), Init(), Save(), and SetData().

◆ m_DataKey

string CVcfHistogram::m_DataKey
protected

Definition at line 105 of file vcf_histogram.hpp.

Referenced by CVcfHistogram(), Init(), and Save().

◆ m_DataMutex

mutex CVcfHistogram::m_DataMutex
mutableprotected

data access mutex

Definition at line 103 of file vcf_histogram.hpp.

Referenced by GetHistogram(), Init(), and SetData().

◆ m_KeysMap

map< string, vector< string > > CVcfHistogram::m_KeysMap
staticprotected

Map of cache keys per annotation.

Definition at line 109 of file vcf_histogram.hpp.

Referenced by CVcfHistogram(), and EraseCachePerAnnotation().

◆ m_KeysMapMutex

mutex CVcfHistogram::m_KeysMapMutex
staticprotected

Mutex for the cache keys.

CVcfHistogram.

Definition at line 108 of file vcf_histogram.hpp.

Referenced by CVcfHistogram(), and EraseCachePerAnnotation().


The documentation for this class was generated from the following files:
Modified on Wed May 15 15:04:18 2024 by modify_doxy.py rev. 669887