CP3-llbb Framework
AnalyzersManager.h
1 #ifndef ANALYZERS_MANAGER
2 #define ANALYZERS_MANAGER
3 
4 #include "cp3_llbb/Framework/interface/AnalyzerGetter.h"
5 #include "cp3_llbb/Framework/interface/Analyzer.h"
6 
7 #include <string>
8 #include <type_traits>
9 
11  friend class ExTreeMaker;
12 
13  public:
14  template <class T>
15  const T& get(const std::string& name) const {
16  static_assert(std::is_base_of<Framework::Analyzer, T>::value, "T must inherit from Framework::Analyzer");
17  return dynamic_cast<const T&>(m_getter.getAnalyzer(name));
18  }
19 
20  bool exists(const std::string& name) const;
21 
22  private:
23  AnalyzersManager(const AnalyzerGetter& getter);
24  const AnalyzerGetter& m_getter;
25 
26 };
27 
28 #endif
Definition: AnalyzerGetter.h:9
Definition: AnalyzersManager.h:10
Definition: Framework.h:21