Field3D
SparseFile::Reference< Data_T > Class Template Reference

#include <SparseFile.h>

Public Types

typedef Sparse::SparseBlock< Data_T > * BlockPtrs
 
typedef ReferencePtr
 

Public Member Functions

float averageLoads () const
 Returns the average number of loads per accessed block in this file, for cache statistics.
 
int blockSize (int blockIdx) const
 Returns the number of bytes used by the data in the block.
 
void closeFile ()
 Closes the file. Will be re-opened as needed.
 
void decBlockRef (int blockIdx)
 Decrement reference count on a block.
 
bool fileIsOpen ()
 Checks if the file used by this reference is open already.
 
void incBlockRef (int blockIdx)
 Increment reference count on a block, indicates the block is currently in use, so prevents it from being unloaded.
 
void loadBlock (int blockIdx)
 Loads the block with the given index into memory. We don't pass in a reference to where the data should go since this is already know in the blocks data member.
 
long long int memSize () const
 Memory use for the Reference.
 
int numLoadedBlocks () const
 Returns the total number of blocks that are currently loaded, for statistics.
 
void openFile ()
 Opens the file. This is done just before the first request to loadBlock. This is delayed so that the original file open has closed the file and doesn't cause any Hdf5 hiccups.
 
void resetCacheStatistics ()
 Resets counts of total block loads.
 
void setNumBlocks (int numBlocks)
 Sets the number of blocks used by the SparseField we're supporting.
 
int totalLoadedBlocks () const
 Returns the total number of blocks that were ever loaded (max 1 per block, not the number of blocks), for statistics.
 
int totalLoads () const
 Returns the total number of loads of the blocks of this file, for cache statistics.
 
void unloadBlock (int blockIdx)
 Unloads the block with the given index from memory.
 
 ~Reference ()
 Destructor.
 

Static Public Member Functions

static Ptr create (const std::string a_filename, const std::string a_layerPath)
 Returns a shared pointer to a reference. Preferred way of creating References.
 

Public Attributes

std::vector< int > blockLoaded
 Whether each block is loaded. We don't use bools since vector<bool> is weird.
 
boost::mutex * blockMutex
 Allocated array of mutexes, one per block, to lock each block individually, for guaranteeing thread-safe updates of the ref counts.
 
int blockMutexSize
 Size of the mutex array. Used as modulus base.
 
BlockPtrs blocks
 Pointers to each block. This is so we can go in and manipulate them as we please.
 
std::vector< bool > blockUsed
 Flags of whether the blocks have been accessed since they were last considered for deallocation by the Second-chance/Clock caching system.
 
std::vector< int > fileBlockIndices
 Index in file for each block.
 
std::string filename
 
std::string layerPath
 
std::vector< int > loadCounts
 Per-block counts of the number of times each block has been loaded, for cache statistics.
 
int numBlocks
 
int numVoxels
 
int occupiedBlocks
 
std::vector< int > refCounts
 Per-block counts of the number of current references to the blocks. If a block's ref count is non-zero, then the block shouldn't be unloaded.
 
int valuesPerBlock
 

Private Types

typedef boost::mutex Mutex
 

Private Member Functions

Referenceoperator= (const Reference &o)
 Assignment operator. Clears ref counts and rebuilds mutex array.
 
 Reference (const Reference &o)
 Copy constructor. Clears ref counts and rebuilds mutex array.
 
 Reference (const std::string filename, const std::string layerPath)
 Constructor. Requires the filename and layer path of the field to be known.
 

Private Attributes

hid_t m_fileHandle
 Holds the Hdf5 handle to the file.
 
Hdf5Util::H5ScopedGopen m_layerGroup
 Hold the group containing the data open for the duration of the Reference's existence.
 
Mutex m_mutex
 Mutex to prevent two threads from modifying conflicting data.
 
size_t m_numActiveBlocks
 Number of currently active blocks.
 
IArchivePtr m_ogArchive
 Ogawa archive.
 
OgIGroupPtr m_ogLayerGroup
 Ogawa layer group.
 
