25 #define ADF_TRIGGER_H ADF_Trigger
54 static UInt_t gUniqueID;
95 { fUniqueID = gUniqueID++; }
100 {
return fUniqueID; }
183 bool iscons =
true,
const Char_t *option =
"") = 0;
196 virtual Bool_t
IsConsumable(UInt_t which = 0u)
const = 0;
255 std::vector<const Key *> fInputKeyConst;
257 std::vector<Bool_t> fIsConsumable;
259 std::vector<Short_t> fFiredOn;
261 std::vector<Bool_t> fIndividualFired;
263 std::vector<UInt_t> fScanPattern;
271 std::vector<UShort_t> fMap;
273 std::vector < std::pair<ConfigurationFrame *, UShort_t> > fActiveInputConfFrames;
282 Bool_t fIsOwnerOfOutput;
288 Frame *fEmbeddedOutputFrame;
304 if ( which < fIndividualFired.size() )
305 return fIndividualFired[which];
311 std::string result =
"{";
313 switch ( fFiredOn[which] ) {
332 {
return fInputFrames.GetSize(); }
336 {
return fInputFrames.GetSize() > 1u ; }
359 bool iscons =
true,
const Char_t *option =
"");
370 if ( which < fInputFrames.GetSize() )
371 return fInputFrames.At(which)->GetFrame();
376 {
return fInputFrames.At(which); }
380 if ( which < fInputFrames.GetSize() )
381 return fInputFrames.At(which)->GetFrame();
389 if ( which < fIsConsumable.size() )
390 fIsConsumable[which] =
value;
417 template <
typename Data_T>
420 return GetDataPointer<Data_T>(
GetSubFrameFrom(which_input,which_sub,utility,do_scan) );
436 if (fOutputFrame == 0x0)
452 virtual Bool_t
Check();
493 bool iscons =
true,
const Char_t *option =
"")
497 bool iscons =
true,
const Char_t *option =
"");
501 const ConfAgent *agent = 0x0,
bool iscons =
true,
const Char_t *option =
"");
FrameTrigger(const Char_t *trig_name)
virtual Bool_t HasEmbedded() const =0
true if this is a trigger for embedded frames
virtual SharedFP * SetOutputFrame(Frame *frame)
Once a trigger has fired, the result of the algorithm is set through this.
Bool_t fIsZombie
true if this is a zombie (EX: objects not properly allocated)
virtual Frame * GetFrame() const
Bool_t IsUniversal() const
Check if this trigger is in fired state.
virtual SharedFP * SetOutputFrame(const FactoryItem &key_item, const FactoryItem &frame_item)
Once a trigger has fired, the result of the algorithm is set through this.
virtual Frame * GetOutputFrame()=0
to get back the output frame
virtual SharedFP * Add(const FactoryItem &key_item, const FactoryItem &frame_item, bool iscons=true, const Char_t *option="")
Add a frame to the list of required frames.
virtual SharedFP * AddUtility(const FactoryItem &key_item, const FactoryItem &frame_item)
Add utilities, used to decode/encode composite frames.
virtual SharedFP * GetInputSharedFP(UInt_t which=0u)=0
to get back the Shared pointer that define this trigger
virtual std::string GetDFOption(UInt_t which=0u) const
get option for the input frame ( consumed: {-} , anti : {!} mandatory {} or not {|} ...
Bool_t IsActive() const
Check if this trigger is in fired state.
virtual ~AgataFrameTrigger()
virtual Bool_t Check()
Check if the currently read key fired this trigger. If yes, IsFired is true.
virtual Bool_t IsIndividualFired(UInt_t which=0u) const
fine tuning of the trigger current conditions
virtual SharedFP * AddAutoConf(const FactoryItem &key_item, const FactoryItem &frame_item, UInt_t which)=0
Add a configuration frame to the input frame #which.
virtual Bool_t IsConsumable(UInt_t which=0u) const
to know if the frame is consumable or not
void Fired(Bool_t b=true)
Fired (default) or not this trigger.
virtual SharedFP * SetOutputFrame(Frame *frame)=0
Once a trigger has fired, the result of the algorithm is set through this.
Trigger(const Char_t *name)
std::string fName
the trigger name
LogMessage fLog
to send messages to the log server
static AgataFrameTrigger * Build(const Char_t *name, const Char_t *in, const Char_t *out="", ConfAgent *agent=0x0)
Build a new AgataFrame Trigger.
virtual UInt_t GetNbInputFrame() const =0
number of input frames that define this trigger
virtual SharedFP * GetInputSharedFP(UInt_t which=0u)
to get back the Shared pointer that define this trigger
virtual Frame * GetSubFrameFrom(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
virtual void FrameTransfert(Frame *from, Frame *to)
Bool_t fIsActive
true if this is an active trigger
Base class for a generic frame trigger.
virtual Frame * GetEmbeddedOutputFrame(ConfAgent::EModel model=ConfAgent::kStrict)=0
Return the true output frame.
header file for Frame.cpp
Base class for version numbers.
virtual SharedFP * AddUtility(const FactoryItem &key_item, const FactoryItem &frame_item)
Add utilities, used to decode/encode composite frames.
virtual SharedFP * SetOutputFrame(Frame *frame)
Once a trigger has fired, the result of the algorithm is set through this.
virtual Frame * GetInputFrame(UInt_t which=0u)=0
to get back the frames that define this trigger
void Active(Bool_t b=true)
Active this trigger.
virtual const Frame * GetConstInputFrame(UInt_t which=0u) const
to get back the frames that define this trigger
virtual Bool_t Reconfigure(ConfAgent *)
Modify the Frame definitions respecting the new data flow definition and the acceptable Frame changes...
virtual Bool_t Check()
Check the content of the frame if the primary frame is a composite one.
virtual SharedFP * Add(const FactoryItem &key_item, const FactoryItem &frame_item, bool iscons=true, const Char_t *option="")
Add a frame to the list of required frames.
const std::string & GetName() const
To be used for Agata Data Flow.
Bool_t fIsFired
true if this has just been fired
Bool_t IsFired() const
Check if this trigger is in fired state.
Base class for a Log message.
virtual Bool_t HasEmbedded() const
true if this is a trigger for embedded frames
DFTrigger(const Char_t *trig_name)
virtual Frame * GetOutputFrame()
to get back the output frame
Bool_t IsZombie() const
Check if this trigger is in fired state.
void Zombie(Bool_t b=true)
this trigger
Base class for a trigger on a data flow.
header file for FrameIO.cpp
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.
AgataFrameTrigger(const Char_t *trig_name)
virtual std::string GetDFOption(UInt_t=0u) const
data flow option for that particular input
virtual UInt_t GetNbInputFrame() const
number of input frames that define this trigger
virtual SharedFP * AddAutoConf(const FactoryItem &key_item, const FactoryItem &frame_item, UInt_t which)
Add a configuration frame to the input frame #which.
virtual Frame * GetEmbeddedOutputFrame(ConfAgent::EModel model=ConfAgent::kStrict)
In case the output frame should be embedded.
virtual SharedFP * AddUtility(const FactoryItem &key_item, const FactoryItem &frame_item, const ConfAgent *agent)
Add utilities, used to decode/encode composite frames.
virtual Bool_t IsConsumable(UInt_t which=0u) const =0
to know if the frame is consumable or not
virtual Bool_t Reconfigure(ConfAgent *)=0
Modify the Frame definitions respecting the new data flow definition and the acceptable Frame changes...
virtual SharedFP * Add(const FactoryItem &key_item, const FactoryItem &frame_item, bool iscons=true, const Char_t *option="")=0
Add a frame to the Embedded list of required frames.
void Universal(Bool_t b=true)
Set this trigger as universal or not.
virtual Frame * GetInputFrame(UInt_t which=0u)
to get back the frames that define this trigger
virtual Bool_t CheckConf()
Check if the currently read key fired this trigger. If yes, IsFired is true.
virtual SharedFP * GetOutputSharedFP()
to get back the output frame
virtual Bool_t IsIndividualFired(UInt_t which=0u) const =0
fine tuning of the trigger current conditions
Bool_t fIsUniversal
true if this is an universal trigger (means suitable for any dataflow)
virtual void Reset()
Check if this trigger is in fired state.
virtual void SetConsumable(UInt_t which, Bool_t value=true)
to change the consumable flag.
Base class that described an item in a Factory.
virtual const Frame * GetConstInputFrame(UInt_t which=0u) const =0
to get back the frames that define this trigger