|
DUECA/DUSIME
|
"And" combination of different TriggerPullers. More...
#include <Trigger.hxx>


Public Member Functions | |
| ConditionAnd () | |
| Constructor of an empty and condition. | |
| ~ConditionAnd () | |
| Destructor. | |
| const std::string & | getTargetName () const |
| Target name is same as trigger name. | |
Public Member Functions inherited from dueca::TargetAndPuller | |
| void | addTerm (TriggerPuller &p) |
| Add another puller to this (and, or) combination of triggers. | |
| void | addTerm (const boost::intrusive_ptr< TargetAndPuller > &p) |
| Add another puller to this combination. | |
| bool | removeTerm (TriggerPuller &p) |
| Remove a term from this TriggerAnd or TriggerOr object. | |
Public Member Functions inherited from dueca::TriggerPuller | |
| const std::string & | getTriggerName () const |
| Find a name. | |
Friends | |
| class | IncoCalculator |
| Huh? | |
| ConditionAndPtr | operator&& (TriggerPuller &c1, TriggerPuller &c2) |
| Friend fuction that will call the constructor to create an and condition with two trigger pullers. | |
| ConditionAndPtr | operator&& (ConditionAndPtr c1, TriggerPuller &c2) |
| Friend function that will extend an and condition with another trigger puller. | |
| ConditionAndPtr | operator&& (TriggerPuller &c1, ConditionAndPtr c2) |
| Friend function that does the same as above, except with a different order. | |
Additional Inherited Members | |
Protected Types inherited from dueca::TriggerPuller | |
| typedef list< TargetData > | targetlist_type |
| Combination of a target, someone to pull if requested, and the index that target needs to identify this puller. | |
Protected Member Functions inherited from dueca::TargetAndPuller | |
| TargetAndPuller (const std::string &name=std::string()) | |
| Constructor. | |
| virtual | ~TargetAndPuller () |
| Destructor. | |
Protected Member Functions inherited from dueca::TriggerPuller | |
| void | pull (const DataTimeSpec &ts) |
| activate and notify the targets | |
| TriggerPuller (const std::string &name=std::string()) | |
| Constructor. | |
| virtual | ~TriggerPuller () |
| Destructor. | |
| virtual void | addTarget (const boost::intrusive_ptr< TriggerTarget > &target, unsigned id) |
| Add a target to this puller, only called by TriggerTarget's setTrigger. | |
| virtual void | removeTarget (const TriggerTarget *target) |
| Remove a target from the puller, only called by destructor. | |
Protected Attributes inherited from dueca::TargetAndPuller | |
| unsigned | name_psize |
| Number of pullers when name calculated. | |
Protected Attributes inherited from dueca::TriggerPuller | |
| targetlist_type | targets |
| List of targets and indices. | |
| std::bitset< MAX_MANAGERS > | activitylevels |
| Index of activitymanager levels. | |
| std::string | name |
| Name, for debugging purposes. | |
"And" combination of different TriggerPullers.
Note that you need not make an AND combination directly, it is automatically done by the operator && function for TriggerPullers.
Example:
This creates a ref-counted ConditionAnd on the fly, and sets it as the activity's trigger.
A ConditionAnd will look for overlapping time intervals in the combined triggers; if tokenA triggers for (10,20), (20,30) and tokenB triggers for (8,12),(12,16), etc., the resulting trigger timing will be (10,12) (12,16), ...
Take care that both tokens are triggering approximately simultaneously; if tokenA is not triggering, all the triggering information in tokenB needs to be stored, leading to increased memory use.
When used in conjunction with a channel with event data, a monotonically increasing event-type triggering comes out. So if tokenB has (14,14), (27,27), (35,35); still with the triggering on tokenA as given above, the resulting trigger will be (14,14), (27,27), and the (35,35) comes out when tokenA has progressed to or beyond that point. I foresee no sensible scenario where this may be useful.
|
friend |
Friend fuction that will call the constructor to create an and condition with two trigger pullers.
This pulls only if both TriggerPullers have pulled. Useful for waiting on a consistent set of data from multiple stream channels.