OgSparseDataReader< Data_T > * m_ogReader
 Pointer to the ogawa reader. NULL at construction time. Created in openFile().
 
boost::shared_ptr< OgSparseDataReader< Data_T > > m_ogReaderPtr
 Shared pointer to the ogawa reader.
 
OgIGroupPtr m_ogRoot
 Ogawa archive root.
 
SparseDataReader< Data_T > * m_reader
 Pointer to the reader object. NULL at construction time. Created in openFile().
 

Detailed Description

template<class Data_T>
class SparseFile::Reference< Data_T >

Handles information about and block loading for a single SparseField as referenced on disk

Definition at line 105 of file SparseFile.h.

Member Typedef Documentation

◆ Ptr

template<class Data_T>
typedef Reference* SparseFile::Reference< Data_T >::Ptr

Definition at line 116 of file SparseFile.h.

◆ BlockPtrs

template<class Data_T>
typedef Sparse::SparseBlock<Data_T>* SparseFile::Reference< Data_T >::BlockPtrs

Definition at line 120 of file SparseFile.h.

◆ Mutex

template<class Data_T>
typedef boost::mutex SparseFile::Reference< Data_T >::Mutex
private

Definition at line 215 of file SparseFile.h.

Constructor & Destructor Documentation

◆ ~Reference()

template<class Data_T>
SparseFile::Reference< Data_T >::~Reference ( )

Destructor.

Definition at line 572 of file SparseFile.h.

573{
574 closeFile();
575
576 if (m_reader) {
577 delete m_reader;
578 }
579
580 if (blockMutex)
581 delete [] blockMutex;
582}
void closeFile()
Closes the file. Will be re-opened as needed.
Definition SparseFile.h:710
SparseDataReader< Data_T > * m_reader
Pointer to the reader object. NULL at construction time. Created in openFile().
Definition SparseFile.h:239
boost::mutex * blockMutex
Allocated array of mutexes, one per block, to lock each block individually, for guaranteeing thread-s...
Definition SparseFile.h:156

References blockMutex, closeFile(), and m_reader.

◆ Reference() [1/2]

template<class Data_T>
SparseFile::Reference< Data_T >::Reference ( const std::string filename,
const std::string layerPath )
private

Constructor. Requires the filename and layer path of the field to be known.

Definition at line 559 of file SparseFile.h.

565{
566 /* Empty */
567}
std::string layerPath
Definition SparseFile.h:128
OgSparseDataReader< Data_T > * m_ogReader
Pointer to the ogawa reader. NULL at construction time. Created in openFile().
Definition SparseFile.h:245
hid_t m_fileHandle
Holds the Hdf5 handle to the file.
Definition SparseFile.h:231
size_t m_numActiveBlocks
Number of currently active blocks.
Definition SparseFile.h:257

References blockMutex, filename, layerPath, m_fileHandle, m_numActiveBlocks, m_ogReader, m_reader, numBlocks, numVoxels, occupiedBlocks, and valuesPerBlock.

Referenced by create(), operator=(), and Reference().

◆ Reference() [2/2]

template<class Data_T>
SparseFile::Reference< Data_T >::Reference ( const Reference< Data_T > & o)
private

Copy constructor. Clears ref counts and rebuilds mutex array.

Definition at line 587 of file SparseFile.h.

588{
589 m_ogReaderPtr.reset();
591 m_reader = NULL;
593 *this = o;
594}
boost::shared_ptr< OgSparseDataReader< Data_T > > m_ogReaderPtr
Shared pointer to the ogawa reader.
Definition SparseFile.h:242

References blockMutex, m_ogReader, m_ogReaderPtr, m_reader, and Reference().

Member Function Documentation

◆ create()

template<class Data_T>
Reference< Data_T >::Ptr SparseFile::Reference< Data_T >::create ( const std::string a_filename,
const std::string a_layerPath )
static

Returns a shared pointer to a reference. Preferred way of creating References.

Definition at line 660 of file SparseFile.h.

662{
663 return Ptr(new Reference(a_filename, a_layerPath));
664}
Reference(const std::string filename, const std::string layerPath)
Constructor. Requires the filename and layer path of the field to be known.
Definition SparseFile.h:559

