ATLAS Offline Software
ItemMap.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef TRIGT1CTP_ITEMMAP_H
7 #define TRIGT1CTP_ITEMMAP_H
8 
9 // local include(s):
10 #include "./SpecialTrigger.h"
11 
12 // STL include(s):
13 #include <set>
14 #include <map>
15 
16 #include "TrigConfData/L1Menu.h"
17 
18 #include "TrigConfL1Data/Menu.h"
19 #include "./CTPTriggerItem.h"
20 
21 
22 
23 // Forward include(s):
24 namespace TrigConf {
25  class PrescaleSet;
26 }
27 
28 namespace LVL1CTP {
29 
30  // forward includes in namespace LVL1CTP
31  class ThresholdMap;
32 
37  class ItemMap {
38 
39  public:
40 
41  ItemMap( const TrigConf::L1Menu * l1menu );
42 
44  ItemMap( const TrigConf::ItemContainer& item_vector,
46 
48  ~ItemMap();
49 
50  const CTPTriggerItem* getItem( const std::string & itemName ) const
51  { return m_map.find( itemName )->second; }
52 
53  const std::set<std::string> & itemNames() const
54  { return m_itemNames; }
55 
56 
57  private:
58 
59  // turns item definition "1&2&3" into "EM[x2]&BGRP0&BGRP1", which is needed when item configuration is read from COOL
60  std::string getDefinition( const TrigConf::TriggerItem * item ) const;
61 
63  std::map< std::string, const CTPTriggerItem* > m_map;
64 
65  std::set<std::string> m_itemNames{};
66 
67  };
68 
69 }
70 #endif
LVL1CTP::ItemMap
Map associating item name to CTPTriggerItem objects.
Definition: ItemMap.h:37
LVL1CTP::CTPTriggerItem
Class storing information helping to make the CTP decision.
Definition: CTPTriggerItem.h:23
LVL1CTP::ItemMap::m_itemNames
std::set< std::string > m_itemNames
Definition: ItemMap.h:65
SpecialTrigger.h
TrigConf::PrescaleSet
Definition: PrescaleSet.h:22
LVL1CTP::ItemMap::~ItemMap
~ItemMap()
default destructor
Definition: ItemMap.cxx:44
Menu.h
CTPTriggerItem.h
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
RatesAnalysisFullMenu.prescales
prescales
Definition: RatesAnalysisFullMenu.py:119
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
LVL1CTP::ItemMap::itemNames
const std::set< std::string > & itemNames() const
Definition: ItemMap.h:53
LVL1CTP::ItemMap::m_map
std::map< std::string, const CTPTriggerItem * > m_map
map from item name to CTPTriggerItem
Definition: ItemMap.h:63
item
Definition: ItemListSvc.h:43
TrigConf::ItemContainer
boost::multi_index::multi_index_container< TriggerItem *, boost::multi_index::indexed_by< boost::multi_index::random_access<>, boost::multi_index::ordered_unique< boost::multi_index::identity< TriggerItem > >, boost::multi_index::ordered_unique< boost::multi_index::tag< tag_ctpid >, boost::multi_index::const_mem_fun< TriggerItem, int, &TriggerItem::ctpId > >, boost::multi_index::hashed_unique< boost::multi_index::tag< tag_name_hash >, boost::multi_index::const_mem_fun< TrigConfData, const std::string &, &TrigConfData::name > > > > ItemContainer
Definition: Menu.h:39
LVL1CTP::ItemMap::ItemMap
ItemMap(const TrigConf::L1Menu *l1menu)
Definition: ItemMap.cxx:21
LVL1CTP::ItemMap::getItem
const CTPTriggerItem * getItem(const std::string &itemName) const
Definition: ItemMap.h:50
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73
LVL1CTP
Definition: Lvl1ResultAccessTool.h:20
L1Menu.h
LVL1CTP::ItemMap::getDefinition
std::string getDefinition(const TrigConf::TriggerItem *item) const
Definition: ItemMap.cxx:85
TrigConf::TriggerItem
Definition: TriggerItem.h:25