PAASS
Software suite to Acquire and Analyze Data from Pixie16
PlaceCounter Class Reference

Counts number of activations coming from directly or from children. More...

#include <Places.hpp>

Inheritance diagram for PlaceCounter:
Collaboration diagram for PlaceCounter:

Public Member Functions

 PlaceCounter (bool resetable=true, unsigned max_size=2)
 
void activate (EventData &info)
 
void deactivate (double time)
 
void reset ()
 
virtual int getCounter () const
 
- Public Member Functions inherited from Place
 Place (bool resetable=true, unsigned max_size=2)
 
virtual ~Place ()
 
virtual void addChild (Place *child, bool coin=true)
 
virtual bool checkChildren (Place *child)
 
virtual bool checkParents (Place *child)
 
virtual void activate (double time)
 
virtual bool operator && (const Place &right) const
 
virtual bool operator|| (const Place &right) const
 
virtual bool operator() () const
 
virtual bool status () const
 
virtual EventDataoperator[] (unsigned index)
 
virtual EventData operator[] (unsigned index) const
 
virtual EventData last ()
 
virtual EventData secondlast ()
 
virtual bool resetable () const
 

Protected Member Functions

virtual void check_ (EventData &info)
 Checks to see if a place is active. More...
 
- Protected Member Functions inherited from Place
virtual void addParent_ (Place *parent)
 
virtual void report_ (EventData &info)
 
virtual void add_info_ (const EventData &info)
 

Protected Attributes

int counter_
 The counter for the place activation. More...
 
- Protected Attributes inherited from Place
unsigned max_size_
 
bool status_
 
bool resetable_
 
std::vector< std::pair< Place *, bool > > children_
 
std::vector< Place * > parents_
 

Additional Inherited Members

- Data Fields inherited from Place
std::deque< EventDatainfo_
 

Detailed Description

Counts number of activations coming from directly or from children.

Definition at line 342 of file Places.hpp.

Constructor & Destructor Documentation

§ PlaceCounter()

PlaceCounter::PlaceCounter ( bool  resetable = true,
unsigned  max_size = 2 
)
inline

Low and high threshold limit. If both set to 0, no threshold is applied.

Parameters
[in]resetable: sets the place resetable or not
[in]max_size: sets the maximum size of the place

Definition at line 347 of file Places.hpp.

Member Function Documentation

§ activate()

void PlaceCounter::activate ( EventData info)
inlinevirtual

Activate the place

Parameters
[in]info: data to activate the place with

Reimplemented from Place.

Definition at line 354 of file Places.hpp.

Here is the call graph for this function:

§ check_()

void PlaceCounter::check_ ( EventData info)
protectedvirtual

Checks to see if a place is active.

Parameters
[in]info: the information to use for the threshold check

Implements Place.

Definition at line 91 of file Places.cpp.

§ deactivate()

void PlaceCounter::deactivate ( double  time)
inlinevirtual

Deactive the place

Parameters
[in]time: the time to deactivate

Reimplemented from Place.

Definition at line 361 of file Places.hpp.

Here is the call graph for this function:

§ getCounter()

virtual int PlaceCounter::getCounter ( ) const
inlinevirtual
Returns
the counter for the number of activations

Definition at line 373 of file Places.hpp.

§ reset()

void PlaceCounter::reset ( )
inlinevirtual

Resets the place

Reimplemented from Place.

Definition at line 367 of file Places.hpp.

Here is the call graph for this function:

Field Documentation

§ counter_

int PlaceCounter::counter_
protected

The counter for the place activation.

Definition at line 378 of file Places.hpp.


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