References Reference().

Referenced by SparseFileManager::getNextId().

◆ fileIsOpen()

template<class Data_T>
bool SparseFile::Reference< Data_T >::fileIsOpen ( )

Checks if the file used by this reference is open already.

Definition at line 669 of file SparseFile.h.

670{
671 return m_fileHandle >= 0;
672}

References m_fileHandle.

Referenced by openFile().

◆ setNumBlocks()

template<class Data_T>
void SparseFile::Reference< Data_T >::setNumBlocks ( int numBlocks)

Sets the number of blocks used by the SparseField we're supporting.

Definition at line 677 of file SparseFile.h.

678{
680
681 // Store number of blocks in member variable
683
685 blockLoaded.resize(numBlocks, 0);
686#if !F3D_NO_BLOCKS_ARRAY
687 blocks.resize(numBlocks, 0);
688#endif
689 blockUsed.resize(numBlocks, false);
690 loadCounts.resize(numBlocks, 0);
691 refCounts.resize(numBlocks, 0);
692 if (blockMutex)
693 delete[] blockMutex;
694#if F3D_SHORT_MUTEX_ARRAY
695# if F3D_NO_BLOCKS_ARRAY
697# else
699 static_cast<size_t>(F3D_MUTEX_ARRAY_SIZE));
700# endif
702#else
704#endif
705}
std::vector< bool > blockUsed
Flags of whether the blocks have been accessed since they were last considered for deallocation by th...
Definition SparseFile.h:145
BlockPtrs blocks
Pointers to each block. This is so we can go in and manipulate them as we please.
Definition SparseFile.h:141
std::vector< int > fileBlockIndices
Index in file for each block.
Definition SparseFile.h:135
Mutex m_mutex
Mutex to prevent two threads from modifying conflicting data.
Definition SparseFile.h:254
int blockMutexSize
Size of the mutex array. Used as modulus base.
Definition SparseFile.h:159
std::vector< int > blockLoaded
Whether each block is loaded. We don't use bools since vector<bool> is weird.
Definition SparseFile.h:138
std::vector< int > refCounts
Per-block counts of the number of current references to the blocks. If a block's ref count is non-zer...
Definition SparseFile.h:152
std::vector< int > loadCounts
Per-block counts of the number of times each block has been loaded, for cache statistics.
Definition SparseFile.h:148

References blockLoaded, blockMutex, blockMutexSize, blocks, blockUsed, F3D_MUTEX_ARRAY_SIZE, fileBlockIndices, loadCounts, m_mutex, numBlocks, and refCounts.

◆ openFile()

template<class Data_T>
void SparseFile::Reference< Data_T >::openFile ( )

Opens the file. This is done just before the first request to loadBlock. This is delayed so that the original file open has closed the file and doesn't cause any Hdf5 hiccups.

Definition at line 537 of file SparseFile.cpp.

538{
539 using namespace Exc;
540 using namespace Hdf5Util;
541
543
544 // check that the file wasn't already opened before obtaining the lock
545 if (fileIsOpen()) {
546 return;
547 }
548
549 // First try Ogawa ---
550
552 if (m_ogArchive->isValid()) {
553 m_ogRoot.reset(new OgIGroup(*m_ogArchive));
554 m_ogLayerGroup.reset(new OgIGroup(m_ogRoot->findGroup(layerPath)));
555 if (m_ogLayerGroup->isValid()) {
556 // Allocate the reader
558 numVoxels,
560 true));
562 // Done
563 return;
564 }
565 }
566
567 // Then, try HDF5 ---
568
569 {
570 // Hold the global lock
572 // Open the file
574 if (m_fileHandle >= 0) {
575 // Open the layer group
576 m_layerGroup.open(m_fileHandle, layerPath.c_str());
577 if (m_layerGroup.id() < 0) {
578 Msg::print(Msg::SevWarning, "In SparseFile::Reference::openFile: "
579 "Couldn't find layer group " + layerPath +
580 " in .f3d file ");
582 }
583 } else {
584 Msg::print(Msg::SevWarning, "In SparseFile::Reference::openFile: "
585 "Couldn't open HDF5 file ");
587 }
588 }
589
590 // Re-allocate reader
591 if (m_reader) {
592 delete m_reader;
593 }
597}
OgIGroupPtr m_ogRoot
Ogawa archive root.
Definition SparseFile.h:249
Hdf5Util::H5ScopedGopen m_layerGroup
Hold the group containing the data open for the duration of the Reference's existence.
Definition SparseFile.h:235
IArchivePtr m_ogArchive
Ogawa archive.
Definition SparseFile.h:247
OgIGroupPtr m_ogLayerGroup
Ogawa layer group.
Definition SparseFile.h:251
bool fileIsOpen()
Checks if the file used by this reference is open already.
Definition SparseFile.h:669
FIELD3D_API void print(Severity severity, const std::string &message)
Sends the string to the assigned output, prefixing the message with the severity.
Definition Log.cpp:70

