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

#include <TPipeline.h>

Public Member Functions

 TPipeline ()
virtual ~TPipeline ()
bool CanStart (bool print_reason=false)
void Start ()
void Pause ()
void Resume ()
void Stop ()
void Join ()
std::string Status ()
void Write ()
TDirectory * GetDirectory ()
void ClearHistograms ()
void ReplaceRawDataFile (std::string filename)
void SetHistogramLibrary (std::string filename)
 Sets the histogram library to be used.
std::string GetHistogramLibrary () const
void SetReplaceVariable (const char *name, double value)
void RemoveVariable (const char *name)
TList * GetVariables ()
bool InLearningPhase ()
void AddRawDataFile (std::string filename)
void SetOutputRootFile (std::string filename)
 Sets the output root file.
void SetIsOnline (bool is_online)
 When reading a raw data file, should it be repeatedly checked for new data.
void SetTimeOrdering (bool time_order)
 Should the input data be time ordered prior to event building.
void AddInputRootFile (std::string filename)
 Adds an input root file. If called multiple times, will open the files in a TChain.
void SetInputRing (std::string ringname)
 Sets the input ring.
bool IsFinished ()

Private Member Functions

 TPipeline (const TPipeline &)
TPipelineoperator= (const TPipeline &)
bool AllQueuesEmpty ()
int Initialize ()
void SetupRawReadLoop ()
void SetupRootReadLoop ()
void SetupOutputFile ()
void SetupHistogramLoop ()
void SetupOutputLoop ()
TRawEventSourceOpenSingleFile (const std::string &filename)
 ClassDef (TPipeline, 0)

Private Attributes

TFile * output_file
TDirectory * output_directory
ThreadsafeQueue< TRawEventraw_event_queue
ThreadsafeQueue< TUnpackedEvent * > unpacked_event_queue
ThreadsafeQueue< TUnpackedEvent * > post_histogram_queue
std::vector< StoppableThread * > pipeline
TDataLoopdata_loop
TUnpackLoopunpack_loop
TRootInputLooproot_input_loop
THistogramLoophistogram_loop
TWriteLoopwrite_loop
TTerminalLoopterminal_loop
std::vector< std::string > input_raw_files
std::vector< std::string > input_root_files
std::string input_ring
std::string histogram_library
std::string output_root_file
bool is_online
bool time_order
int time_order_depth

Constructor & Destructor Documentation

TPipeline::TPipeline ( )
TPipeline::~TPipeline ( )
virtual
TPipeline::TPipeline ( const TPipeline )
inlineprivate

Member Function Documentation

void TPipeline::AddInputRootFile ( std::string  filename)

Adds an input root file. If called multiple times, will open the files in a TChain.

void TPipeline::AddRawDataFile ( std::string  filename)

These should only be called before calling "initialize" ///

Adds a raw data file. If called multiple times, will open files sequentially.

bool TPipeline::AllQueuesEmpty ( )
private
bool TPipeline::CanStart ( bool  print_reason = false)
TPipeline::ClassDef ( TPipeline  ,
 
)
private
void TPipeline::ClearHistograms ( )

These are safe to called after the pipeline has started ///

TDirectory * TPipeline::GetDirectory ( )
std::string TPipeline::GetHistogramLibrary ( ) const
TList * TPipeline::GetVariables ( )
int TPipeline::Initialize ( )
private
bool TPipeline::InLearningPhase ( )
bool TPipeline::IsFinished ( )
void TPipeline::Join ( )
TRawEventSource * TPipeline::OpenSingleFile ( const std::string &  filename)
private
TPipeline& TPipeline::operator= ( const TPipeline )
inlineprivate
void TPipeline::Pause ( )
void TPipeline::RemoveVariable ( const char *  name)
void TPipeline::ReplaceRawDataFile ( std::string  filename)
void TPipeline::Resume ( )
void TPipeline::SetHistogramLibrary ( std::string  filename)

Sets the histogram library to be used.

void TPipeline::SetInputRing ( std::string  ringname)

Sets the input ring.

void TPipeline::SetIsOnline ( bool  is_online)

When reading a raw data file, should it be repeatedly checked for new data.

void TPipeline::SetOutputRootFile ( std::string  filename)

Sets the output root file.

void TPipeline::SetReplaceVariable ( const char *  name,
double  value 
)
void TPipeline::SetTimeOrdering ( bool  time_order)

Should the input data be time ordered prior to event building.

void TPipeline::SetupHistogramLoop ( )
private
void TPipeline::SetupOutputFile ( )
private
void TPipeline::SetupOutputLoop ( )
private
void TPipeline::SetupRawReadLoop ( )
private
void TPipeline::SetupRootReadLoop ( )
private
void TPipeline::Start ( )
std::string TPipeline::Status ( )
void TPipeline::Stop ( )
void TPipeline::Write ( )

Member Data Documentation

TDataLoop* TPipeline::data_loop
private
std::string TPipeline::histogram_library
private
THistogramLoop* TPipeline::histogram_loop
private
std::vector<std::string> TPipeline::input_raw_files
private
std::string TPipeline::input_ring
private
std::vector<std::string> TPipeline::input_root_files
private
bool TPipeline::is_online
private
TDirectory* TPipeline::output_directory
private
TFile* TPipeline::output_file
private
std::string TPipeline::output_root_file
private
std::vector<StoppableThread*> TPipeline::pipeline
private
ThreadsafeQueue<TUnpackedEvent*> TPipeline::post_histogram_queue
private
ThreadsafeQueue<TRawEvent> TPipeline::raw_event_queue
private
TRootInputLoop* TPipeline::root_input_loop
private
TTerminalLoop* TPipeline::terminal_loop
private
bool TPipeline::time_order
private
int TPipeline::time_order_depth
private
TUnpackLoop* TPipeline::unpack_loop
private
ThreadsafeQueue<TUnpackedEvent*> TPipeline::unpacked_event_queue
private
TWriteLoop* TPipeline::write_loop
private

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