ATLAS Offline Software
HLTSequenceList.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigConf_HLTSequenceList
6 #define TrigConf_HLTSequenceList
7 
8 #include <iosfwd>
9 #include <string>
10 #include <vector>
11 #include <map>
12 
14 
15 #include <boost/multi_index_container.hpp>
16 #include <boost/multi_index/mem_fun.hpp>
17 #include <boost/multi_index/hashed_index.hpp>
18 #include <boost/multi_index/ordered_index.hpp>
19 
20 namespace TrigConf {
21 
22  class HLTSequenceList;
23  class DiffStruct;
24  class HLTSequence;
25 
26  std::ostream & operator<<(std::ostream &, const HLTSequenceList &);
27 
28  struct seq_name_hash{};
29  struct seq_hash_id{};
30 
31  typedef boost::multi_index::multi_index_container<HLTSequence*, boost::multi_index::indexed_by<
32  boost::multi_index::ordered_unique< boost::multi_index::identity<HLTSequence> >,
33  boost::multi_index::ordered_unique< boost::multi_index::tag<seq_hash_id>, boost::multi_index::const_mem_fun<HLTSequence, unsigned int, &HLTSequence::hashId> >,
34  boost::multi_index::hashed_unique< boost::multi_index::tag<seq_name_hash>, boost::multi_index::const_mem_fun<TrigConfData, const std::string&, &TrigConfData::name> >
35  >
37 
38 
41  public:
42 
45 
50  HLTSequenceList( std::vector<HLTSequence*>& HLTSequenceList );
51 
54 
59  void addHLTSequence( HLTSequence * sequence);
60 
61  void clear();
62 
63 // std::vector<HLTSequence*>& sequences() { return m_HLTSequenceList; } ///< accessor to the list of sequences
64 // const std::vector<HLTSequence*>& sequences() const { return m_HLTSequenceList; } ///< const accessor to the list of sequences
65 
67  void print(const std::string& indent="", unsigned int detail=1) const;
68 
69  bool hasTE(const std::string& name);
70 
75  HLTSequence* getSequence(unsigned int id) const;
76  HLTSequence* getSequence(const std::string& tename) const;
77 
84  bool getLabel(unsigned int hashId, std::string & label);
85 
92  bool getHashIdFromLabel(const char * label, unsigned int & hashId);
93 
94  DiffStruct* compareTo(const HLTSequenceList* o) const;
95 
96  private:
97 
98  friend std::ostream & operator<<(std::ostream &, const HLTSequenceList &);
99  };
100 
101 }
102 
103 #endif
104 
TrigConf::HLTSequenceList::addHLTSequence
void addHLTSequence(HLTSequence *sequence)
adds an HLTSequence to the menu
Definition: HLTSequenceList.cxx:30
TrigConf::HLTSequenceList::hasTE
bool hasTE(const std::string &name)
Definition: HLTSequenceList.cxx:39
TrigConf::operator<<
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
Definition: L1ThresholdBase.cxx:339
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
TrigConf::HLTSequenceList::getSequence
HLTSequence * getSequence(unsigned int id) const
counts the number of sequences in the menu
Definition: HLTSequenceList.cxx:45
TrigConf::DiffStruct
Definition: DiffStruct.h:14
TrigConf::HLTSequenceList::getHashIdFromLabel
bool getHashIdFromLabel(const char *label, unsigned int &hashId)
find ID from name in the map m_IdToLabel
Definition: HLTSequenceList.cxx:76
detail
Definition: extract_histogram_tag.cxx:14
TrigConf::seq_name_hash
Definition: HLTSequenceList.h:28
TrigConf::HLTSequenceList::print
void print(const std::string &indent="", unsigned int detail=1) const
print the sequence list
Definition: HLTSequenceList.cxx:112
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:18
TrigConf::HLTSequenceList::clear
void clear()
Definition: HLTSequenceList.cxx:25
TrigConf::HLTSequenceList::~HLTSequenceList
~HLTSequenceList()
destructor
Definition: HLTSequenceList.cxx:21
TrigConf::name
Definition: HLTChainList.h:35
TrigConf::HLTSequenceList::HLTSequenceList
HLTSequenceList()
default constructor
Definition: HLTSequenceList.cxx:15
TrigConf::HLTSequenceList::getLabel
bool getLabel(unsigned int hashId, std::string &label)
find name from ID in the map m_IdToLabel
Definition: HLTSequenceList.cxx:62
TrigConf::HLTSequenceContainer
boost::multi_index::multi_index_container< HLTSequence *, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::identity< HLTSequence > >, boost::multi_index::ordered_unique< boost::multi_index::tag< seq_hash_id >, boost::multi_index::const_mem_fun< HLTSequence, unsigned int, &HLTSequence::hashId > >, boost::multi_index::hashed_unique< boost::multi_index::tag< seq_name_hash >, boost::multi_index::const_mem_fun< TrigConfData, const std::string &, &TrigConfData::name > > > > HLTSequenceContainer
Definition: HLTSequenceList.h:36
HLTSequence.h
TrigConf::seq_hash_id
Definition: HLTSequenceList.h:29
TrigConf::HLTSequenceList::compareTo
DiffStruct * compareTo(const HLTSequenceList *o) const
Definition: HLTSequenceList.cxx:89
TrigConf::HLTSequenceList::operator<<
friend std::ostream & operator<<(std::ostream &, const HLTSequenceList &)
TrigConf::HLTSequence
HLT sequence configuration information.
Definition: HLTSequence.h:28
TrigConf::HLTSequenceList
list of HLT sequences
Definition: HLTSequenceList.h:40