References fileIsOpen(), filename, g_hdf5Mutex, layerPath, m_fileHandle, m_layerGroup, m_mutex, m_ogArchive, m_ogLayerGroup, m_ogReader, m_ogReaderPtr, m_ogRoot, m_reader, numVoxels, occupiedBlocks, Msg::print(), Msg::SevWarning, and valuesPerBlock.

◆ closeFile()

template<class Data_T>
void SparseFile::Reference< Data_T >::closeFile ( )

Closes the file. Will be re-opened as needed.

Definition at line 710 of file SparseFile.h.

711{
712 if (m_fileHandle >= 0) {
713 if (H5Fclose(m_fileHandle) < 0) {
714 Msg::print("In ~Reference(): Error closing file " + filename);
715 }
716 }
717}

References filename, m_fileHandle, and Msg::print().

Referenced by unloadBlock(), and ~Reference().

◆ loadBlock()

template<class Data_T>
void SparseFile::Reference< Data_T >::loadBlock ( int blockIdx)

Loads the block with the given index into memory. We don't pass in a reference to where the data should go since this is already know in the blocks data member.

Definition at line 498 of file SparseFile.cpp.

499{
501
502 // Allocate the block
503#if F3D_NO_BLOCKS_ARRAY
504 blocks[blockIdx].resize(numVoxels);
506 // Read the data
508 if (m_reader) {
510 } else {
512 }
513 // Mark block as loaded
515 // Track count
517#else
518 blocks[blockIdx]->resize(numVoxels);
520 // Read the data
522 if (m_reader) {
524 } else {
526 }
527 // Mark block as loaded
529 // Track count
531#endif
532}

References blockLoaded, blocks, fileBlockIndices, m_mutex, m_numActiveBlocks, m_ogReader, m_reader, and numVoxels.

◆ unloadBlock()

template<class Data_T>
void SparseFile::Reference< Data_T >::unloadBlock ( int blockIdx)

Unloads the block with the given index from memory.

Definition at line 722 of file SparseFile.h.

723{
724 // Deallocate the block
725#if F3D_NO_BLOCKS_ARRAY
726 blocks[blockIdx].clear();
727#else
728 blocks[blockIdx]->clear();
729#endif
730 // Mark block as unloaded
732 // Track count
734#if 0
735 // If no active blocks, close the file. De-activate for now.
736 if (m_numActiveBlocks == 0) {
737 closeFile();
738 }
739#endif
740}

References blockLoaded, blocks, closeFile(), and m_numActiveBlocks.

◆ incBlockRef()

template<class Data_T>
void SparseFile::Reference< Data_T >::incBlockRef ( int blockIdx)

Increment reference count on a block, indicates the block is currently in use, so prevents it from being unloaded.

Definition at line 745 of file SparseFile.h.

746{
747#if F3D_SHORT_MUTEX_ARRAY
749#else
751#endif
753}

References blockMutex, blockMutexSize, and refCounts.

◆ decBlockRef()

template<class Data_T>
void SparseFile::Reference< Data_T >::decBlockRef ( int blockIdx)

Decrement reference count on a block.

Definition at line 758 of file SparseFile.h.

759{
760#if F3D_SHORT_MUTEX_ARRAY
762#else
764#endif
766}

