DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Attributes
dabc::HierarchyStore Class Reference

#include <dabc/HierarchyStore.h>

Public Member Functions

bool CheckForNextStore (DateTime &now, double store_period, double flush_period)
 Returns true if any new store action should be performed. More...
 
bool CloseFile ()
 
bool ExtractData (dabc::Hierarchy &h)
 Extract data which is can be stored, must be called under hierarchy mutex. More...
 
 HierarchyStore ()
 
bool SetBasePath (const std::string &path)
 Set base path for data storage, can only be changed when all files are closed. More...
 
bool StartFile (dabc::Buffer buf)
 
bool WriteDiff (dabc::Buffer buf)
 
bool WriteExtractedData ()
 Write extracted data to files, performed outside hierarchy mutex. More...
 
virtual ~HierarchyStore ()
 

Protected Attributes

std::string fBasePath
 
bool fDoFlush
 ! indicate if store diff should be done More...
 
bool fDoStore
 ! time when last store flush was done More...
 
dabc::BinaryFile fFile
 ! file interface More...
 
Buffer fFlushBuf
 
FileInterfacefIO
 ! base directory for data store More...
 
dabc::DateTime fLastFlushTm
 ! time when last store was done More...
 
dabc::DateTime fLastStoreTm
 ! file used to write data More...
 
uint64_t fLastVersion
 ! indicate if store flush should be done More...
 
Buffer fStoreBuf
 ! last stored version More...
 

Detailed Description

Definition at line 33 of file HierarchyStore.h.

Constructor & Destructor Documentation

◆ HierarchyStore()

dabc::HierarchyStore::HierarchyStore ( )

Definition at line 20 of file HierarchyStore.cxx.

◆ ~HierarchyStore()

dabc::HierarchyStore::~HierarchyStore ( )
virtual

Definition at line 34 of file HierarchyStore.cxx.

Member Function Documentation

◆ SetBasePath()

bool dabc::HierarchyStore::SetBasePath ( const std::string &  path)

Set base path for data storage, can only be changed when all files are closed.

Definition at line 44 of file HierarchyStore.cxx.

◆ StartFile()

bool dabc::HierarchyStore::StartFile ( dabc::Buffer  buf)

Definition at line 55 of file HierarchyStore.cxx.

◆ WriteDiff()

bool dabc::HierarchyStore::WriteDiff ( dabc::Buffer  buf)

Definition at line 92 of file HierarchyStore.cxx.

◆ CloseFile()

bool dabc::HierarchyStore::CloseFile ( )

Definition at line 114 of file HierarchyStore.cxx.

◆ CheckForNextStore()

bool dabc::HierarchyStore::CheckForNextStore ( DateTime now,
double  store_period,
double  flush_period 
)

Returns true if any new store action should be performed.

Definition at line 123 of file HierarchyStore.cxx.

◆ ExtractData()

bool dabc::HierarchyStore::ExtractData ( dabc::Hierarchy h)

Extract data which is can be stored, must be called under hierarchy mutex.

Definition at line 151 of file HierarchyStore.cxx.

◆ WriteExtractedData()

bool dabc::HierarchyStore::WriteExtractedData ( )

Write extracted data to files, performed outside hierarchy mutex.

Definition at line 181 of file HierarchyStore.cxx.

Field Documentation

◆ fBasePath

std::string dabc::HierarchyStore::fBasePath
protected

Definition at line 35 of file HierarchyStore.h.

◆ fIO

FileInterface* dabc::HierarchyStore::fIO
protected

! base directory for data store

Definition at line 37 of file HierarchyStore.h.

◆ fFile

dabc::BinaryFile dabc::HierarchyStore::fFile
protected

! file interface

Definition at line 38 of file HierarchyStore.h.

◆ fLastStoreTm

dabc::DateTime dabc::HierarchyStore::fLastStoreTm
protected

! file used to write data

Definition at line 39 of file HierarchyStore.h.

◆ fLastFlushTm

dabc::DateTime dabc::HierarchyStore::fLastFlushTm
protected

! time when last store was done

Definition at line 40 of file HierarchyStore.h.

◆ fDoStore

bool dabc::HierarchyStore::fDoStore
protected

! time when last store flush was done

Definition at line 42 of file HierarchyStore.h.

◆ fDoFlush

bool dabc::HierarchyStore::fDoFlush
protected

! indicate if store diff should be done

Definition at line 43 of file HierarchyStore.h.

◆ fLastVersion

uint64_t dabc::HierarchyStore::fLastVersion
protected

! indicate if store flush should be done

Definition at line 44 of file HierarchyStore.h.

◆ fStoreBuf

Buffer dabc::HierarchyStore::fStoreBuf
protected

! last stored version

Definition at line 45 of file HierarchyStore.h.

◆ fFlushBuf

Buffer dabc::HierarchyStore::fFlushBuf
protected

Definition at line 46 of file HierarchyStore.h.


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