ATLAS Offline Software
TrigConfAlg.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 #ifndef TRIGCONF_ALG_H
6 #define TRIGCONF_ALG_H
7 
8 /*
9  @author Rustem Ospanov
10  @date July 2009
11 
12  @brief This class provides map between monitoring
13  object TrigMonAlg and algorithm configuration.
14 */
15 
16 // Framework
17 #include "AthenaKernel/CLASS_DEF.h"
18 
19 // C/C++
20 #include <iostream>
21 #include <stdint.h>
22 #include <string>
23 #include <vector>
24 
25 class TrigConfAlg {
26  public:
27 
28  TrigConfAlg();
30  const uint32_t position,
31  const std::string& name,
32  const std::string& type,
33  const uint32_t name_id,
34  const uint32_t type_id);
36 
37  void clearStrings();
38 
39  const std::string& getName() const { return m_name; }
40  const std::string& getType() const { return m_type; }
41 
42  uint16_t getIndex() const { return m_index; }
43  uint8_t getPosition() const { return m_position; }
44  uint32_t getNameId() const { return m_name_id; }
45  uint32_t getTypeId() const { return m_type_id; }
46 
47  void print(std::ostream &os = std::cout) const;
48 
49  private:
50 
51  uint16_t m_index; // Unique algorithm index in current configuration
52  uint8_t m_position; // Algorithm position within sequence
53  uint32_t m_name_id; // Hash id of name_alg
54  uint32_t m_type_id; // Hash id of type_alg
55 
56  std::string m_name; // Algorithm instance name
57  std::string m_type; // Algorithm base class name
58 };
59 
60 std::string str(const TrigConfAlg &);
61 
62 //
63 // Inline global operators
64 //
65 inline bool operator==(const TrigConfAlg &lhs, const TrigConfAlg &rhs) {
66  return lhs.getName() == rhs.getName();
67 }
68 inline bool operator!=(const TrigConfAlg &lhs, const TrigConfAlg &rhs) {
69  return !(lhs == rhs);
70 }
71 
72 CLASS_DEF( TrigConfAlg , 93121329 , 1 )
73 
74 #endif
TrigConfAlg::getTypeId
uint32_t getTypeId() const
Definition: TrigConfAlg.h:45
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
TrigConfAlg::clearStrings
void clearStrings()
Definition: TrigConfAlg.cxx:47
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
index
Definition: index.py:1
operator==
bool operator==(const TrigConfAlg &lhs, const TrigConfAlg &rhs)
Definition: TrigConfAlg.h:65
operator!=
bool operator!=(const TrigConfAlg &lhs, const TrigConfAlg &rhs)
Definition: TrigConfAlg.h:68
TrigConfAlg::getNameId
uint32_t getNameId() const
Definition: TrigConfAlg.h:44
TrigConfAlg::m_type_id
uint32_t m_type_id
Definition: TrigConfAlg.h:54
TrigConfAlg::m_type
std::string m_type
Definition: TrigConfAlg.h:57
TrigConfAlg::getType
const std::string & getType() const
Definition: TrigConfAlg.h:40
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
TrigConfAlg::m_name_id
uint32_t m_name_id
Definition: TrigConfAlg.h:53
TrigConfAlg
Definition: TrigConfAlg.h:25
str
std::string str(const TrigConfAlg &)
Definition: TrigConfAlg.cxx:63
TrigConfAlg::~TrigConfAlg
~TrigConfAlg()
Definition: TrigConfAlg.h:35
TrigConfAlg::getName
const std::string & getName() const
Definition: TrigConfAlg.h:39
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TrigConfAlg::m_name
std::string m_name
Definition: TrigConfAlg.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TrigConfAlg::getIndex
uint16_t getIndex() const
Definition: TrigConfAlg.h:42
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TrigConfAlg::print
void print(std::ostream &os=std::cout) const
Definition: TrigConfAlg.cxx:57
TrigConfAlg::getPosition
uint8_t getPosition() const
Definition: TrigConfAlg.h:43
TrigConfAlg::TrigConfAlg
TrigConfAlg()
Definition: TrigConfAlg.cxx:14
CLASS_DEF.h
macros to associate a CLID to a type
TrigConfAlg::m_index
uint16_t m_index
Definition: TrigConfAlg.h:51
TrigConfAlg::m_position
uint8_t m_position
Definition: TrigConfAlg.h:52