References blockMutex, blockMutexSize, and refCounts.

◆ blockSize()

template<class Data_T>
int SparseFile::Reference< Data_T >::blockSize ( int blockIdx) const

Returns the number of bytes used by the data in the block.

Definition at line 771 of file SparseFile.h.

772{
773 return numVoxels * sizeof(Data_T);
774}

References numVoxels.

◆ totalLoads()

template<class Data_T>
int SparseFile::Reference< Data_T >::totalLoads ( ) const

Returns the total number of loads of the blocks of this file, for cache statistics.

Definition at line 779 of file SparseFile.h.

780{
783 int numLoads = 0;
784 for (; i != end; ++i)
785 numLoads += *i;
786
787 return numLoads;
788}

References loadCounts.

◆ numLoadedBlocks()

template<class Data_T>
int SparseFile::Reference< Data_T >::numLoadedBlocks ( ) const

Returns the total number of blocks that are currently loaded, for statistics.

Definition at line 793 of file SparseFile.h.

794{
797 int numBlockCounter = 0;
798 for (; i != end; ++i)
799 if (*i)
801
802 return numBlockCounter;
803}

References blockLoaded.

◆ totalLoadedBlocks()

template<class Data_T>
int SparseFile::Reference< Data_T >::totalLoadedBlocks ( ) const

Returns the total number of blocks that were ever loaded (max 1 per block, not the number of blocks), for statistics.

Definition at line 808 of file SparseFile.h.

809{
813 int numBlockCounter = 0;
814
815 if (blockLoaded.size() == 0) {
816 for (; i != end; ++i)
817 if (*i)
819 } else {
820 assert(loadCounts.size() == blockLoaded.size());
821
822 for (; i != end; ++i, ++li)
823 if (*i || *li)
825 }
826
827 return numBlockCounter;
828}

References blockLoaded, and loadCounts.

◆ averageLoads()

template<class Data_T>
float SparseFile::Reference< Data_T >::averageLoads ( ) const

Returns the average number of loads per accessed block in this file, for cache statistics.

Definition at line 833 of file SparseFile.h.

834{
837 int numLoads = 0, numBlockCounter = 0;
838 for (; i != end; ++i) {
839 if (*i) {
840 numLoads += *i;
842 }
843 }
844
845 return (float)numLoads / std::max(1, numBlockCounter);
846}

References loadCounts.

◆ resetCacheStatistics()

template<class Data_T>
void SparseFile::Reference< Data_T >::resetCacheStatistics ( )

Resets counts of total block loads.

Definition at line 851 of file SparseFile.h.

852{
855 for (; li != lend; ++li)
856 *li = 0;
857}

References loadCounts.

◆ memSize()

template<class Data_T>
long long int SparseFile::Reference< Data_T >::memSize ( ) const

Memory use for the Reference.

Definition at line 863 of file SparseFile.h.

864{
866
867 return sizeof(*this) +
868 fileBlockIndices.capacity() * sizeof(int) +
869 blockLoaded.capacity() * sizeof(int) +
871 blocks.capacity() * sizeof(Sparse::SparseBlock<Data_T>*) +
872#endif
873 blockUsed.capacity() * sizeof(bool) +
874 loadCounts.capacity() * sizeof(int) +
875 refCounts.capacity() * sizeof(int) +
877 blockMutexSize * sizeof(boost::mutex) +
878#else
879 numBlocks * sizeof(boost::mutex) +
880#endif
882}

References blockLoaded, blockMutexSize, blocks, blockUsed, F3D_NO_BLOCKS_ARRAY, F3D_SHORT_MUTEX_ARRAY, fileBlockIndices, loadCounts, m_mutex, numBlocks, and refCounts.

◆ operator=()

template<class Data_T>
Reference< Data_T > & SparseFile::Reference< Data_T >::operator= ( const Reference< Data_T > & o)
private

Assignment operator. Clears ref counts and rebuilds mutex array.

Definition at line 600 of file SparseFile.h.

