|
PAASS
Software suite to Acquire and Analyze Data from Pixie16
|
A pure abstract class to define a "place" for correlator. More...
#include <Places.hpp>


Public Member Functions | |
| 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 (EventData &info) |
| virtual void | activate (double time) |
| virtual void | deactivate (double time) |
| virtual void | reset () |
| virtual bool | operator && (const Place &right) const |
| virtual bool | operator|| (const Place &right) const |
| virtual bool | operator() () const |
| virtual bool | status () const |
| virtual EventData & | operator[] (unsigned index) |
| virtual EventData | operator[] (unsigned index) const |
| virtual EventData | last () |
| virtual EventData | secondlast () |
| virtual bool | resetable () const |
Data Fields | |
| std::deque< EventData > | info_ |
Protected Member Functions | |
| virtual void | check_ (EventData &info)=0 |
| virtual void | addParent_ (Place *parent) |
| virtual void | report_ (EventData &info) |
| virtual void | add_info_ (const EventData &info) |
Protected Attributes | |
| unsigned | max_size_ |
| bool | status_ |
| bool | resetable_ |
| std::vector< std::pair< Place *, bool > > | children_ |
| std::vector< Place * > | parents_ |
A pure abstract class to define a "place" for correlator.
A place has physical or abstract meaning, might be a detector, a condition or a group of detectors.
Definition at line 24 of file Places.hpp.
|
inline |
C'tor. By default the Place is resetable, and internal fifo remembers only current and previous event.
| [in] | resetable | : if the place resets automatically |
| [in] | max_size | : sets the maximum size of the fifo |
Definition at line 30 of file Places.hpp.

|
inlinevirtual |
Default Destructor
Definition at line 36 of file Places.hpp.

|
inlinevirtual |
Activates Place and reports to the parent if place was not active, always saves event data to the fifo.
| [in] | info | : the info to use for the activation |
Reimplemented in PlaceCounter, PlaceThreshold, and PlaceLazy.
Definition at line 61 of file Places.hpp.


|
inlinevirtual |
Simplified activation for counter-like detectors, without need of creating EventData object outside.
| [in] | time | : the time for the activation |
Definition at line 73 of file Places.hpp.

|
inlineprotectedvirtual |
Add information to the place
| [in] | info | : the information to add |
Definition at line 205 of file Places.hpp.

|
virtual |
Defines 'child' of place. A child will report any changes of its status to parent. Parent will change its status depending on status of children but parent status will not affect status of children.
| [in] | child | : defines a place as the child of another |
| [in] | coin | : sets if child is coincident or not |
Definition at line 37 of file Places.cpp.


|
inlineprotectedvirtual |
Adds parent to the list. User should be able to call addChild function only. The addParent function should be called by addChild.
| [in] | parent | : the parent to add |
Definition at line 189 of file Places.hpp.

|
protectedpure virtual |
Pure virutal function. The check function should decide how to change status depending on the status of children. Should be implemented in a derived class.
| [in] | info | : data to use for the check |
Implemented in PlaceAND, PlaceOR, PlaceCounter, PlaceThresholdOR, PlaceThreshold, and PlaceDetector.

|
virtual |
Checks is child is already listed among children. In case it is, False value is returned.
| [in] | child | : the child to be checked |
Definition at line 26 of file Places.cpp.

|
virtual |
Checks is child is its own parent or his parent parent ( uptree) etc. In such a case False is returned.
| [in] | child | : the child to check |
Definition at line 15 of file Places.cpp.

|
inlinevirtual |
Changes status to false. Only time and status change is recorded in fifo.
| [in] | time | : the time at which to set the place |
Reimplemented in PlaceCounter, and PlaceLazy.
Definition at line 81 of file Places.hpp.


|
inlinevirtual |
Easy access to last (current) element of fifo. If fifo is empty time=-1 event is returned
Definition at line 140 of file Places.hpp.

|
inlinevirtual |
| [in] | right | : the place to use for comparison |
Definition at line 101 of file Places.hpp.
|
inlinevirtual |
Definition at line 112 of file Places.hpp.
|
inlinevirtual |
Easy access to stored data in fifo, notice at() function used (raises exception).
| [in] | index | : the index of the data to get from the fifo |
Definition at line 125 of file Places.hpp.
|
inlinevirtual |
Easy access to stored data in fifo, notice at() function used (raises exception).
| [in] | index | : the index to get from the fifo |
Definition at line 133 of file Places.hpp.
|
inlinevirtual |
| [in] | right | : the place to use for comparison |
Definition at line 107 of file Places.hpp.
|
inlineprotectedvirtual |
Reports change of status to parents. Calls check() function for all the parents.
| [in] | info | : the information to report |
Definition at line 197 of file Places.hpp.

|
inlinevirtual |
Changes status to false without storing correlation data or reporting to parents. Use only when ending current event. For deactivation occuring due to physical conditions of the system use deactivate() method.
Reimplemented in PlaceCounter.
Definition at line 97 of file Places.hpp.

|
inlinevirtual |
Returns true if place should automatically deactivate after the end of event and false if place should stay in current state as long as deactivating signal is explicitly send.
Definition at line 168 of file Places.hpp.

|
inlinevirtual |
Easy access to the second to last element of fifo. If fifo has only one event, time=-1 event is returned.
Definition at line 152 of file Places.hpp.

|
inlinevirtual |
Definition at line 117 of file Places.hpp.

|
protected |
Vector keeping a list of children on which status of the Place depends. Place* is a pointer to the downstream place, bool describes relation (true for coincidence-like, false for anti-coincidence).
Definition at line 223 of file Places.hpp.
| std::deque<EventData> Place::info_ |
Pythonic style private field. Use it if you must, but perhaps you should not. Stores information on past events in a given Place.
Definition at line 174 of file Places.hpp.
|
protected |
Fifo (info_) depth
Definition at line 183 of file Places.hpp.
|
protected |
Vector keeping a list of parents to whom the change of status should be reported.
Definition at line 228 of file Places.hpp.
|
protected |
Indicates if place should be reseted after end of event (true) or if should persist until status is changed explicitly (false).
Definition at line 217 of file Places.hpp.
|
protected |
Status is true if given place is in active state (e.g. detector recorded an event).
Definition at line 213 of file Places.hpp.