ATLAS Offline Software
ScoutingInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /**********************************************************************************
6  * @class : ScoutingInfo
7  *
8  *
9  * @author Noemi Calace <noemi.calace@cern.ch> - CERN
10  *
11  **********************************************************************************/
12 
13 #ifndef TRIGSTEERINGEVENT_SCOUTINGINFO_H
14 #define TRIGSTEERINGEVENT_SCOUTINGINFO_H
15 #include <vector>
16 #include <string>
17 #include <set>
18 #include "GaudiKernel/ClassID.h"
19 
20 class ScoutingInfo {
21 public:
22  ScoutingInfo();
23  ~ScoutingInfo();
24 
28  void add(CLID clid, const std::string& name);
29 
33  void add(const std::pair<CLID, std::string>& clid_Name);
34 
38  void add(const std::vector< std::pair<CLID, std::string> >& clid_Name);
39 
43  void add(const std::set< std::pair<CLID, std::string> >& clid_Name);
44 
49  void get(std::set< std::pair< CLID, std::string> >& clid_Name) const;
50 
54  const std::set< std::pair< CLID, std::string> >& get() const;
55 
60  void getclid(std::vector<CLID>& clid) const;
61 
66  void getName(std::vector<std::string>& name) const;
67 
71  void clear();
72 
76  void merge(const ScoutingInfo& sI);
77 
78 
79 private:
80  std::set< std::pair<CLID, std::string> > m_clidName; // Vector of pairs of CLID and CollectionName
81 
82 };
83 
84 #endif
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
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
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:221
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