GRUTinizer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
TWriteLoop Class Reference

#include <TWriteLoop.h>

Inheritance diagram for TWriteLoop:
StoppableThread

Public Member Functions

 TWriteLoop (ThreadsafeQueue< TUnpackedEvent * > &input_queue, TDirectory &dir)
virtual ~TWriteLoop ()
void SetLearningPhaseLength (int length)
int GetLearningPhaseLength (int length) const
void Write ()
bool InLearningPhase ()
- Public Member Functions inherited from StoppableThread
 StoppableThread ()
virtual ~StoppableThread ()
void Resume ()
void Pause ()
void Stop ()
bool IsPaused ()
bool IsRunning ()
void Join ()
virtual std::string Status ()

Protected Member Functions

bool Iteration ()

Private Member Functions

void HandleEvent (TUnpackedEvent *event)
void LearningPhase (TUnpackedEvent *event)
void EndLearningPhase ()
void WriteEvent (TUnpackedEvent *event)

Private Attributes

ThreadsafeQueue
< TUnpackedEvent * > & 
input_queue
TTree * event_tree
std::map< TClass *, TDetector ** > det_map
std::vector< TUnpackedEvent * > learning_queue
std::atomic_bool in_learning_phase
int learning_phase_length
TDirectory & output_dir

Constructor & Destructor Documentation

TWriteLoop::TWriteLoop ( ThreadsafeQueue< TUnpackedEvent * > &  input_queue,
TDirectory &  dir 
)
TWriteLoop::~TWriteLoop ( )
virtual

Member Function Documentation

void TWriteLoop::EndLearningPhase ( )
private
int TWriteLoop::GetLearningPhaseLength ( int  length) const
inline
void TWriteLoop::HandleEvent ( TUnpackedEvent event)
private
bool TWriteLoop::InLearningPhase ( )
inline
bool TWriteLoop::Iteration ( )
protectedvirtual

Implements StoppableThread.

void TWriteLoop::LearningPhase ( TUnpackedEvent event)
private
void TWriteLoop::SetLearningPhaseLength ( int  length)
inline
void TWriteLoop::Write ( )
void TWriteLoop::WriteEvent ( TUnpackedEvent event)
private

Member Data Documentation

std::map<TClass*, TDetector**> TWriteLoop::det_map
private
TTree* TWriteLoop::event_tree
private
std::atomic_bool TWriteLoop::in_learning_phase
private
ThreadsafeQueue<TUnpackedEvent*>& TWriteLoop::input_queue
private
int TWriteLoop::learning_phase_length
private
std::vector<TUnpackedEvent*> TWriteLoop::learning_queue
private
TDirectory& TWriteLoop::output_dir
private

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