GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ADF::FrameTrigger Class Reference

Base class for a generic frame trigger. More...

#include <Trigger.h>

Inheritance diagram for ADF::FrameTrigger:

Public Member Functions

void Active (Bool_t b=true)
 Active this trigger. More...
 
virtual SharedFPAdd (const FactoryItem &key_item, const FactoryItem &frame_item, bool iscons=true, const Char_t *option="")
 Add a frame to the list of required frames. More...
 
virtual SharedFPAddAutoConf (const FactoryItem &key_item, const FactoryItem &frame_item, UInt_t which)
 Add a configuration frame to the input frame #which. More...
 
virtual SharedFPAddUtility (const FactoryItem &key_item, const FactoryItem &frame_item)
 Add utilities, used to decode/encode composite frames. More...
 
virtual Bool_t Check ()
 Check the content of the frame if the primary frame is a composite one. More...
 
void Fired (Bool_t b=true)
 Fired (default) or not this trigger. More...
 
 FrameTrigger (const Char_t *trig_name)
 
virtual const FrameGetConstInputFrame (UInt_t which=0u) const
 to get back the frames that define this trigger More...
 
virtual std::string GetDFOption (UInt_t which=0u) const
 get option for the input frame ( consumed: {-} , anti : {!} mandatory {} or not {|} More...
 
virtual FrameGetEmbeddedOutputFrame (ConfAgent::EModel model=ConfAgent::kStrict)
 In case the output frame should be embedded. More...
 
virtual FrameGetInputFrame (UInt_t which=0u)
 to get back the frames that define this trigger More...
 
virtual SharedFPGetInputSharedFP (UInt_t which=0u)
 to get back the Shared pointer that define this trigger More...
 
const std::string & GetName () const
 
virtual UInt_t GetNbInputFrame () const
 number of input frames that define this trigger More...
 
virtual FrameGetOutputFrame ()
 to get back the output frame More...
 
virtual SharedFPGetOutputSharedFP ()
 to get back the output frame More...
 
template<typename Data_T >
Data_T * GetSubDataFrom (UInt_t which_input, UInt_t which_sub, SharedFP *utility, Bool_t do_scan=false)
 Same as GetSubFrameFrom but to get directly a data part. More...
 
virtual FrameGetSubFrameFrom (UInt_t which_input, UInt_t which_sub, SharedFP *utility, Bool_t do_scan=false)
 to extract a sub frame from one event frame of the current trigger More...
 
UInt_t GetUniqueID ()
 
virtual Bool_t HasEmbedded () const
 true if this is a trigger for embedded frames More...
 
Bool_t IsActive () const
 Check if this trigger is in fired state. More...
 
virtual Bool_t IsConsumable (UInt_t which=0u) const
 to know if the frame is consumable or not More...
 
Bool_t IsFired () const
 Check if this trigger is in fired state. More...
 
virtual Bool_t IsIndividualFired (UInt_t which=0u) const
 fine tuning of the trigger current conditions More...
 
Bool_t IsUniversal () const
 Check if this trigger is in fired state. More...
 
Bool_t IsZombie () const
 Check if this trigger is in fired state. More...
 
virtual Bool_t Reconfigure (ConfAgent *)
 Modify the Frame definitions respecting the new data flow definition and the acceptable Frame changes. More...
 
virtual void Reset ()
 Check if this trigger is in fired state. More...
 
virtual void SetConsumable (UInt_t which, Bool_t value=true)
 to change the consumable flag. More...
 
virtual SharedFPSetOutputFrame (Frame *frame)
 Once a trigger has fired, the result of the algorithm is set through this. More...
 
virtual SharedFPSetOutputFrame (const FactoryItem &key_item, const FactoryItem &frame_item)
 Once a trigger has fired, the result of the algorithm is set through this. More...
 
void Universal (Bool_t b=true)
 Set this trigger as universal or not. More...
 
void Zombie (Bool_t b=true)
 this trigger More...
 
virtual ~FrameTrigger ()
 

Protected Member Functions

virtual Bool_t CheckConf ()
 Check if the currently read key fired this trigger. If yes, IsFired is true. More...
 
virtual void FrameTransfert (Frame *from, Frame *to)
 

Protected Attributes

Bool_t fIsActive
 true if this is an active trigger More...
 
Bool_t fIsFired
 true if this has just been fired More...
 
Bool_t fIsUniversal
 true if this is an universal trigger (means suitable for any dataflow) More...
 
Bool_t fIsZombie
 true if this is a zombie (EX: objects not properly allocated) More...
 
LogMessage fLog
 to send messages to the log server More...
 
std::string fName
 the trigger name More...
 

Detailed Description

Base class for a generic frame trigger.

Processing the data flow, an algorithm expects a set of frames. It could be a single input frame, for instance the PSA algorithm expect a crystal frame (data:crystal), or composite one, for instance tracking is expecting an event (event:data composite frame) in which there is a event:data:psa frame. A Frametrigger fully defines the required condition. To add a condition, the Add method is used: The first given frame is the frame expected on the data flow while the next ones are expected to be inside the first one given :

MainFrame (#0)
SubFrame (#1)
SubFrame (#2)

Of course at least the first one is required while the next one are optionnal. With the Add method, through the option the number of expected Frame of each kind could be set as well as if it is a coincidence or an anti-coincidence.

To be notified of such an occurence, the trigger has to register a trigger to a FrameIO object. Once the expected frame(s) has been given (through the Add method), and the trigger registered to a FrameIO, the following tests are done:

The Check() method is used to determine if the current Key on the data flow corresponds to the kind of frames the algorithm is interested in. It set the trigger to true if it is the case, false otherwise.

Definition at line 249 of file Trigger.h.


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