Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
lm::main::LocalDataOutputWorker Class Reference

A class that handles output on a particular core. More...

#include <LocalDataOutputWorker.h>

Inheritance diagram for lm::main::LocalDataOutputWorker:
[legend]
Collaboration diagram for lm::main::LocalDataOutputWorker:
[legend]

Public Member Functions

 LocalDataOutputWorker (SimulationFile *file)
 Create a new LocalDataOuputWorker.
virtual ~LocalDataOutputWorker ()
virtual void pushDataSet (DataSet *dataSet)
 Push a DataSet for writing.
virtual void wake ()
 Wake the thread from sleeping state.
virtual void abort ()
 Abort the thread.
virtual void checkpoint ()
 Tell the thread to checkpoint at the next available times.
Public Member Functions inherited from lm::thread::Worker
 Worker ()
 Creates thread and attaches it to the manager.
virtual ~Worker ()
 Removes thread from manager and deletes thread.
Public Member Functions inherited from lm::thread::Thread
 Thread ()
 Creates a pthread locking mechanism and initializes "Thread".
virtual ~Thread ()
 Destory the Thread.
virtual void start ()
 If no thread exists, creates a new thread and begins execution.
virtual void stop ()
 Joins the thread with the parent waiting if necessary.
virtual pthread_t getId ()
 Returns the pthread based id for the Thread.
virtual void setAffinity (int cpuNumber)
 Binds the thread to a CPU core.
Public Member Functions inherited from lm::main::DataOutputQueue
 DataOutputQueue ()
 Create a DataOutputQueue.
virtual ~DataOutputQueue ()
virtual void pushDataSet (uint type, uint replicate, ::google::protobuf::Message *message, void *payload=NULL, size_t payloadSize=0, void(*payloadSerializer)(void *, void *, size_t)=NULL)
 Put some data on the queue to be output.
virtual void pushDataSet (void *data, size_t dataSize)
 Put some data on the queue.
virtual void pushDataSet (const H5MetaData md, uint replicate, void *payload)
template<typename T>
void queryH5 (const H5Lookup::Mode mode, H5MetaData &hdr, std::vector< T > &payload, const uint replicate, const std::string path, const std::string attr="")
template<typename T>
queryH5attr (const uint replicate, const std::string path, const std::string attr)

Protected Member Functions

virtual int run ()
 Start running the thread.

Additional Inherited Members

Static Public Member Functions inherited from lm::main::DataOutputQueue
static void setInstance (DataOutputQueue *instance)
 Sets the current DataOutputQueue that is active.
static DataOutputQueuegetInstance ()
 Get the current DataOuputQueue tht is active.
Static Public Attributes inherited from lm::main::DataOutputQueue
static const uint SPECIES_COUNTS = 10
static const uint FIRST_PASSAGE_TIMES = 11
static const uint PARAMETER_VALUES = 12
static const uint BYTE_LATTICE = 20
static const uint INT_LATTICE = 21
static const uint SITE_LATTICE = 22
static const uint ARBITRARY_H5 = 23
static const uint ARBITRARY_H5_READ = 24
Protected Attributes inherited from lm::thread::Worker
volatile bool aborted
Protected Attributes inherited from lm::thread::Thread
pthread_mutex_t controlMutex
pthread_t threadId
volatile bool running
int cpuNumber
Protected Attributes inherited from lm::main::DataOutputQueue
pthread_mutex_t dataMutex
queue< DataSet * > dataQueue
pthread_mutex_t returnMutex
std::list< DataSet * > returnList
pthread_cond_t returnAvailable

Detailed Description

A class that handles output on a particular core.

Constructor & Destructor Documentation

◆ LocalDataOutputWorker()

lm::main::LocalDataOutputWorker::LocalDataOutputWorker ( SimulationFile * file)

Create a new LocalDataOuputWorker.

Parameters
fileThe file in which to save the current data stream

◆ ~LocalDataOutputWorker()

lm::main::LocalDataOutputWorker::~LocalDataOutputWorker ( )
virtual

Member Function Documentation

◆ abort()

void lm::main::LocalDataOutputWorker::abort ( )
virtual

Abort the thread.

Reimplemented from lm::thread::Worker.

◆ checkpoint()

void lm::main::LocalDataOutputWorker::checkpoint ( )
virtual

Tell the thread to checkpoint at the next available times.

Reimplemented from lm::thread::Worker.

◆ pushDataSet()

void lm::main::LocalDataOutputWorker::pushDataSet ( DataSet * dataSet)
virtual

Push a DataSet for writing.

Parameters
dataSetDataSet to add to the queue for writing

Reimplemented from lm::main::DataOutputQueue.

◆ run()

int lm::main::LocalDataOutputWorker::run ( )
protectedvirtual

Start running the thread.

Returns
0 on success, -1 on failure

Implements lm::thread::Thread.

Here is the call graph for this function:

◆ wake()

void lm::main::LocalDataOutputWorker::wake ( )
virtual

Wake the thread from sleeping state.

Implements lm::thread::Thread.


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