ATLAS Offline Software
Loading...
Searching...
No Matches
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>
13
14namespace 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 //
std::vector< TriggerElement * > m_list
std::vector< TriggerElement * > m_notfound
std::vector< TriggerElement * > & listOfProduced(unsigned int id)
const std::vector< TriggerElement * > & listOfProduced(unsigned int id) const
std::map< te_id_type, std::vector< TriggerElement * > > m_groupedById
this is to speed up queries
const std::vector< TriggerElement * > & listOfProduced() const
TriggerElement * produce(unsigned int id, bool ghost=false, bool nofwd=false)
std::vector< TriggerElement * > & listOfProduced()
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...