ATLAS Offline Software
getFeatureOccurrences.cxx
Go to the documentation of this file.
1 
13 #include "getLabel.h"
14 
15 
16 namespace HLT {
17 namespace TrigNavTools {
18 
19 
21 std::map<std::string, int>
23 {
24  std::map<std::string, int> featureOccurrences;
25 
26  if (navigation && navigation->getInitialNode()) {
27 
28  for ( auto te : navigation->getAllTEs() ) {
29  for ( const auto& fea: te->getFeatureAccessHelpers() ) {
30  featureOccurrences[SlimmingHelper::getLabel(*navigation, fea)] += 1;
31  }
32  }
33  }
34 
35  return featureOccurrences;
36 }
37 
38 
39 }} // namespace HLT::TrigNavTools
HLT::TrigNavTools::getFeatureOccurrences
std::map< std::string, int > getFeatureOccurrences(const HLT::NavigationCore *navigation)
Return number of occurrences of each feature.
Definition: getFeatureOccurrences.cxx:22
HLT::TrigNavTools::SlimmingHelper::getLabel
static std::string getLabel(const HLT::NavigationCore &navigation, const HLT::TriggerElement::FeatureAccessHelper &fah)
Definition: getLabel.cxx:23
HLT::TrigNavStructure::getInitialNode
TriggerElement * getInitialNode()
gets initial node, if node is not there then it is created on fly
Definition: TrigNavStructure.cxx:39
HLT::NavigationCore
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
Definition: NavigationCore.h:96
getFeatureOccurrences.h
Return number of occurrences of each feature.
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
Navigation.h
getLabel.h
Helper function to get a label for a feature.
HLT::TrigNavStructure::getAllTEs
std::vector< TriggerElement * > & getAllTEs()
access needed by slimming tools.
Definition: TrigNavStructure.cxx:376