#include <Menu.h>
|
| | Menu () |
| virtual | ~Menu () override |
| item_by_ctpid_t & | item_by_ctpid () |
| const item_by_ctpid_t & | item_by_ctpid () const |
| item_by_name_t & | item_by_name () |
| const item_by_name_t & | item_by_name () const |
| void | addTriggerItem (TriggerItem *ti) |
| const ItemContainer & | itemVector () const |
| const ItemContainer & | items () const |
| TriggerItem * | findTriggerItem (int ctpid) const |
| TriggerItem * | item (int ctpid) const |
| TriggerItem * | item (const std::string &name) const |
| const std::vector< ThresholdMonitor * > & | moncountVector () const |
| const std::vector< PIT * > & | pitVector () const |
| const std::vector< TIP * > & | tipVector () const |
| const std::map< unsigned int, std::string > & | lutOutputNames () const |
| const ThresholdConfig & | thresholdConfig () const |
| const CaloInfo & | caloInfo () const |
| ThresholdConfig & | thresholdConfig () |
| std::vector< uint16_t > | bunchgroupMask () const |
| void | setCaloInfo (const CaloInfo &ci) |
| const std::vector< TriggerThreshold * > & | thresholdVector () const |
| void | addTriggerThreshold (TriggerThreshold *tt) |
| void | addThresholdMonitor (ThresholdMonitor *thrm) |
| ThresholdMonitor * | findThresholdMonitor (unsigned int id) |
| void | addLutOutputName (unsigned int, const std::string &) |
| void | setLutOutputNames (const std::map< unsigned int, std::string > &lut) |
| void | addPit (PIT *pit) |
| PIT * | findPIT (unsigned int id) |
| void | addTip (TIP *tip) |
| TIP * | findTIP (unsigned int id) |
| int | size () const |
| virtual void | print (const std::string &indent="", unsigned int detail=1) const override |
| void | writeXMLItems (std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const |
| void | writeXMLThresholds (std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const |
| void | writeXMLMonCounters (std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const |
| DiffStruct * | compareTo (const Menu *o) const |
| void | clear () |
| std::vector< TrigConf::TriggerItem * > | itemsV () const |
| unsigned int | lvl1MasterTableId () const |
| void | setLvl1MasterTableId (unsigned int id) |
| 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 |
|
| std::ostream & | indent (std::ostream &o, int lvl, int size) const |
Definition at line 49 of file Menu.h.
◆ Menu()
◆ ~Menu()
| TrigConf::Menu::~Menu |
( |
| ) |
|
|
overridevirtual |
Definition at line 19 of file Menu.cxx.
20{
22 {
23 delete pit;
24 }
26 {
27 delete tip;
28 }
30 {
31 delete thrm;
32 }
34 {
36 }
37}
◆ __str__()
| string TrigConfData::__str__ |
( |
| ) |
const |
|
virtualinherited |
◆ addLutOutputName()
| void TrigConf::Menu::addLutOutputName |
( |
unsigned int | lutCounter, |
|
|
const std::string & | lutCondition ) |
Definition at line 74 of file Menu.cxx.
74 {
76 cerr << "WARNING Menu: insertion of LUT output (counter " << lutCounter << ", name " << lutCounter << ") failed, uniqueness constraint violated." << endl;
77 return;
78 }
79 m_LUT[lutCounter] = lutCondition;
80}
◆ addPit()
| void TrigConf::Menu::addPit |
( |
PIT * | pit | ) |
|
◆ addThresholdMonitor()
◆ addTip()
| void TrigConf::Menu::addTip |
( |
TIP * | tip | ) |
|
◆ addTriggerItem()
| void TrigConf::Menu::addTriggerItem |
( |
TriggerItem * | ti | ) |
|
Definition at line 48 of file Menu.cxx.
48 {
49
50
51
53 if(! ins.second) {
54 cerr <<
"FATAL Menu: insertion of TriggerItem (" << ti->
name() <<
", ctp ID=" << ti->
ctpId() <<
") failed, uniqueness constraint violated." << endl;
55 throw runtime_error("Menu insertion of TriggerItem failed");
56 }
57}
const std::string & name() const
◆ addTriggerThreshold()
◆ bunchgroupMask()
| std::vector< uint16_t > TrigConf::Menu::bunchgroupMask |
( |
| ) |
const |
Definition at line 40 of file Menu.cxx.
40 {
41 std::vector<uint16_t> bgmask(512);
43 bgmask[
item->ctpId()] =
item->bunchgroupMask();
44 return bgmask;
45}
◆ caloInfo()
| const CaloInfo & TrigConf::Menu::caloInfo |
( |
| ) |
const |
|
inline |
◆ clear()
| void TrigConf::Menu::clear |
( |
| ) |
|
Definition at line 160 of file Menu.cxx.
160 {
162
165
168
169 for( PIT* pit :
m_PITs)
delete pit;
171}
◆ comment()
| const std::string & TrigConf::TrigConfData::comment |
( |
| ) |
const |
|
inlineinherited |
◆ compareTo()
Definition at line 134 of file Menu.cxx.
134 {
135 DiffStruct *
ds =
new DiffStruct(
"TriggerMenu");
138 TriggerItem* o_item(o->
item(
item->name()));
139 if(o_item) {
140 ds->addSub(
item->compareTo(o_item) );
141 } else {
142 ds->addLeftOnlySub(
"TriggerItem",
item->name() );
143 }
144 }
145 for(TriggerItem* o_item : o->
items()) {
146 const TriggerItem *
item = this->
item(o_item->name());
148 ds->addRightOnlySub(
"TriggerItem", o_item->name() );
149 }
152 }
154}
◆ findPIT()
Definition at line 107 of file Menu.cxx.
107 {
109 if( pit->id()==id ) return pit;
110 return 0;
111}
◆ findThresholdMonitor()
Definition at line 100 of file Menu.cxx.
100 {
102 if( thrm->id()==id ) return thrm;
103 return 0;
104}
◆ findTIP()
Definition at line 114 of file Menu.cxx.
114 {
116 if( tip->id()==id ) return tip;
117 return 0;
118}
◆ findTriggerItem()
| TriggerItem * TrigConf::Menu::findTriggerItem |
( |
int | ctpid | ) |
const |
|
inline |
Definition at line 64 of file Menu.h.
64{
return item(ctpid); }
◆ id()
| unsigned int TrigConf::TrigConfData::id |
( |
| ) |
const |
|
inlineinherited |
◆ indent()
| std::ostream & TrigConfData::indent |
( |
std::ostream & | o, |
|
|
int | lvl, |
|
|
int | size ) const |
|
protectedinherited |
Definition at line 23 of file TrigConfData.cxx.
23 {
25 if(
width==0)
return o;
26 o << setw(lvl*size) << " ";
27 return o;
28}
◆ item() [1/2]
Definition at line 92 of file Menu.cxx.
92 {
95 if(
item == byname.end())
return 0;
97}
ItemContainer::index< tag_name_hash >::type item_by_name_t
ItemContainer::index< tag_name_hash >::type::iterator item_by_name_iterator
◆ item() [2/2]
Definition at line 84 of file Menu.cxx.
84 {
87 if(
item == byctpid.end())
return 0;
89}
ItemContainer::index< tag_ctpid >::type item_by_ctpid_t
item_by_ctpid_t::iterator item_by_ctpid_iterator
◆ item_by_ctpid() [1/2]
◆ item_by_ctpid() [2/2]
◆ item_by_name() [1/2]
◆ item_by_name() [2/2]
◆ items()
◆ itemsV()
◆ itemVector()
◆ lutOutputNames()
| const std::map< unsigned int, std::string > & TrigConf::Menu::lutOutputNames |
( |
| ) |
const |
|
inline |
◆ lvl1MasterTableId()
| unsigned int TrigConf::L1DataBaseclass::lvl1MasterTableId |
( |
| ) |
const |
|
inlineinherited |
◆ moncountVector()
| const std::vector< ThresholdMonitor * > & TrigConf::Menu::moncountVector |
( |
| ) |
const |
|
inline |
◆ name()
| const std::string & TrigConf::TrigConfData::name |
( |
| ) |
const |
|
inlineinherited |
◆ pitVector()
| const std::vector< PIT * > & TrigConf::Menu::pitVector |
( |
| ) |
const |
|
inline |
◆ print()
| void TrigConf::Menu::print |
( |
const std::string & | indent = "", |
|
|
unsigned int | detail = 1 ) const |
|
overridevirtual |
Implements TrigConf::TrigConfData.
Definition at line 210 of file Menu.cxx.
210 {
211 if(detail>=1) {
218
219 if(detail>=2) {
220
221 cout <<
indent <<
"==================================" << endl;
223 cout <<
indent <<
"==================================" << endl;
226
227 cout <<
indent <<
"==================================" << endl;
228 cout <<
indent <<
"Trigger Thresholds:" << endl;
229 cout <<
indent <<
"==================================" << endl;
231 }
232
233 if(detail>=3) {
234 cout <<
indent <<
"==================================" << endl;
235 cout <<
indent <<
" The ThresholdMonitorVector:" << endl;
236 cout <<
indent <<
"==================================" << endl;
238 sort(sortedMon.begin(),sortedMon.end(),compMonByID);
239 for(ThresholdMonitor* thrm : sortedMon)
240 thrm->print(
indent +
" ", detail);
241 }
242
243 if(detail>=3 &&
m_PITs.size()>0) {
244 cout <<
indent <<
"==================================" << endl;
245 cout <<
indent <<
" PITs:" << endl;
246 cout <<
indent <<
"==================================" << endl;
248 sort(sortedPITs.begin(),sortedPITs.end(),compPIT);
249 for(PIT* pit : sortedPITs)
251 }
252
253 if(detail>=3) {
254 cout <<
indent <<
"==================================" << endl;
255 cout <<
indent <<
" TIPs:" << endl;
256 cout <<
indent <<
"==================================" << endl;
258 sort(sortedTIPs.begin(),sortedTIPs.end(),compTIP);
259 for(TIP* tip : sortedTIPs)
261 }
262
263 if(detail>=4) {
264 cout <<
indent <<
"==================================" << endl;
265 cout <<
indent <<
" TriggerType summary:" << endl;
266 cout <<
indent <<
"==================================" << endl;
267 for (
int i=0;
i<8; ++
i) {
268 cout <<
indent <<
"TriggerType bit " <<
i << endl;
270 if (
item->isTriggerTypeBitOn(i))
271 cout <<
indent <<
" " <<
item->name() << endl;
272 }
273 }
274 if(detail>=4) {
275 cout <<
indent <<
"==================================" << endl;
276 cout <<
indent <<
" BunchGroup mask summary:" << endl;
277 cout <<
indent <<
"==================================" << endl;
280 cout <<
indent <<
" ctpid=" << setw(3) <<
i++ <<
": bgmask=" <<
uint2bin(m, 16) << endl;
281 }
282
283 }
284}
std::ostream & indent(std::ostream &o, int lvl, int size) const
void printNameIdV(const std::string &indent="") const
std::string uint2bin(uint32_t uinteger, uint16_t width)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
◆ printNameIdV()
| void TrigConfData::printNameIdV |
( |
const std::string & | indent = "" | ) |
const |
|
inherited |
Definition at line 31 of file TrigConfData.cxx.
31 {
34 cout <<
" (id=" <<
id() <<
"/v=" <<
version() <<
")";
35 cout << endl;
38}
const std::string & comment() const
unsigned int version() const
◆ setCaloInfo()
| void TrigConf::Menu::setCaloInfo |
( |
const CaloInfo & | ci | ) |
|
|
inline |
◆ setComment()
| void TrigConf::TrigConfData::setComment |
( |
const std::string & | c | ) |
|
|
inlineinherited |
◆ setId()
| void TrigConf::TrigConfData::setId |
( |
unsigned int | id | ) |
|
|
inlineinherited |
◆ setLutOutputNames()
| void TrigConf::Menu::setLutOutputNames |
( |
const std::map< unsigned int, std::string > & | lut | ) |
|
|
inline |
Definition at line 91 of file Menu.h.
constexpr auto lut(Generator &&f)
◆ setLvl1MasterTableId()
| void TrigConf::L1DataBaseclass::setLvl1MasterTableId |
( |
unsigned int | id | ) |
|
|
inlineinherited |
◆ setName()
| void TrigConf::TrigConfData::setName |
( |
const std::string & | name | ) |
|
|
inlineinherited |
◆ setSMK()
| void TrigConf::TrigConfData::setSMK |
( |
int | id | ) |
|
|
inlineinherited |
◆ setSuperMasterTableId()
| void TrigConf::TrigConfData::setSuperMasterTableId |
( |
int | id | ) |
|
|
inlineinherited |
◆ setVersion()
| void TrigConf::TrigConfData::setVersion |
( |
unsigned int | version | ) |
|
|
inlineinherited |
◆ size()
| int TrigConf::Menu::size |
( |
| ) |
const |
|
inline |
◆ smk()
| unsigned int TrigConf::TrigConfData::smk |
( |
| ) |
const |
|
inlineinherited |
◆ superMasterTableId()
| int TrigConf::TrigConfData::superMasterTableId |
( |
| ) |
const |
|
inlineinherited |
◆ thresholdConfig() [1/2]
◆ thresholdConfig() [2/2]
◆ thresholdVector()
◆ tipVector()
| const std::vector< TIP * > & TrigConf::Menu::tipVector |
( |
| ) |
const |
|
inline |
◆ version()
| unsigned int TrigConf::TrigConfData::version |
( |
| ) |
const |
|
inlineinherited |
◆ writeXMLItems()
| void TrigConf::Menu::writeXMLItems |
( |
std::ostream & | xmlfile, |
|
|
int | indentLevel = 0, |
|
|
int | indentWidth = 2 ) const |
Definition at line 288 of file Menu.cxx.
288 {
290 <<
"<TriggerMenu name=\"" <<
name()
291 << "\" phase=\"lumi\">" << endl;
293 item->writeXML(
xmlfile, indentLevel+1, indentWidth);
294 indent(
xmlfile, indentLevel, indentWidth) <<
"</TriggerMenu>" << endl;
295}
static std::vector< std::string > xmlfile
◆ writeXMLMonCounters()
| void TrigConf::Menu::writeXMLMonCounters |
( |
std::ostream & | xmlfile, |
|
|
int | indentLevel = 0, |
|
|
int | indentWidth = 2 ) const |
Definition at line 313 of file Menu.cxx.
313 {
314 indent(
xmlfile, indentLevel, indentWidth) <<
"<TriggerCounterList>" << endl;
315
317 sort(sortedMonitors.begin(),sortedMonitors.end(),compMon);
318
319 for(const ThresholdMonitor * mon: sortedMonitors)
320 mon->writeXML(
xmlfile, indentLevel+1, indentWidth);
321 indent(
xmlfile, indentLevel, indentWidth) <<
"</TriggerCounterList>" << endl;
322}
◆ writeXMLThresholds()
| void TrigConf::Menu::writeXMLThresholds |
( |
std::ostream & | xmlfile, |
|
|
int | indentLevel = 0, |
|
|
int | indentWidth = 2 ) const |
Definition at line 299 of file Menu.cxx.
299 {
300 indent(
xmlfile, indentLevel, indentWidth) <<
"<TriggerThresholdList>" << endl;
301
303 sort(sortedThresholds.begin(),sortedThresholds.end(),compThr);
304
305 for(TriggerThreshold* thr: sortedThresholds) {
306 if(!
thr->isInternal())
307 thr->writeXML(
xmlfile, indentLevel+1, indentWidth);
308 }
309 indent(
xmlfile, indentLevel, indentWidth) <<
"</TriggerThresholdList>" << endl;
310}
◆ m_comment
| std::string TrigConf::TrigConfData::m_comment |
|
privateinherited |
◆ m_id
| unsigned int TrigConf::TrigConfData::m_id |
|
privateinherited |
◆ m_LUT
| std::map<unsigned int, std::string> TrigConf::Menu::m_LUT |
|
private |
◆ m_Lvl1MasterId
| unsigned int TrigConf::L1DataBaseclass::m_Lvl1MasterId |
|
privateinherited |
◆ m_name
| std::string TrigConf::TrigConfData::m_name |
|
privateinherited |
◆ m_PITs
| std::vector<PIT*> TrigConf::Menu::m_PITs |
|
private |
◆ m_smk
| unsigned int TrigConf::TrigConfData::m_smk |
|
privateinherited |
◆ m_ThresholdConfig
◆ m_ThresholdMonitorVector
◆ m_TIPs
| std::vector<TIP*> TrigConf::Menu::m_TIPs |
|
private |
◆ m_TriggerItemVector
◆ m_version
| unsigned int TrigConf::TrigConfData::m_version |
|
privateinherited |
The documentation for this class was generated from the following files: