ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::HLTFrame Class Reference

The HLT trigger menu,. More...

#include <HLTFrame.h>

Inheritance diagram for TrigConf::HLTFrame:
Collaboration diagram for TrigConf::HLTFrame:

Public Member Functions

 HLTFrame ()
 default constructor
virtual ~HLTFrame () override=default
 destructor
void clear ()
 clear chains, sequences and prescales
HLTChainListtheHLTChainList ()
 accessor to the list of HLT chains
HLTSequenceListtheHLTSequenceList ()
 accessor to the list of HLT sequences
HLTPrescaleSetCollectionthePrescaleSetCollection ()
HLTPrescaleSetthePrescaleSet (unsigned int lbn=0)
const HLTChainListgetHLTChainList () const
 const accessor to the list of HLT chains
const HLTSequenceListgetHLTSequenceList () const
 const accessor to the list of HLT sequences
const HLTPrescaleSetCollectiongetPrescaleSetCollection () const
const HLTPrescaleSetgetPrescaleSet (unsigned int lbn) const
bool mergedHLT () const
const std::string & configSource () const
void setMergedHLT (bool merged=true)
 pass the HLT merged status
void setConfigSource (const std::string &src)
void print (const std::string &indent="", unsigned int detail=1) const override
 print method
void writeXML (const std::string &filename) const
void writeXML (std::ofstream &xmlfile) const
bool equals (const HLTFrame *other, const std::string &filename) const
DiffStructcompareTo (const HLTFrame *o) const
int superMasterTableId () const
unsigned int smk () const
unsigned int id () 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

Protected Member Functions

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

Private Attributes

HLTChainList m_HLTChainList
 list of HLT trigger chains (owned)
HLTSequenceList m_HLTSequenceList
 list of HLT trigger sequences (owned)
HLTPrescaleSetCollection m_hltPrescaleSets
 the hlt prescale set (owned)
bool m_setMergedHLT {false}
std::string m_ConfigSrc {""}
std::map< std::string, unsigned int > m_str2idMap
 TE labels <-> id conversion map.
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::HLTFrame &)

Detailed Description

The HLT trigger menu,.

owns HLTChainList, HLTSequenceList, and PrescaleSet

Definition at line 33 of file HLTFrame.h.

Constructor & Destructor Documentation

◆ HLTFrame()

HLTFrame::HLTFrame ( )

default constructor

Definition at line 26 of file HLTFrame.cxx.

26 :
28{}
TrigConfData(const std::string &name="")

◆ ~HLTFrame()

virtual TrigConf::HLTFrame::~HLTFrame ( )
overridevirtualdefault

destructor

Member Function Documentation

◆ __str__()

string TrigConfData::__str__ ( ) const
virtualinherited

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

Definition at line 50 of file TrigConfData.cxx.

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

◆ clear()

void HLTFrame::clear ( )

clear chains, sequences and prescales

Definition at line 32 of file HLTFrame.cxx.

32 {
33 m_HLTChainList.clear();
34 m_HLTSequenceList.clear();
35 m_hltPrescaleSets.clear();
36
37 setId(0);
38 setName("");
39 setVersion(0);
40}
HLTPrescaleSetCollection m_hltPrescaleSets
the hlt prescale set (owned)
Definition HLTFrame.h:75
HLTSequenceList m_HLTSequenceList
list of HLT trigger sequences (owned)
Definition HLTFrame.h:74
HLTChainList m_HLTChainList
list of HLT trigger chains (owned)
Definition HLTFrame.h:73
void setId(unsigned int id)
void setName(const std::string &name)
void setVersion(unsigned int version)

◆ comment()

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

Definition at line 23 of file TrigConfData.h.

23{return m_comment;}

◆ compareTo()

TrigConf::DiffStruct * HLTFrame::compareTo ( const HLTFrame * o) const

Definition at line 61 of file HLTFrame.cxx.

61 {
62 DiffStruct * ds = new DiffStruct("HLT_MENU");
63 ds->name = name();
64 ds->check("menu_name", name(), o->name());
65 std::string pss_name(""), o_pss_name("");
66
67 const auto& pssc = getPrescaleSetCollection();
68 const auto& o_pssc = o->getPrescaleSetCollection();
69 if(pssc.size()==1)
70 pss_name= pssc.sets().front().pss->name();
71 if(o_pssc.size()==1)
72 o_pss_name= o_pssc.sets().front().pss->name();
73 ds->check("prescale_set_name", pss_name, o_pss_name);
74
76 ds->addSub( getHLTChainList().compareTo( & o->getHLTChainList()) );
77
78 if(ds->empty()) {
79 delete ds; ds=0;
80 }
81 return ds;
82}
DiffStruct * compareTo(const HLTFrame *o) const
Definition HLTFrame.cxx:61
const HLTSequenceList & getHLTSequenceList() const
const accessor to the list of HLT sequences
Definition HLTFrame.h:50
const HLTPrescaleSetCollection & getPrescaleSetCollection() const
Definition HLTFrame.h:51
const HLTChainList & getHLTChainList() const
const accessor to the list of HLT chains
Definition HLTFrame.h:49
const std::string & name() const

◆ configSource()

const std::string & TrigConf::HLTFrame::configSource ( ) const
inline

Definition at line 54 of file HLTFrame.h.

54{ return m_ConfigSrc; }
std::string m_ConfigSrc
Definition HLTFrame.h:77

◆ equals()

bool HLTFrame::equals ( const HLTFrame * other,
const std::string & filename ) const

Definition at line 43 of file HLTFrame.cxx.

43 {
44 bool equals = true;
45 DiffStruct* ds = compareTo(other);
46 if(ds) {
47 equals = false;
48 std::ofstream xmlfile;
49 xmlfile.open(filename.c_str());
50 // file will be empty if there are no differences
51 xmlfile << "<?xml version=\"1.0\" ?>" << std::endl;
52 ds->writeXML(xmlfile);
53 xmlfile.close();
54 delete ds;
55 }
56 return equals;
57}
bool equals(const HLTFrame *other, const std::string &filename) const
Definition HLTFrame.cxx:43
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29

◆ getHLTChainList()

const HLTChainList & TrigConf::HLTFrame::getHLTChainList ( ) const
inline

const accessor to the list of HLT chains

Definition at line 49 of file HLTFrame.h.

◆ getHLTSequenceList()

const HLTSequenceList & TrigConf::HLTFrame::getHLTSequenceList ( ) const
inline

const accessor to the list of HLT sequences

Definition at line 50 of file HLTFrame.h.

◆ getPrescaleSet()

const HLTPrescaleSet * TrigConf::HLTFrame::getPrescaleSet ( unsigned int lbn) const
inline

Definition at line 52 of file HLTFrame.h.

52{ return m_hltPrescaleSets.prescaleSet(lbn); }

◆ getPrescaleSetCollection()

const HLTPrescaleSetCollection & TrigConf::HLTFrame::getPrescaleSetCollection ( ) const
inline

Definition at line 51 of file HLTFrame.h.

51{ return m_hltPrescaleSets; }

◆ id()

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

Definition at line 21 of file TrigConfData.h.

21{return m_id;}

◆ 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}
const double width

◆ mergedHLT()

bool TrigConf::HLTFrame::mergedHLT ( ) const
inline

Definition at line 53 of file HLTFrame.h.

53{ return m_setMergedHLT; }

◆ name()

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

Definition at line 22 of file TrigConfData.h.

22{return m_name;}

◆ print()

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

print method

Implements TrigConf::TrigConfData.

Definition at line 86 of file HLTFrame.cxx.

86 {
87 if(detail>=1) {
88 cout << indent << "================================================================================" << endl;
89 cout << indent << "HLT Configuration";
90 if(smk()>0) cout << " (SMK = " << smk() << ")";
91 cout << ": "; printNameIdV(indent);
92 getHLTChainList().print(indent, detail);
95 cout << indent << "================================================================================" << endl;
96 }
97}
void print(const std::string &indent="", unsigned int detail=1) const
accessors to list of chains, for backward compatibility, use HLTChainList directly
void print(const std::string &indent="", unsigned int detail=1) const
Print the prescale set.
void print(const std::string &indent="", unsigned int detail=1) const
print the sequence list
std::ostream & indent(std::ostream &o, int lvl, int size) const
void printNameIdV(const std::string &indent="") const
unsigned int smk() const

◆ 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}
unsigned int id() const
const std::string & comment() const
unsigned int version() const

◆ setComment()

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

Definition at line 32 of file TrigConfData.h.

◆ setConfigSource()

void TrigConf::HLTFrame::setConfigSource ( const std::string & src)
inline

Definition at line 59 of file HLTFrame.h.

◆ setId()

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

Definition at line 29 of file TrigConfData.h.

29{ m_id=id; }

◆ setMergedHLT()

void TrigConf::HLTFrame::setMergedHLT ( bool merged = true)
inline

pass the HLT merged status

Definition at line 58 of file HLTFrame.h.

58{ m_setMergedHLT = merged; }

