ATLAS Offline Software
TriggerElementFactory.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TRIGNAVSTRUCTURE_TRIGGERELEMENTFACTORY_H
8 #define TRIGNAVSTRUCTURE_TRIGGERELEMENTFACTORY_H
9 
10 #include <vector>
11 #include "TrigNavStructure/Types.h"
13 
14 namespace HLT {
29  public:
32  TriggerElement* produce(unsigned int id, bool ghost=false, bool nofwd=false);
33  void reset();
34  bool empty() const;
35 
36  const std::vector< TriggerElement* >& listOfProduced() const { return m_list; }
37  std::vector< TriggerElement* >& listOfProduced() { return m_list; }
38  const std::vector< TriggerElement* >& listOfProduced(unsigned int id) const {
39  auto found = m_groupedById.find(id);
40  return (found!=m_groupedById.end()) ? found->second : m_notfound;
41  }
42  std::vector< TriggerElement* >& listOfProduced(unsigned int id) {
43  auto found = m_groupedById.find(id);
44  return (found!=m_groupedById.end()) ? found->second : m_notfound;
45  }
46 
47  private:
48  std::vector< TriggerElement* > m_list;
49  std::map<te_id_type, std::vector<TriggerElement*> > m_groupedById;
50  std::vector< TriggerElement* > m_notfound;
51  };
52 } // eof namespace HLT
53 #endif //
HLT::TriggerElementFactory::listOfProduced
std::vector< TriggerElement * > & listOfProduced()
Definition: TriggerElementFactory.h:37
HLT::TriggerElementFactory::m_groupedById
std::map< te_id_type, std::vector< TriggerElement * > > m_groupedById
this is to speed up queries
Definition: TriggerElementFactory.h:49
HLT::TriggerElementFactory::listOfProduced
const std::vector< TriggerElement * > & listOfProduced() const
Definition: TriggerElementFactory.h:36
HLT::TriggerElementFactory::m_notfound
std::vector< TriggerElement * > m_notfound
Definition: TriggerElementFactory.h:50
HLT::TriggerElementFactory::~TriggerElementFactory
~TriggerElementFactory()
Definition: TriggerElementFactory.cxx:13
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:27
Types.h
TriggerElement.h
HLT::TriggerElementFactory::listOfProduced
const std::vector< TriggerElement * > & listOfProduced(unsigned int id) const
Definition: TriggerElementFactory.h:38
HLT::TriggerElementFactory
The factory of TriggerElements Creation in controlled way.
Definition: TriggerElementFactory.h:28
HLT::TriggerElementFactory::reset
void reset()
Definition: TriggerElementFactory.cxx:28
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
HLT::TriggerElementFactory::listOfProduced
std::vector< TriggerElement * > & listOfProduced(unsigned int id)
Definition: TriggerElementFactory.h:42
HLT::TriggerElementFactory::m_list
std::vector< TriggerElement * > m_list
Definition: TriggerElementFactory.h:48
HLT::TriggerElementFactory::TriggerElementFactory
TriggerElementFactory()
Definition: TriggerElementFactory.cxx:9
HLT::TriggerElementFactory::empty
bool empty() const
Definition: TriggerElementFactory.cxx:24
HLT::TriggerElementFactory::produce
TriggerElement * produce(unsigned int id, bool ghost=false, bool nofwd=false)
Definition: TriggerElementFactory.cxx:16