Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Typedefs | Functions
JTriggerInterface.hh File Reference
#include "JLang/JConversion.hh"
#include "JTrigger/JTriggerException.hh"
#include "JTrigger/JTriggerInput.hh"
#include "JTrigger/JMatch.hh"
#include "JTrigger/JModuleCounter.hh"
#include "km3net-dataformat/online/JDAQTriggerMask.hh"

Go to the source code of this file.

Classes

class  JTRIGGER::JTriggerInterface
 Trigger interface. More...
 
struct  JTRIGGER::JTriggerInterface::JBit< N >
 Auxiliary class for type definition of specific trigger bit. More...
 
struct  JTRIGGER::JTriggerBit< JTrigger_t >
 This class is used to map trigger class to trigger bit. More...
 
struct  JTRIGGER::JAssertBit< N, is_valid >
 This class will generate a compiler error if trigger bit is out of range. More...
 
struct  JTRIGGER::JAssertBit< N, true >
 Implementation of a valid trigger bit. More...
 

Namespaces

 JTRIGGER
 Auxiliary classes and method for triggering.
 
 JPP
 This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 

Macros

#define setTriggerBit(JTrigger_t, N)
 Macro to set trigger bit of a given trigger class. More...
 

Typedefs

typedef unsigned int JTRIGGER::JTriggerbit_t
 Type definition of trigger bit. More...
 

Functions

template<class JTrigger_t >
JTriggerbit_t JTRIGGER::getTriggerBit ()
 Get the trigger bit. More...
 
template<class JTrigger_t >
JTriggerbit_t JTRIGGER::getTriggerBit (const JTrigger_t &event)
 Get the trigger bit. More...
 
const char * JTRIGGER::getTriggerName (JTriggerbit_t bit)
 Get trigger name. More...
 

Macro Definition Documentation

#define setTriggerBit (   JTrigger_t,
  N 
)
Value:
\
\
template<> \
JAssertConversion<JTrigger_t, JTriggerInterface>, \
JAssertBit<N> \
{ \
static const JTriggerbit_t value = N; \
}; \
\
\
template<> \
inline bool JTriggerInterface::checkTriggerBit<N>() const \
{ \
return dynamic_cast<const JTrigger_t*>(this) != NULL; \
} \
\
\
template<> \
const char* JTriggerInterface::getTriggerName<N>() \
{ \
return #JTrigger_t; \
}
This class is used to map trigger class to trigger bit.
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
unsigned int JTriggerbit_t
Type definition of trigger bit.

Macro to set trigger bit of a given trigger class.

This macro should be called for each trigger class. As a result, the trigger class is mapped to a unique bit. This mapping is then avaiable in the following ways:

  1. The member method JTriggerInterface::getTriggerBit() will return the specified trigger bit of the derived class; and
  2. The trigger bit is stored as a static data member value of the template class JTRIGGER::JTriggerBit.

By using this macro, it is verified -at compile time- that:

  1. The trigger bit is unique;
  2. The trigger class derives from JTRIGGER::JTriggerInterface; and
  3. The trigger class has not been associated to another trigger bit;
Parameters
JTrigger_ttrigger class
Ntrigger bit

Definition at line 271 of file JTriggerInterface.hh.