◆ 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.

◆ 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;}

◆ theHLTChainList()

HLTChainList & TrigConf::HLTFrame::theHLTChainList ( )
inline

accessor to the list of HLT chains

Definition at line 44 of file HLTFrame.h.

◆ theHLTSequenceList()

HLTSequenceList & TrigConf::HLTFrame::theHLTSequenceList ( )
inline

accessor to the list of HLT sequences

Definition at line 45 of file HLTFrame.h.

◆ thePrescaleSet()

HLTPrescaleSet * TrigConf::HLTFrame::thePrescaleSet ( unsigned int lbn = 0)
inline

Definition at line 47 of file HLTFrame.h.

47{ return m_hltPrescaleSets.thePrescaleSet(lbn); }

◆ thePrescaleSetCollection()

HLTPrescaleSetCollection & TrigConf::HLTFrame::thePrescaleSetCollection ( )
inline

Definition at line 46 of file HLTFrame.h.

46{ return m_hltPrescaleSets; }

◆ version()

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

Definition at line 24 of file TrigConfData.h.

24{return m_version;}

◆ writeXML() [1/2]

void HLTFrame::writeXML ( const std::string & filename) const

Definition at line 100 of file HLTFrame.cxx.

100 {
101 std::ofstream xmlfile;
102 xmlfile.open(filename.c_str());
103 xmlfile << "<?xml version=\"1.0\" ?>" << std::endl;
105 xmlfile.close();
106}
void writeXML(const std::string &filename) const
Definition HLTFrame.cxx:100

◆ writeXML() [2/2]

void HLTFrame::writeXML ( std::ofstream & xmlfile) const

Definition at line 110 of file HLTFrame.cxx.

110 {
111
112 string pss_name("");
113 if(m_hltPrescaleSets.size()>1) {
114 pss_name = "multiple";
115 } else if(m_hltPrescaleSets.size()==0) {
116 pss_name = "none";
117 } else if(m_hltPrescaleSets.prescaleSet(0)==0) {
118 pss_name = "not loaded";
119 } else {
120 pss_name = m_hltPrescaleSets.prescaleSet(0)->name();
121 }
122
123 xmlfile << "<HLT_MENU menu_name=\"" << name() << "\" prescale_set_name=\"" << pss_name << "\">" << endl
124 << " <SEQUENCE_LIST>" << endl;
125
126 for(HLTSequence *seq: getHLTSequenceList())
127 seq->writeXML(xmlfile);
128
129 xmlfile << " </SEQUENCE_LIST>" << endl
130 << " <CHAIN_LIST>" << endl;
131
132 for(HLTChain *ch: getHLTChainList())
133 ch->writeXML(xmlfile);
134
135 xmlfile << " </CHAIN_LIST>" << endl
136 << "</HLT_MENU>" << endl;
137}
seq
filter configuration ## -> we use the special sequence 'AthMasterSeq' which is run before any other a...

◆ operator<<

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

Member Data Documentation

◆ m_comment

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

Definition at line 48 of file TrigConfData.h.

◆ m_ConfigSrc

std::string TrigConf::HLTFrame::m_ConfigSrc {""}
private

Definition at line 77 of file HLTFrame.h.

77{""};

◆ m_HLTChainList

HLTChainList TrigConf::HLTFrame::m_HLTChainList
private

list of HLT trigger chains (owned)

Definition at line 73 of file HLTFrame.h.

◆ m_hltPrescaleSets

HLTPrescaleSetCollection TrigConf::HLTFrame::m_hltPrescaleSets
private

the hlt prescale set (owned)

Definition at line 75 of file HLTFrame.h.

◆ m_HLTSequenceList

HLTSequenceList TrigConf::HLTFrame::m_HLTSequenceList
private

list of HLT trigger sequences (owned)

Definition at line 74 of file HLTFrame.h.

◆ m_id

unsigned int TrigConf::TrigConfData::m_id
privateinherited

Definition at line 45 of file TrigConfData.h.

◆ m_name

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

Definition at line 46 of file TrigConfData.h.

◆ m_setMergedHLT

bool TrigConf::HLTFrame::m_setMergedHLT {false}
private

Definition at line 76 of file HLTFrame.h.

76{false};

◆ m_smk

unsigned int TrigConf::TrigConfData::m_smk
privateinherited

Definition at line 44 of file TrigConfData.h.

◆ m_str2idMap

std::map<std::string, unsigned int> TrigConf::HLTFrame::m_str2idMap
private

TE labels <-> id conversion map.

Definition at line 80 of file HLTFrame.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: