ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TrigConf::HLTTriggerElement Class Reference

HLT trigger element configuration information. More...

#include <HLTTriggerElement.h>

Inheritance diagram for TrigConf::HLTTriggerElement:
Collaboration diagram for TrigConf::HLTTriggerElement:

Public Member Functions

 HLTTriggerElement ()
 default constructor More...
 
 HLTTriggerElement (const std::string &name)
 constructor with configuration data More...
 
 HLTTriggerElement (unsigned int i, const std::string &name)
 constructor with configuration data More...
 
 HLTTriggerElement (const std::pair< unsigned int, std::string > &p)
 constructor with configuration data More...
 
virtual ~HLTTriggerElement () override=default
 destructor More...
 
unsigned int hashId () const
 
unsigned int id () const
 
void setHashId (unsigned int hashid)
 
virtual void print (const std::string &indent="", unsigned int detail=1) const override
 print method More...
 
virtual void writeXML (std::ofstream &xmlfile)
 
void setL2 (bool on=true)
 
void setEF (bool on=true)
 
void reset ()
 
bool inL2 () const
 
bool inEF () const
 
bool isSet () const
 
int superMasterTableId () const
 
unsigned int smk () const
 
const std::string & name () const
 
const std::string & comment () const
 
unsigned int version () const
 
void setSuperMasterTableId (int id)
 
void setSMK (int id)
 
void setId (unsigned int id)
 
void setName (const std::string &name)
 
void setVersion (unsigned int version)
 
void setComment (const std::string &c)
 
void printNameIdV (const std::string &indent="") const
 
virtual std::string __str__ () const
 

Static Public Member Functions

static bool getLabel (unsigned int id, std::string &label)
 find name from ID in the map m_IdToLabel More...
 

Protected Member Functions

std::ostream & indent (std::ostream &o, int lvl, int size) const
 

Private Member Functions

void set ()
 

Private Attributes

unsigned int m_hashId
 trigger element id
More...
 
unsigned int m_level
 level where TE is produced for a given configuration (to be determined in light of the menu, this More...
 
unsigned int m_smk
 
unsigned int m_id
 
std::string m_name
 
unsigned int m_version
 
std::string m_comment
 

Friends

std::ostream & operator<< (std::ostream &, const TrigConf::HLTTriggerElement &)
 

Detailed Description

HLT trigger element configuration information.

A trigger element is an artificial trigger object (a refined electron, a Z-boson candidate etc.) More detail on the HTL Steering TWIKI.

Definition at line 26 of file HLTTriggerElement.h.

Constructor & Destructor Documentation

◆ HLTTriggerElement() [1/4]

HLTTriggerElement::HLTTriggerElement ( )

default constructor

Definition at line 15 of file HLTTriggerElement.cxx.

15  :
16  TrigConfData(""),
17  m_hashId(0),
18  m_level(0)
19 {}

◆ HLTTriggerElement() [2/4]

HLTTriggerElement::HLTTriggerElement ( const std::string &  name)

constructor with configuration data

Parameters
iID of the trigger element
nname of the trigger element

Definition at line 21 of file HLTTriggerElement.cxx.

21  :
23  m_hashId(HLTUtils::string2hash(name)), // don't allow for external setting of trigger element id's
24  m_level(0)
25 {
26 }

◆ HLTTriggerElement() [3/4]

HLTTriggerElement::HLTTriggerElement ( unsigned int  i,
const std::string &  name 
)

constructor with configuration data

Parameters
iID of the trigger element
nname of the trigger element

Definition at line 28 of file HLTTriggerElement.cxx.

28  :
30  m_hashId(HLTUtils::string2hash(name) ), // don't allow for external setting of trigger element id's
31  m_level(0)
32 {
33 }

◆ HLTTriggerElement() [4/4]

HLTTriggerElement::HLTTriggerElement ( const std::pair< unsigned int, std::string > &  p)

constructor with configuration data

Parameters
ppair (ID,name) of the trigger element

Definition at line 35 of file HLTTriggerElement.cxx.

35  :
36  TrigConfData(p.second),
37  m_hashId( HLTUtils::string2hash(p.second) ), // don't yet allow for external setting of trigger element id's
38  m_level(0)
39 {
40 }

◆ ~HLTTriggerElement()

virtual TrigConf::HLTTriggerElement::~HLTTriggerElement ( )
overridevirtualdefault

destructor

Member Function Documentation

◆ __str__()

string TrigConfData::__str__ ( ) const
virtualinherited

Reimplemented in TrigConf::HLTChain, TrigConf::HLTPrescaleSet, TrigConf::TriggerItem, and TrigConf::HLTSequence.

Definition at line 50 of file TrigConfData.cxx.

50  {
51  stringstream s;
52  s << *this;
53  return s.str();
54 }

◆ comment()

const std::string& TrigConf::TrigConfData::comment ( ) const
inlineinherited

Definition at line 23 of file TrigConfData.h.

23 {return m_comment;}

◆ getLabel()

bool HLTTriggerElement::getLabel ( unsigned int  id,
std::string &  label 
)
static

find name from ID in the map m_IdToLabel

Parameters
idtrigger element ID
labelreference to be set with the trigger element name that has been found
Returns
true if ID has been found

Definition at line 63 of file HLTTriggerElement.cxx.

63  {
65  if (label=="UNKNOWN HASH ID") {
66  label = "";
67  return false;
68  }
69  return true;
70 }

◆ hashId()

unsigned int TrigConf::HLTTriggerElement::hashId ( ) const
inline

Definition at line 59 of file HLTTriggerElement.h.

59 { return m_hashId; }

◆ id()

unsigned int TrigConf::HLTTriggerElement::id ( ) const
inline

Definition at line 60 of file HLTTriggerElement.h.

60 { return m_hashId; }

◆ indent()

std::ostream & TrigConfData::indent ( std::ostream &  o,
int  lvl,
int  size 
) const
protectedinherited

Definition at line 23 of file TrigConfData.cxx.

23  {
24  int width = lvl*size;
25  if(width==0) return o;
26  o << setw(lvl*size) << " ";
27  return o;
28 }

◆ inEF()

bool TrigConf::HLTTriggerElement::inEF ( ) const
inline

Definition at line 75 of file HLTTriggerElement.h.

75 { return (m_level&0x2) != 0; }

◆ inL2()

bool TrigConf::HLTTriggerElement::inL2 ( ) const
inline

Definition at line 74 of file HLTTriggerElement.h.

74 { return (m_level&0x1) != 0; }

◆ isSet()

bool TrigConf::HLTTriggerElement::isSet ( ) const
inline

Definition at line 76 of file HLTTriggerElement.h.

76 { return (m_level&0x4) == 0; }

◆ name()

const std::string& TrigConf::TrigConfData::name ( ) const
inlineinherited

Definition at line 22 of file TrigConfData.h.

22 {return m_name;}

◆ print()

void HLTTriggerElement::print ( const std::string &  indent = "",
unsigned int  detail = 1 
) const
overridevirtual

print method

Implements TrigConf::TrigConfData.

Definition at line 51 of file HLTTriggerElement.cxx.

51  {
52  std::cout << indent << *this;
53 }

◆ printNameIdV()

void TrigConfData::printNameIdV ( const std::string &  indent = "") const
inherited

Definition at line 31 of file TrigConfData.cxx.

31  {
32  cout << indent << name();
33  if(id()>0 || version()>0)
34  cout << " (id=" << id() << "/v=" << version() << ")";
35  cout << endl;
36  if(comment()!="")
37  cout << indent << "Comment: " << comment() << endl;
38 }

◆ reset()

void TrigConf::HLTTriggerElement::reset ( )
inline

Definition at line 73 of file HLTTriggerElement.h.

73 { m_level = 0x4; }

◆ set()

void TrigConf::HLTTriggerElement::set ( )
inlineprivate

Definition at line 84 of file HLTTriggerElement.h.

84 { m_level &= 0x3; }

◆ setComment()

void TrigConf::TrigConfData::setComment ( const std::string &  c)
inlineinherited

Definition at line 32 of file TrigConfData.h.

32 { m_comment = c;}

◆ setEF()

void TrigConf::HLTTriggerElement::setEF ( bool  on = true)
inline

Definition at line 72 of file HLTTriggerElement.h.

72 { set(); if(on) m_level |= 0x2; else m_level &= 0x1; }

◆ setHashId()

void TrigConf::HLTTriggerElement::setHashId ( unsigned int  hashid)
inline

Definition at line 64 of file HLTTriggerElement.h.

64 { m_hashId = hashid; }

◆ setId()

void TrigConf::TrigConfData::setId ( unsigned int  id)
inlineinherited

Definition at line 29 of file TrigConfData.h.

29 { m_id=id; }

◆ setL2()

void TrigConf::HLTTriggerElement::setL2 ( bool  on = true)
inline

Definition at line 71 of file HLTTriggerElement.h.

71 { set(); if(on) m_level |= 0x1; else m_level &= 0x2; }

◆ setName()

void TrigConf::TrigConfData::setName ( const std::string &  name)
inlineinherited

Definition at line 30 of file TrigConfData.h.

30 { m_name = name;}

◆ setSMK()

void TrigConf::TrigConfData::setSMK ( int  id)
inlineinherited

Definition at line 28 of file TrigConfData.h.

28 {m_smk=id;}

◆ setSuperMasterTableId()

void TrigConf::TrigConfData::setSuperMasterTableId ( int  id)
inlineinherited

Definition at line 27 of file TrigConfData.h.

27 {m_smk=id;}

◆ setVersion()

void TrigConf::TrigConfData::setVersion ( unsigned int  version)
inlineinherited

Definition at line 31 of file TrigConfData.h.

31 { m_version = version;}

◆ smk()

unsigned int TrigConf::TrigConfData::smk ( ) const
inlineinherited

Definition at line 20 of file TrigConfData.h.

20 {return m_smk;}

◆ superMasterTableId()

int TrigConf::TrigConfData::superMasterTableId ( ) const
inlineinherited

Definition at line 19 of file TrigConfData.h.

19 {return (int)m_smk;}

◆ version()

unsigned int TrigConf::TrigConfData::version ( ) const
inlineinherited

Definition at line 24 of file TrigConfData.h.

24 {return m_version;}

◆ writeXML()

void HLTTriggerElement::writeXML ( std::ofstream &  xmlfile)
virtual

Definition at line 44 of file HLTTriggerElement.cxx.

44  {
45  xmlfile << " <TRIGGERELEMENT te_name=\""
46  << name() << "\"/>" << endl;
47  return;
48 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const TrigConf::HLTTriggerElement  
)
friend

Member Data Documentation

◆ m_comment

std::string TrigConf::TrigConfData::m_comment
privateinherited

Definition at line 48 of file TrigConfData.h.

◆ m_hashId

unsigned int TrigConf::HLTTriggerElement::m_hashId
private

trigger element id

Definition at line 80 of file HLTTriggerElement.h.

◆ m_id

unsigned int TrigConf::TrigConfData::m_id
privateinherited

Definition at line 45 of file TrigConfData.h.

◆ m_level

unsigned int TrigConf::HLTTriggerElement::m_level
private

level where TE is produced for a given configuration (to be determined in light of the menu, this

is not a property of the TE per se.) In rare cases a sequence could be running explicitely in both levels

Definition at line 82 of file HLTTriggerElement.h.

◆ m_name

std::string TrigConf::TrigConfData::m_name
privateinherited

Definition at line 46 of file TrigConfData.h.

◆ m_smk

unsigned int TrigConf::TrigConfData::m_smk
privateinherited

Definition at line 44 of file TrigConfData.h.

◆ m_version

unsigned int TrigConf::TrigConfData::m_version
privateinherited

Definition at line 47 of file TrigConfData.h.


The documentation for this class was generated from the following files:
TrigConf::TrigConfData::m_id
unsigned int m_id
Definition: TrigConfData.h:45
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TrigConf::TrigConfData::m_name
std::string m_name
Definition: TrigConfData.h:46
TrigConf::TrigConfData::TrigConfData
TrigConfData(const std::string &name="")
Definition: TrigConfData.cxx:14
TrigConf::TrigConfData::name
const std::string & name() const
Definition: TrigConfData.h:22
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrigConf::TrigConfData::comment
const std::string & comment() const
Definition: TrigConfData.h:23
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
TrigConf::TrigConfData::m_version
unsigned int m_version
Definition: TrigConfData.h:47
python.XMLReader.xmlfile
xmlfile
Definition: XMLReader.py:72
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TrigConf::HLTUtils::string2hash
static HLTHash string2hash(const std::string &, const std::string &category="TE")
hash function translating TE names into identifiers
TrigConf::TrigConfData::m_comment
std::string m_comment
Definition: TrigConfData.h:48
TrigConf::TrigConfData::version
unsigned int version() const
Definition: TrigConfData.h:24
TrigConf::name
Definition: HLTChainList.h:35
TrigConf::HLTTriggerElement::m_hashId
unsigned int m_hashId
trigger element id
Definition: HLTTriggerElement.h:80
TrigConf::TrigConfData::id
unsigned int id() const
Definition: TrigConfData.h:21
TrigConf::HLTUtils::hash2string
static const std::string hash2string(HLTHash, const std::string &category="TE")
hash function translating identifiers into names (via internal dictionary)
TrigConf::TrigConfData::m_smk
unsigned int m_smk
Definition: TrigConfData.h:44
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
TrigConf::HLTTriggerElement::set
void set()
Definition: HLTTriggerElement.h:84
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
python.compressB64.c
def c
Definition: compressB64.py:93
TrigConf::HLTTriggerElement::m_level
unsigned int m_level
level where TE is produced for a given configuration (to be determined in light of the menu,...
Definition: HLTTriggerElement.h:82