601{
602 if (this == &o) {
603 return *this;
604 }
605
606 // Copy public member variables (where appropriate)
614 blocks = o.blocks;
618 if (blockMutex)
619 delete[] blockMutex;
620#if F3D_SHORT_MUTEX_ARRAY
621# if F3D_NO_BLOCKS_ARRAY
623# else
624 blockMutexSize = std::min(static_cast<int>(blocks.size()),
626# endif
628#else
629 blockMutex = new boost::mutex[blocks.size()];
630#endif
631
632#if 0
633 // MW: Should this be copying the file handle? Never seems to happen,
634 // but it also seems bad. Ifdef'ing out for now.
635 // Copy private member variables (where appropriate)
637 // Don't copy id, let hdf5 generate a new one.
638 if (m_fileHandle >= 0) {
639 m_layerGroup.open(m_fileHandle, layerPath.c_str());
640 }
641#else
642 m_fileHandle = -1;
643#endif
644
645 // Re-allocate reader
646 if (m_reader)
647 delete m_reader;
648 m_reader = NULL;
649
650 m_ogReaderPtr.reset();
652
653 return *this;
654}

References blockLoaded, blockMutex, blockMutexSize, blocks, blockUsed, F3D_MUTEX_ARRAY_SIZE, fileBlockIndices, filename, layerPath, loadCounts, m_fileHandle, m_layerGroup, m_ogReader, m_ogReaderPtr, m_reader, numBlocks, numVoxels, occupiedBlocks, refCounts, Reference(), and valuesPerBlock.

Member Data Documentation

◆ filename

template<class Data_T>
std::string SparseFile::Reference< Data_T >::filename

◆ layerPath

template<class Data_T>
std::string SparseFile::Reference< Data_T >::layerPath

◆ valuesPerBlock

template<class Data_T>
int SparseFile::Reference< Data_T >::valuesPerBlock

◆ numVoxels

template<class Data_T>
int SparseFile::Reference< Data_T >::numVoxels

◆ numBlocks

template<class Data_T>
int SparseFile::Reference< Data_T >::numBlocks

Definition at line 131 of file SparseFile.h.

Referenced by memSize(), operator=(), Reference(), and setNumBlocks().

◆ occupiedBlocks

template<class Data_T>
int SparseFile::Reference< Data_T >::occupiedBlocks

◆ fileBlockIndices

template<class Data_T>
std::vector<int> SparseFile::Reference< Data_T >::fileBlockIndices

Index in file for each block.

Definition at line 135 of file SparseFile.h.

Referenced by loadBlock(), memSize(), operator=(), setNumBlocks(), and SparseField< Data_T >::setupReferenceBlocks().

◆ blockLoaded

template<class Data_T>
std::vector<int> SparseFile::Reference< Data_T >::blockLoaded

Whether each block is loaded. We don't use bools since vector<bool> is weird.

Definition at line 138 of file SparseFile.h.

Referenced by loadBlock(), memSize(), numLoadedBlocks(), operator=(), setNumBlocks(), totalLoadedBlocks(), and unloadBlock().

◆ blocks

template<class Data_T>
BlockPtrs SparseFile::Reference< Data_T >::blocks

Pointers to each block. This is so we can go in and manipulate them as we please.

Definition at line 141 of file SparseFile.h.

Referenced by loadBlock(), memSize(), operator=(), setNumBlocks(), SparseField< Data_T >::setupReferenceBlocks(), and unloadBlock().

◆ blockUsed

template<class Data_T>
std::vector<bool> SparseFile::Reference< Data_T >::blockUsed

Flags of whether the blocks have been accessed since they were last considered for deallocation by the Second-chance/Clock caching system.

Definition at line 145 of file SparseFile.h.

Referenced by memSize(), operator=(), and setNumBlocks().

◆ loadCounts

template<class Data_T>
std::vector<int> SparseFile::Reference< Data_T >::loadCounts

Per-block counts of the number of times each block has been loaded, for cache statistics.

Definition at line 148 of file SparseFile.h.

Referenced by averageLoads(), memSize(), operator=(), resetCacheStatistics(), setNumBlocks(), totalLoadedBlocks(), and totalLoads().

◆ refCounts

template<class Data_T>
std::vector<int> SparseFile::Reference< Data_T >::refCounts

Per-block counts of the number of current references to the blocks. If a block's ref count is non-zero, then the block shouldn't be unloaded.

Definition at line 152 of file SparseFile.h.

Referenced by decBlockRef(), incBlockRef(), memSize(), operator=(), and setNumBlocks().

◆ blockMutex

template<class Data_T>
boost::mutex* SparseFile::Reference< Data_T >::blockMutex

Allocated array of mutexes, one per block, to lock each block individually, for guaranteeing thread-safe updates of the ref counts.

Definition at line 156 of file SparseFile.h.

Referenced by decBlockRef(), incBlockRef(), operator=(), Reference(), Reference(), setNumBlocks(), and ~Reference().

◆ blockMutexSize

template<class Data_T>
int SparseFile::Reference< Data_T >::blockMutexSize

Size of the mutex array. Used as modulus base.

Definition at line 159 of file SparseFile.h.

Referenced by decBlockRef(), incBlockRef(), memSize(), operator=(), and setNumBlocks().

◆ m_fileHandle

template<class Data_T>
hid_t SparseFile::Reference< Data_T >::m_fileHandle
private

Holds the Hdf5 handle to the file.

Definition at line 231 of file SparseFile.h.

Referenced by closeFile(), fileIsOpen(), openFile(), operator=(), and Reference().

◆ m_layerGroup

template<class Data_T>
Hdf5Util::H5ScopedGopen SparseFile::Reference< Data_T >::m_layerGroup
private

Hold the group containing the data open for the duration of the Reference's existence.

Definition at line 235 of file SparseFile.h.

Referenced by openFile(), and operator=().

◆ m_reader

template<class Data_T>
SparseDataReader<Data_T>* SparseFile::Reference< Data_T >::m_reader
private

Pointer to the reader object. NULL at construction time. Created in openFile().

Definition at line 239 of file SparseFile.h.

Referenced by loadBlock(), openFile(), operator=(), Reference(), Reference(), and ~Reference().

◆ m_ogReaderPtr

template<class Data_T>
boost::shared_ptr<OgSparseDataReader<Data_T> > SparseFile::Reference< Data_T >::m_ogReaderPtr
private

Shared pointer to the ogawa reader.

Definition at line 242 of file SparseFile.h.

Referenced by openFile(), operator=(), and Reference().

◆ m_ogReader

template<class Data_T>
OgSparseDataReader<Data_T>* SparseFile::Reference< Data_T >::m_ogReader
private

Pointer to the ogawa reader. NULL at construction time. Created in openFile().

Definition at line 245 of file SparseFile.h.

Referenced by loadBlock(), openFile(), operator=(), Reference(), and Reference().

◆ m_ogArchive

template<class Data_T>
IArchivePtr SparseFile::Reference< Data_T >::m_ogArchive
private

Ogawa archive.

Definition at line 247 of file SparseFile.h.

Referenced by openFile().

◆ m_ogRoot

template<class Data_T>
OgIGroupPtr SparseFile::Reference< Data_T >::m_ogRoot
private

Ogawa archive root.

Definition at line 249 of file SparseFile.h.

Referenced by openFile().

◆ m_ogLayerGroup

template<class Data_T>
OgIGroupPtr SparseFile::Reference< Data_T >::m_ogLayerGroup
private

Ogawa layer group.

Definition at line 251 of file SparseFile.h.

Referenced by openFile().

◆ m_mutex

template<class Data_T>
Mutex SparseFile::Reference< Data_T >::m_mutex
mutableprivate

Mutex to prevent two threads from modifying conflicting data.

Definition at line 254 of file SparseFile.h.

Referenced by loadBlock(), memSize(), openFile(), and setNumBlocks().

◆ m_numActiveBlocks

template<class Data_T>
size_t SparseFile::Reference< Data_T >::m_numActiveBlocks
private

Number of currently active blocks.

Definition at line 257 of file SparseFile.h.

Referenced by loadBlock(), Reference(), and unloadBlock().


The documentation for this class was generated from the following files: