ATLAS Offline Software
TagInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef EVENTINFO_TAGINFO_H
6 # define EVENTINFO_TAGINFO_H 1
7 
20 #include "GaudiKernel/StatusCode.h"
21 #include <vector>
22 #include <string>
23 #include <utility> //for std::pair
24 
25 
26 class MsgStream;
27 
28 
29 
41 class TagInfo {
42 public:
44 
45  typedef std::pair<std::string, std::string> NameTagPair;
46  typedef std::vector<NameTagPair> NameTagPairVec;
48 
50 
51  TagInfo();
52  virtual ~TagInfo();
54 
56 
57 
59  void findTag(const std::string& name, std::string& tag) const;
60 
62  std::string findTag(const std::string & name) const;
63 
65  void getTags(NameTagPairVec& pairs) const;
66 
68  NameTagPairVec getTags() const;
69 
71  void findInputTag(const std::string& name, std::string& tag) const;
72 
74  std::string findInputTag(const std::string& name) const;
75 
77  void getInputTags(NameTagPairVec& pairs) const;
78 
81 
83  std::string tagInfoTag() const;
85 
87  bool operator < (const TagInfo& rhs) const;
88 
90 
91 
94  StatusCode addTag(const NameTagPair& pair, bool override = false);
95 
98  StatusCode addInputTag(const NameTagPair& pair, bool override = false);
99 
101  void setTagInfoTag(const std::string& tag);
103 
105  void printTags(MsgStream& log) const;
106 
108  std::string str() const;
109 
110 
111 
112 private:
113 
116  std::string m_myTag;
117 };
118 
119 #include "AthenaKernel/CLASS_DEF.h"
120 CLASS_DEF(TagInfo, 61780915, 1)
121 
122 
123 
124 #endif // EVENTINFO_TAGINFO_H
TagInfo::getInputTags
NameTagPairVec getInputTags() const
Return a vector with all current input tags.
Definition: TagInfo.cxx:132
TagInfo::TagInfo
TagInfo()
Definition: TagInfo.cxx:87
TagInfo::addTag
StatusCode addTag(const NameTagPair &pair, bool override=false)
addTag for current tags - returns failure if tag name exists and override == false
Definition: TagInfo.cxx:175
TagInfo::findInputTag
void findInputTag(const std::string &name, std::string &tag) const
Find tag by its name - for input tags, return in the reference argument.
Definition: TagInfo.cxx:106
TagInfo::NameTagPairVec
std::vector< NameTagPair > NameTagPairVec
Definition: TagInfo.h:46
TagInfo::addInputTag
StatusCode addInputTag(const NameTagPair &pair, bool override=false)
addInputTag for input tags - returns failure if tag name exists and override == false
Definition: TagInfo.cxx:181
TagInfo::printTags
void printTags(MsgStream &log) const
Printout method:
Definition: TagInfo.cxx:192
TagInfo::str
std::string str() const
String representation.
Definition: TagInfo.cxx:207
TagInfo::operator<
bool operator<(const TagInfo &rhs) const
Less than comparision needed to create e.g. set<TagInfo>
Definition: TagInfo.cxx:142
python.CreateTierZeroArgdict.pairs
pairs
Definition: CreateTierZeroArgdict.py:201
TagInfo::NameTagPair
std::pair< std::string, std::string > NameTagPair
Definition: TagInfo.h:45
TagInfo
This class contains the list of currently valid tags for detector description - GeoModel and IOV/Cond...
Definition: TagInfo.h:41
TagInfo::~TagInfo
virtual ~TagInfo()
Definition: TagInfo.cxx:89
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TagInfo::setTagInfoTag
void setTagInfoTag(const std::string &tag)
set the tag for the TagInfo object itself
Definition: TagInfo.cxx:187
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
TagInfo::m_inputTags
NameTagPairVec m_inputTags
Definition: TagInfo.h:115
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TagInfo::tagInfoTag
std::string tagInfoTag() const
The tag of the TagInfo object.
Definition: TagInfo.cxx:137
TagInfo::findTag
void findTag(const std::string &name, std::string &tag) const
Find tag by its name - for current tags, returning in the reference argument.
Definition: TagInfo.cxx:95
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
CLASS_DEF.h
macros to associate a CLID to a type
TagInfo::m_myTag
std::string m_myTag
Definition: TagInfo.h:116
TagInfo::m_tags
NameTagPairVec m_tags
Definition: TagInfo.h:114
TagInfo::getTags
NameTagPairVec getTags() const
Return a vector with all current tags.
Definition: TagInfo.cxx:122