Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
|
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.
|
inline |
C'tor. By default the Place is resetable, and internal fifo remebers only current and previous event.
[in] | resetable | : if the place resets automatically |
[in] | max_size | : sets the maximum size of the fifo |
|
inlinevirtual |
Default Destructor
|
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.
|
inlinevirtual |
Simplified activation for counter-like detectors, without need of creating EventData object outside.
[in] | time | : the time for the activation |
|
inlineprotectedvirtual |
Add information to the place
[in] | info | : the information to add |
|
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 |
|
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 |
|
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 |
|
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 |
|
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.
|
inlinevirtual |
Easy access to last (current) element of fifo. If fifo is empty time=-1 event is returned
|
inlinevirtual |
[in] | right | : the place to use for comparison |
|
inlinevirtual |
|
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 |
|
inlinevirtual |
Easy access to stored data in fifo, notice at() function used (raises exception).
[in] | index | : the index to get from the fifo |
|
inlinevirtual |
[in] | right | : the place to use for comparison |
|
inlineprotectedvirtual |
Reports change of status to parents. Calls check() function for all the parents.
[in] | info | : the information to report |
|
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.
|
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.
|
inlinevirtual |
Easy access to the second to last element of fifo. If fifo has only one event, time=-1 event is returned.
|
inlinevirtual |
|
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).
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.
|
protected |
Fifo (info_) depth
|
protected |
Vector keeping a list of parents to whom the change of status should be reported.
|
protected |
Indicates if place should be reseted after end of event (true) or if should persist until status is changed explicitly (false).
|
protected |
Status is true if given place is in active state (e.g. detector recorded an event).