CMS 3D CMS Logo

List of all members | Public 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
 
const std::vector< std::string > listOfCommonAlgos (const L1TUtmTriggerMenu *other) const
 
const std::vector< std::string > onlyInOther (const L1TUtmTriggerMenu *other) const
 
const std::vector< std::string > onlyInThis (const L1TUtmTriggerMenu *other) const
 
 ~L1UtmTriggerMenuInfo ()=default
 

Private Attributes

l1tUtmAlgoMap m_map
 

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(), and m_map.

21 { m_map = l1utmMenu->getAlgorithmMap(); }
const std::map< std::string, L1TUtmAlgorithm > & getAlgorithmMap() const

◆ ~L1UtmTriggerMenuInfo()

L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::~L1UtmTriggerMenuInfo ( )
default

Member Function Documentation

◆ listOfAlgos()

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

Definition at line 27 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

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

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

◆ listOfCommonAlgos()

const std::vector<std::string> L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::listOfCommonAlgos ( const L1TUtmTriggerMenu other) const
inline

Definition at line 39 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

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

39  {
40  const auto& otherMap = other->getAlgorithmMap();
41 
42  std::vector<std::string> commonKeys;
43 
44  // Lambda function to find common keys and store them in commonKeys vector
45  std::for_each(
46  m_map.begin(), m_map.end(), [&commonKeys, &otherMap](const std::pair<std::string, L1TUtmAlgorithm>& pair) {
47  const std::string& key = pair.first;
48 
49  // Check if the key exists in map2
50  if (otherMap.find(key) != otherMap.end()) {
51  commonKeys.push_back(key);
52  }
53  });
54  return commonKeys;
55  }
key
prepare the HTCondor submission files and eventually submit them

◆ onlyInOther()

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

Definition at line 78 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

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

Referenced by L1TUtmTriggerMenuInspectorHelper::L1TUtmTriggerMenuDisplay::plotDiffWithOtherMenu().

78  {
79  const auto& otherMap = other->getAlgorithmMap();
80 
81  std::vector<std::string> stringsOnlyInSecondMap;
82 
83  // Lambda function capturing 'this' to access the member variable 'm_map'
84  std::for_each(otherMap.begin(),
85  otherMap.end(),
86  [this, &stringsOnlyInSecondMap](const std::pair<std::string, L1TUtmAlgorithm>& pair) {
87  const std::string& key = pair.first;
88 
89  // Check if the key exists in m_map
90  if (this->m_map.find(key) == this->m_map.end()) {
91  stringsOnlyInSecondMap.push_back(key); // Add key to the vector
92  }
93  });
94 
95  return stringsOnlyInSecondMap;
96  }
key
prepare the HTCondor submission files and eventually submit them

◆ onlyInThis()

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

Definition at line 58 of file L1TUtmTriggerMenuPayloadInspectorHelper.h.

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

Referenced by L1TUtmTriggerMenuInspectorHelper::L1TUtmTriggerMenuDisplay::plotDiffWithOtherMenu().

58  {
59  const auto& otherMap = other->getAlgorithmMap();
60 
61  std::vector<std::string> stringsOnlyInFirstMap;
62 
63  // Lambda function to extract only the strings present in m_map but not in otherMap
64  std::for_each(m_map.begin(),
65  m_map.end(),
66  [&stringsOnlyInFirstMap, &otherMap](const std::pair<std::string, L1TUtmAlgorithm>& pair) {
67  const std::string& key = pair.first;
68  // Check if the key exists in otherMap
69  if (otherMap.find(key) == otherMap.end()) {
70  stringsOnlyInFirstMap.push_back(key); // Add key to the vector
71  }
72  });
73 
74  return stringsOnlyInFirstMap;
75  }
key
prepare the HTCondor submission files and eventually submit them

Member Data Documentation

◆ m_map

l1tUtmAlgoMap L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::m_map
private