Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DL3Trigger Class Reference

#include <DL3Trigger.h>

+ Inheritance diagram for DL3Trigger:

Public Types

enum  L3_decision_t { kNO_DECISION, kKEEP_EVENT, kDISCARD_EVENT }
 The DL3Trigger object is used to tell the level-3 trigger process whether or not to discard the event. The intent is for the algorithm to be contained in the DL3Trigger_factory class which creates a single DL3Trigger object for each event. More...
 

Public Member Functions

 JOBJECT_PUBLIC (DL3Trigger)
 
 DL3Trigger (L3_decision_t L3_decision=kNO_DECISION, uint64_t status=0L, uint32_t algorithm=0)
 
void toStrings (vector< pair< string, string > > &items) const
 

Public Attributes

L3_decision_t L3_decision
 
uint64_t status
 
uint32_t algorithm
 
double mva_response
 

Detailed Description

Definition at line 14 of file DL3Trigger.h.

Member Enumeration Documentation

The DL3Trigger object is used to tell the level-3 trigger process whether or not to discard the event. The intent is for the algorithm to be contained in the DL3Trigger_factory class which creates a single DL3Trigger object for each event.

The factory should set the 3 members of the DL3Trigger object based on its results. The L3_decision value must be set to one of the values in the L3_decision_t enum such as DL3Trigger::kDiscardEvent. An enum is used in case additional states are needed later. The "status" member is a 64bit word that will be written out with those events that are kept. The intent is for this to hold a set of flags indicating the cause for the decision. The meaning of the bits in therefore algorithm specific. Because of this, a 3rd member "algorithm" is used to record which L3 algorithm (i.e. which version) was used for this event. Recording this for each event is important in case a set of filtered events from multiple runs are ever concatentated into a single file.

Different L3 algorithms can be developed, each in its own plugin. (The DL3Trigger factory in the plugin takes precedence over one statically linked into the executable.) To implement a L3 trigger algorithm, one should create a plugin that contains a DL3Trigger factory object. You can do this using the mkplugin_factory script that comes with JANA e.g.:

mkfactory_plugin DL3Trigger

This will create directory named "DL3Trigger" with skeleton files (including a Makefile) that can be built into an appropriate plugin. Please note that the generated code will need to be modified to use the existing DL3Trigger class definitiong in DANA. Specifically:

1.) remove the skeleton DL3Trigger.h file

2.) Inside DL3Trigger_factory.h, replace

     #include "DL3Trigger.h"

         with

     #include <TRIGGER/DL3Trigger.h>

The plugin name is taken as the name of the directory (in this case "DL3Trigger"). To change the name of the plugin, simply rename the DL3Trigger directory.

Once the plugin is built use it with any DANA program in the standard way:

e.g.

  hd_ana -PPLUGINS=DL3Trigger ....
Enumerator
kNO_DECISION 
kKEEP_EVENT 
kDISCARD_EVENT 

Definition at line 68 of file DL3Trigger.h.

Constructor & Destructor Documentation

DL3Trigger::DL3Trigger ( L3_decision_t  L3_decision = kNO_DECISION,
uint64_t  status = 0L,
uint32_t  algorithm = 0 
)
inline

Definition at line 74 of file DL3Trigger.h.

Member Function Documentation

DL3Trigger::JOBJECT_PUBLIC ( DL3Trigger  )
void DL3Trigger::toStrings ( vector< pair< string, string > > &  items) const
inline

Definition at line 85 of file DL3Trigger.h.

References algorithm, L3_decision, and status.

Member Data Documentation

uint32_t DL3Trigger::algorithm

Definition at line 79 of file DL3Trigger.h.

Referenced by toStrings(), and DEVIOBufferWriter::WriteEventTagData().

L3_decision_t DL3Trigger::L3_decision
double DL3Trigger::mva_response

Definition at line 80 of file DL3Trigger.h.

Referenced by DL3Trigger_factory::evnt().

uint64_t DL3Trigger::status

Definition at line 78 of file DL3Trigger.h.

Referenced by toStrings(), and DEVIOBufferWriter::WriteEventTagData().


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