ATLAS Offline Software
ScoutingInfo.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
9 }
11 }
12 
13 void ScoutingInfo::add(CLID clid, const std::string& name){
14 
15  std::pair < CLID, std::string > clid_Name (clid, name);
16  m_clidName.insert(m_clidName.end(), clid_Name);
17 }
18 
19 void ScoutingInfo::add(const std::pair<CLID, std::string>& clid_Name){
20 
21  m_clidName.insert(m_clidName.end(), clid_Name);
22 }
23 
24 void ScoutingInfo::add(const std::vector< std::pair<CLID, std::string> >& clid_Name){
25 
26  for(std::vector< std::pair<CLID, std::string> >::const_iterator it = clid_Name.begin();
27  it != clid_Name.end(); ++it)
28  m_clidName.insert(m_clidName.end(), *it);
29 }
30 
31 void ScoutingInfo::add(const std::set< std::pair<CLID, std::string> >& clid_Name){
32 
33  for(std::set< std::pair<CLID, std::string> >::const_iterator it = clid_Name.begin();
34  it != clid_Name.end(); ++it)
35  m_clidName.insert(m_clidName.end(), *it);
36 }
37 
38 void ScoutingInfo::get(std::set< std::pair< CLID, std::string> >& clid_Name) const {
39 
40  for(std::set< std::pair<CLID, std::string> >::const_iterator it = m_clidName.begin();
41  it != m_clidName.end(); ++it)
42  clid_Name.insert(clid_Name.end(), *it);
43 }
44 
45 const std::set< std::pair< CLID, std::string> >& ScoutingInfo::get() const {
46 
47  return m_clidName;
48 }
49 
50 void ScoutingInfo::getclid(std::vector<CLID>& clid) const{
51 
52  for(std::set< std::pair<CLID, std::string> >::const_iterator it = m_clidName.begin();
53  it != m_clidName.end(); ++it)
54  clid.push_back((*it).first);
55 }
56 
57 void ScoutingInfo::getName(std::vector<std::string>& name) const{
58 
59  for(std::set< std::pair<CLID, std::string> >::const_iterator it = m_clidName.begin();
60  it != m_clidName.end(); ++it)
61  name.push_back((*it).second);
62 }
63 
65  m_clidName.clear();
66 }
67 
69 
70  m_clidName.insert(sI.m_clidName.begin(),sI.m_clidName.end());
71 }
ScoutingInfo::~ScoutingInfo
~ScoutingInfo()
Definition: ScoutingInfo.cxx:10
ScoutingInfo
Definition: ScoutingInfo.h:20
ScoutingInfo::add
void add(CLID clid, const std::string &name)
add a new element to m_clidName
Definition: ScoutingInfo.cxx:13
ScoutingInfo::clear
void clear()
clears the vector of <CLID, CollectionName>
Definition: ScoutingInfo.cxx:64
skel.it
it
Definition: skel.GENtoEVGEN.py:396
ScoutingInfo::getclid
void getclid(std::vector< CLID > &clid) const
gets back all CLIDs in m_clidName (fills up clid vector given by reference)
Definition: ScoutingInfo.cxx:50
ScoutingInfo::merge
void merge(const ScoutingInfo &sI)
merges two ScoutingInfo objects I.e.
Definition: ScoutingInfo.cxx:68
ScoutingInfo.h
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
ScoutingInfo::get
const std::set< std::pair< CLID, std::string > > & get() const
gets back all <CLID, CollectionName> added
Definition: ScoutingInfo.cxx:45
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ScoutingInfo::m_clidName
std::set< std::pair< CLID, std::string > > m_clidName
Definition: ScoutingInfo.h:86
ScoutingInfo::ScoutingInfo
ScoutingInfo()
Definition: ScoutingInfo.cxx:8
ScoutingInfo::getName
void getName(std::vector< std::string > &name) const
gets back all CollectionNames in m_clidName (fills up name vector given by reference)
Definition: ScoutingInfo.cxx:57