CFEL - ASG Software Suite  2.5.0
CASS
Public Member Functions | Protected Attributes | List of all members
cass::AccumulatingProcessor Class Reference

an accumulating processor More...

#include <processor.h>

+ Inheritance diagram for cass::AccumulatingProcessor:
+ Collaboration diagram for cass::AccumulatingProcessor:

Public Member Functions

 AccumulatingProcessor (const name_t &name)
 constructor More...
 
virtual ~AccumulatingProcessor ()
 virtual destructor More...
 
virtual void processEvent (const CASSEvent &evt)
 process the event More...
 
virtual const result_tresult (const CASSEvent::id_t)
 retrieve a result. More...
 
virtual void releaseEvent (const CASSEvent &)
 overwrite default behaviour to do nothing More...
 
virtual void createHistList (result_t::shared_pointer result)
 create the list of results More...
 
- Public Member Functions inherited from cass::Processor
 Processor (const name_t &name)
 constructor More...
 
virtual ~Processor ()
 virtual destructor More...
 
result_t::shared_pointer resultCopy (const uint64_t eventid)
 retrieve histogram for id More...
 
virtual void loadSettings (size_t unused)
 Provide default implementation of loadSettings that does nothing. More...
 
virtual void load ()
 load the general settings More...
 
virtual void aboutToQuit ()
 function that will be called when the processor is about to be deleted More...
 
const names_tdependencies ()
 Define all processors keys a processor depends on. More...
 
void clearDependencies ()
 clear the dependenies More...
 
void clearHistograms ()
 clear the histograms More...
 
virtual void processCommand (std::string command)
 process command in pp More...
 
const name_t name () const
 retrieve the name of this processor More...
 
bool hide () const
 retrieve the hide flag of this processor More...
 
const std::string & comment () const
 retrieve the comment of this processor More...
 

Protected Attributes

result_t::shared_pointer _result
 the result that accumulates the events More...
 
size_t _nbrEventsAccumulated
 the number of events the processor has accumulated More...
 
- Protected Attributes inherited from cass::Processor
const name_t _name
 the processors name More...
 
bool _hide
 flag to tell whether this pp should be hidden in the dropdown list More...
 
std::string _comment
 optional comment that one can add to a processor. More...
 
CachedList _resultList
 the list of results More...
 
names_t _dependencies
 the list of dependencies More...
 
shared_pointer _condition
 pointer to the processor that will contain the condition More...
 

Additional Inherited Members

- Public Types inherited from cass::Processor
typedef std::tr1::shared_ptr< Processorshared_pointer
 a shared pointer of this More...
 
typedef std::string name_t
 define the name type More...
 
typedef std::list< name_tnames_t
 define the list of names More...
 
typedef CachedList::item_type result_t
 define the results More...
 
typedef CachedList::item_sp resultsp_t
 define the shared pointer to the result More...
 
- Protected Member Functions inherited from cass::Processor
virtual void process (const CASSEvent &event, result_t &result)
 process the event More...
 
virtual void createHistList (result_t::shared_pointer result)
 create result list. More...
 
void setupGeneral ()
 general setup of the processor More...
 
bool setupCondition (bool defaultConditionType=true)
 setup the condition. More...
 
shared_pointer setupDependency (const std::string &depVarName, const name_t &name="")
 setup the dependecy. More...
 

Detailed Description

an accumulating processor

instead of having a list of result, just uses one result. Overwrites functions to only use one result

Definition at line 289 of file processor.h.

Constructor & Destructor Documentation

cass::AccumulatingProcessor::AccumulatingProcessor ( const name_t name)
inline

constructor

Parameters
namethe name of the processor

Definition at line 296 of file processor.h.

virtual cass::AccumulatingProcessor::~AccumulatingProcessor ( )
inlinevirtual

virtual destructor

Definition at line 302 of file processor.h.

Member Function Documentation

virtual void cass::AccumulatingProcessor::createHistList ( result_t::shared_pointer  result)
inlinevirtual

create the list of results

Just sets up the one result that an accumulating processor manages

Parameters
resultshared pointer of the result that will be used in the cached result list

Definition at line 348 of file processor.h.

References _result, and cass::Processor::name().

Referenced by cass::pp301::loadSettings(), cass::pp330::loadSettings(), cass::pp331::loadSettings(), cass::pp15::loadSettings(), cass::pp332::loadSettings(), cass::pp410::loadSettings(), cass::pp412::loadSettings(), cass::pp61::loadSettings(), cass::pp62::loadSettings(), cass::pp63::loadSettings(), cass::pp64::loadSettings(), cass::pp69::loadSettings(), and cass::pp78::loadSettings().

virtual void cass::AccumulatingProcessor::processEvent ( const CASSEvent evt)
inlinevirtual

process the event

Note
this is the function that should only be called by the Processor Manager.
only use this function if all dependencies have been processed before.

retrieve the result from the list. Get the writelock on it and process it, if condition is true.

Parameters
evtthe event to be processed

Reimplemented from cass::Processor.

Definition at line 315 of file processor.h.

References cass::Processor::_condition, _result, cass::CASSEvent::id(), and cass::Processor::process().

virtual void cass::AccumulatingProcessor::releaseEvent ( const CASSEvent )
inlinevirtual

overwrite default behaviour to do nothing

Reimplemented from cass::Processor.

Definition at line 339 of file processor.h.

virtual const result_t& cass::AccumulatingProcessor::result ( const CASSEvent::id_t  )
inlinevirtual

retrieve a result.

return a reference to the latest result no matter what Id has been given, as it doesn't make any sense to differentiate between different events.

Returns
const reference to the requested histogram
Parameters
eventidIgnored

Reimplemented from cass::Processor.

Definition at line 333 of file processor.h.

References _result.

Referenced by cass::pp330::loadCalibration(), cass::pp332::loadHotPixelMap(), cass::pp412::process(), cass::pp330::setBadPixMap(), cass::pp330::writeCalibration(), and cass::pp332::writeHotPixelMap().

Member Data Documentation

size_t cass::AccumulatingProcessor::_nbrEventsAccumulated
protected

the number of events the processor has accumulated

Definition at line 359 of file processor.h.

Referenced by cass::pp61::cumulativeScale(), cass::pp410::process(), cass::pp412::process(), cass::pp61::process(), cass::pp62::process(), and cass::pp69::process().

result_t::shared_pointer cass::AccumulatingProcessor::_result
protected

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