ProcBlock Class Reference

Ratpac-two: RAT::ProcBlock Class Reference
Ratpac-two
Inheritance diagram for RAT::ProcBlock:
RAT::Processor

Public Member Functions

 ProcBlock (ProducerBlock *prodBlock)
 
virtual ~ProcBlock ()
 
virtual void BeginOfRun (DS::Run *run)
 
virtual void EndOfRun (DS::Run *run)
 
virtual void Clear ()
 
virtual void AddProcessor (Processor *proc)
 
virtual void DeferAppend (Processor *proc)
 
virtual Processor::Result DSEvent (DS::Root *ds)
 
- Public Member Functions inherited from RAT::Processor
 Processor (std::string _name)
 
virtual ~Processor ()
 
std::string GetName () const
 
virtual void SetI (std::string param, int value)
 
virtual void SetF (std::string param, float value)
 
virtual void SetD (std::string param, double value)
 
virtual void SetS (std::string param, std::string value)
 
virtual Processor::Result Event (DS::Root *ds, DS::EV *ev)
 

Protected Attributes

std::vector< Processor * > fProcessorList
 
std::vector< double > fProcessorTime
 
std::vector< int > fProcessorExecutionCount
 
bool fSeenFirstEvent
 
TStopwatch fSourceTimer
 
double fSourceTime
 
int fSourceCount
 
std::vector< Processor * > fDeferredAppendList
 
ProducerBlockprodBlock
 
- Protected Attributes inherited from RAT::Processor
std::string name
 

Additional Inherited Members

- Public Types inherited from RAT::Processor
enum  Result { OK = 0 , FAIL = 1 , ABORT = 2 }
 

Constructor & Destructor Documentation

◆ ~ProcBlock()

ProcBlock::~ProcBlock ( )
virtual

Delete this block, and delete all processors in this block.

Member Function Documentation

◆ AddProcessor()

void ProcBlock::AddProcessor ( Processor proc)
virtual

Append a processor to the end of this block.

Note that the block takes ownership of the processor at this point. You should not delete the processor yourself later!

◆ Clear()

void ProcBlock::Clear ( )
virtual

Remove all processors from this block.

The destructors of all the processors are called, allowing them to clean up, close files, write final status messages, etc.

◆ DeferAppend()

void ProcBlock::DeferAppend ( Processor proc)
virtual

Defer the append of a processor to the end of this block.

Processors added through DeferAppend() will be added to the end of the processor block when the first event is processed. This allows final analysis processors to be created prior to the population of the event loop, say from the command line.

Note that the block takes ownership of the processor at this point. You should not delete the processor yourself later!

◆ DSEvent()

Processor::Result ProcBlock::DSEvent ( DS::Root ds)
virtual

Process this event sequentially through every processor in this block.

The ds object is passed to the DSEvent() method for every processor in the order they were added to this block. If one of the processors requests that the event be aborted, ABORT is returned immediately. In that case, not all processors will have a chance to process the event.

Return values
Processor::OKif all processors succeed.
Processor::FAILif one processor failed the event, but none requested an abort.
Processor::ABORTif one processor requested that the event be aborted.

Reimplemented from RAT::Processor.

Member Data Documentation

◆ fDeferredAppendList

std::vector<Processor *> RAT::ProcBlock::fDeferredAppendList
protected

List of processors to append to processor list as soon as the first event comes in

◆ fProcessorExecutionCount

std::vector<int> RAT::ProcBlock::fProcessorExecutionCount
protected

Total number of times each processor is run

◆ fProcessorList

std::vector<Processor *> RAT::ProcBlock::fProcessorList
protected

List of pointers to processors in this block. The ProcBlock object owns these Processor objects.

◆ fProcessorTime

std::vector<double> RAT::ProcBlock::fProcessorTime
protected

Total time in seconds spent in each processor in this block

◆ fSeenFirstEvent

bool RAT::ProcBlock::fSeenFirstEvent
protected

Has at least one event been processed yet?

◆ fSourceCount

int RAT::ProcBlock::fSourceCount
protected

Number of events counted in fSourceTime

◆ fSourceTime

double RAT::ProcBlock::fSourceTime
protected

Total time in seconds spent on whatever is producing events for this block

◆ fSourceTimer

TStopwatch RAT::ProcBlock::fSourceTimer
protected

Timer used to figure out how long the event source is taking


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/core/include/RAT/ProcBlock.hh
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/core/src/ProcBlock.cc