NCBI C++ ToolKit
|
Search Toolkit Book for CVcfHistogram
#include <gui/widgets/seq_graphic/vcf_histogram.hpp>
Public Types | |
using | THistogramVector = CVCFVariantsBase::svector |
![]() | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
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) |
![]() | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (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... | |
![]() | |
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 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 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 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... | |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Definition at line 45 of file vcf_histogram.hpp.
Definition at line 48 of file vcf_histogram.hpp.
Copy constructor is invoked by CGraphCache which clones the data for aynchroneous saving operation.
Definition at line 63 of file vcf_histogram.cpp.
References _ASSERT, CChecksum::AddLine(), eCIT_String, CChecksum::eMD5, eUnknown, CCompoundIDPool::FromString(), CCompoundID::GetFirst(), CChecksum::GetHexSum(), m_AnnotName, m_BinWidth, m_DataKey, m_KeysMap, m_KeysMapMutex, NCBI_THROW, and NStr::NumericToString().
CVcfHistogram::CVcfHistogram | ( | const CVcfHistogram & | data | ) |
Definition at line 93 of file vcf_histogram.cpp.
|
inlinevirtual |
Init is invoked by CGraphCache when a new instance of CWigGraph is initialized.
Definition at line 65 of file vcf_histogram.hpp.
Definition at line 154 of file vcf_histogram.cpp.
References map_checker< Container >::end(), map_checker< Container >::erase(), map_checker< Container >::find(), CGraphCache< TData >::GetInstance(), ncbi::grid::netcache::search::fields::key, m_KeysMap, and m_KeysMapMutex.
Referenced by CColumnarVcfProjectItemExtension::ProjectItemDetached(), and CSGDataSourceContext::RemoveNonAsnData().
Definition at line 51 of file vcf_histogram.cpp.
References CCompoundID::AppendString(), eCIC_GenericID, and CCompoundIDPool::NewID().
Referenced by CVcfFeatureJob::x_Execute().
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().
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.
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.
|
inlinestatic |
Definition at line 85 of file vcf_histogram.hpp.
References CDensityMap< CntType >::AddRange(), compile_time_bits::range(), and bm::sparse_vector< Val, BV >::size().
Referenced by GetHistogram(), and CVcfFeatureJob::x_Execute().
void CVcfHistogram::Save | ( | TGraphCachePool & | icache_pool | ) |
Initializes the histogram map for a given range.
Definition at line 133 of file vcf_histogram.cpp.
References _ASSERT, bm::sparse_vector_serial_layout< SV >::buf(), bm::sparse_vector_serializer< SV >::enable_xor_compression(), eUnknown, CRWStreambuf::fOwnWriter, bm::sparse_vector_serializer< SV >::is_xor_ref(), m_Data, m_DataKey, NCBI_THROW, NcbiEmptyString, bm::sparse_vector< Val, BV >::optimize(), bm::sparse_vector_serializer< SV >::serialize(), and bm::sparse_vector_serial_layout< SV >::size().
|
inline |
Definition at line 79 of file vcf_histogram.hpp.
References m_Data, and m_DataMutex.
|
protected |
Definition at line 100 of file vcf_histogram.hpp.
Referenced by CVcfHistogram().
|
protected |
Definition at line 101 of file vcf_histogram.hpp.
Referenced by CVcfHistogram(), and GetHistogram().
|
protected |
Definition at line 106 of file vcf_histogram.hpp.
Referenced by GetHistogram(), Init(), Save(), and SetData().
|
protected |
Definition at line 105 of file vcf_histogram.hpp.
Referenced by CVcfHistogram(), Init(), and Save().
|
mutableprotected |
data access mutex
Definition at line 103 of file vcf_histogram.hpp.
Referenced by GetHistogram(), Init(), and SetData().
Map of cache keys per annotation.
Definition at line 109 of file vcf_histogram.hpp.
Referenced by CVcfHistogram(), and EraseCachePerAnnotation().
|
staticprotected |
Mutex for the cache keys.
Definition at line 108 of file vcf_histogram.hpp.
Referenced by CVcfHistogram(), and EraseCachePerAnnotation().