CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo Class Reference

#include <L1TUtmTriggerMenuPayloadInspectorHelper.h>

Public Member Functions

 L1UtmTriggerMenuInfo (const L1TUtmTriggerMenu *l1utmMenu)
 
const std::vector< std::string > listOfAlgos () const
 
template<typename T >
const std::vector< std::string > listOfCommonKeys (const L1TUtmTriggerMenu *other) const
 
const std::vector< std::string > listOfConditions () const
 
template<typename T >
const std::vector< std::string > onlyInOther (const L1TUtmTriggerMenu *other) const
 
template<typename T >
const std::vector< std::string > onlyInThis (const L1TUtmTriggerMenu *other) const
 
 ~L1UtmTriggerMenuInfo ()=default
 

Private Member Functions

template<typename T >
decltype(auto) getOtherMap (const L1TUtmTriggerMenu *other) const
 
template<typename T >
decltype(auto) getThisMap () const
 

Private Attributes

l1tUtmAlgoMap m_algoMap
 
l1tUtmConditionMap m_condMap
 

Detailed Description

Definition at line 18 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ L1UtmTriggerMenuInfo()

L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::L1UtmTriggerMenuInfo ( const L1TUtmTriggerMenu l1utmMenu)
inline

Definition at line 21 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

References L1TUtmTriggerMenu::getAlgorithmMap(), L1TUtmTriggerMenu::getConditionMap(), m_algoMap, and m_condMap.

21  {
22  m_algoMap = l1utmMenu->getAlgorithmMap();
23  m_condMap = l1utmMenu->getConditionMap();
24  }
const std::map< std::string, L1TUtmCondition > & getConditionMap() const
const std::map< std::string, L1TUtmAlgorithm > & getAlgorithmMap() const

◆ ~L1UtmTriggerMenuInfo()

L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::~L1UtmTriggerMenuInfo ( )
default

Member Function Documentation

◆ getOtherMap()

template<typename T >
decltype(auto) L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::getOtherMap ( const L1TUtmTriggerMenu other) const
inlineprivate

Definition at line 123 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), trackingPlots::other, and relativeConstraints::value.

123  {
125  return other->getConditionMap();
126  } else {
127  return other->getAlgorithmMap();
128  }
129  }

◆ getThisMap()

template<typename T >
decltype(auto) L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::getThisMap ( ) const
inlineprivate

◆ listOfAlgos()

const std::vector<std::string> L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::listOfAlgos ( ) const
inline

Definition at line 31 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

References m_algoMap, convertSQLitetoXML_cfg::output, and HcalDetIdTransform::transform().

31  {
32  std::vector<std::string> output;
33  std::transform(m_algoMap.begin(),
34  m_algoMap.end(),
35  std::back_inserter(output),
36  [](const std::pair<std::string, L1TUtmAlgorithm>& pair) {
37  return pair.first; // Extracting the string key using lambda
38  });
39  return output;
40  }
Definition: output.py:1
unsigned transform(const HcalDetId &id, unsigned transformCode)

◆ listOfCommonKeys()

template<typename T >
const std::vector<std::string> L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::listOfCommonKeys ( const L1TUtmTriggerMenu other) const
inline

Definition at line 56 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

References submitPVResolutionJobs::key, trackingPlots::other, and AlCaHLTBitMon_QueryRunRegistry::string.

56  {
57  const auto& otherMap = getOtherMap<T>(other);
58  const auto& thisMap = getThisMap<T>();
59 
60  std::vector<std::string> commonKeys;
61 
62  // Lambda function to find common keys and store them in commonKeys vector
63  std::for_each(thisMap.begin(), thisMap.end(), [&commonKeys, &otherMap](const std::pair<std::string, T>& pair) {
64  const std::string& key = pair.first;
65 
66  // Check if the key exists in map2
67  if (otherMap.find(key) != otherMap.end()) {
68  commonKeys.push_back(key);
69  }
70  });
71  return commonKeys;
72  }
key
prepare the HTCondor submission files and eventually submit them

◆ listOfConditions()

const std::vector<std::string> L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::listOfConditions ( ) const
inline

Definition at line 43 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

References m_condMap, convertSQLitetoXML_cfg::output, and HcalDetIdTransform::transform().

43  {
44  std::vector<std::string> output;
45  std::transform(m_condMap.begin(),
46  m_condMap.end(),
47  std::back_inserter(output),
48  [](const std::pair<std::string, L1TUtmCondition>& pair) {
49  return pair.first; // Extracting the string key using lambda
50  });
51  return output;
52  }
Definition: output.py:1
unsigned transform(const HcalDetId &id, unsigned transformCode)

◆ onlyInOther()

template<typename T >
const std::vector<std::string> L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::onlyInOther ( const L1TUtmTriggerMenu other) const
inline

Definition at line 97 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

References submitPVResolutionJobs::key, trackingPlots::other, and AlCaHLTBitMon_QueryRunRegistry::string.

97  {
98  const auto& otherMap = getOtherMap<T>(other);
99  const auto& thisMap = getThisMap<T>();
100 
101  std::vector<std::string> stringsOnlyInSecondMap;
102 
103  // Lambda function capturing 'this' to access the member variable 'thisMap'
104  std::for_each(
105  otherMap.begin(), otherMap.end(), [thisMap, &stringsOnlyInSecondMap](const std::pair<std::string, T>& pair) {
106  const std::string& key = pair.first;
107 
108  // Check if the key exists in thisMap
109  if (thisMap.find(key) == thisMap.end()) {
110  stringsOnlyInSecondMap.push_back(key); // Add key to the vector
111  }
112  });
113 
114  return stringsOnlyInSecondMap;
115  }
key
prepare the HTCondor submission files and eventually submit them

◆ onlyInThis()

template<typename T >
const std::vector<std::string> L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::onlyInThis ( const L1TUtmTriggerMenu other) const
inline

Definition at line 76 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

References submitPVResolutionJobs::key, trackingPlots::other, and AlCaHLTBitMon_QueryRunRegistry::string.

76  {
77  const auto& otherMap = getOtherMap<T>(other);
78  const auto& thisMap = getThisMap<T>();
79 
80  std::vector<std::string> stringsOnlyInFirstMap;
81 
82  // Lambda function to extract only the strings present in thisMap but not in otherMap
83  std::for_each(
84  thisMap.begin(), thisMap.end(), [&stringsOnlyInFirstMap, &otherMap](const std::pair<std::string, T>& pair) {
85  const std::string& key = pair.first;
86  // Check if the key exists in otherMap
87  if (otherMap.find(key) == otherMap.end()) {
88  stringsOnlyInFirstMap.push_back(key); // Add key to the vector
89  }
90  });
91 
92  return stringsOnlyInFirstMap;
93  }
key
prepare the HTCondor submission files and eventually submit them

Member Data Documentation

◆ m_algoMap

l1tUtmAlgoMap L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::m_algoMap
private

◆ m_condMap

l1tUtmConditionMap L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::m_condMap
private