ATLAS Offline Software
TagList.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 #ifndef SAMPLE_HANDLER_TAG_LIST_HH
6 #define SAMPLE_HANDLER_TAG_LIST_HH
7 
8 //
9 // Distributed under the Boost Software License, Version 1.0.
10 // (See accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
12 
13 // Please feel free to contact me (krumnack@iastate.edu) for bug
14 // reports, feature suggestions, praise and complaints.
15 
16 
17 
18 
19 #include <SampleHandler/Global.h>
20 
21 #include <set>
22 #include <string>
23 
24 namespace SH
25 {
37  std::string dbg (const TagList& obj, unsigned verbosity = 0);
38 
39 
40 
47  class TagList
48  {
49  //
50  // public interface
51  //
52 
57  public:
58  void testInvariant () const;
59 
60 
67  public:
68  TagList ();
69 
70 
80  public:
81  explicit TagList (const std::string& tags, char separator = ':');
82 
83 
90  public:
91  bool has (const std::string& tag) const;
92 
93 
95  public:
96  typedef std::set<std::string>::const_iterator iterator;
97 
98 
103  public:
104  iterator begin () const;
105 
106 
111  public:
112  iterator end () const;
113 
114 
124  public:
125  std::string join (char separator = ':') const;
126 
127 
135  public:
136  void add (const std::string& tag);
137 
138 
139 
140  //
141  // private interface
142  //
143 
145  private:
146  std::set<std::string> m_tags;
147 
149  private:
150  typedef std::set<std::string>::const_iterator TagsIter;
151  };
152 }
153 
154 #endif
SH::TagList
A class that manages a list of tags for identifying samples.
Definition: TagList.h:48
SH::dbg
std::string dbg(const Meta &, unsigned)
Definition: Meta.cxx:28
SH::TagList::has
bool has(const std::string &tag) const
whether we have the given tag
Definition: TagList.cxx:88
SH::TagList::join
std::string join(char separator=':') const
join all the tags together into a string
Definition: TagList.cxx:116
SH::TagList::begin
iterator begin() const
the begin iterator to use
Definition: TagList.cxx:98
SH::TagList::TagsIter
std::set< std::string >::const_iterator TagsIter
the iterator for m_tags
Definition: TagList.h:150
SH::TagList::add
void add(const std::string &tag)
add a tag to the list
Definition: TagList.cxx:136
tags
std::vector< std::string > tags
Definition: hcg.cxx:102
SH::TagList::testInvariant
void testInvariant() const
test the invariant of this object
Definition: TagList.cxx:47
SH::TagList::iterator
std::set< std::string >::const_iterator iterator
the iterator to use
Definition: TagList.h:96
covarianceTool.verbosity
verbosity
Definition: covarianceTool.py:513
SH::TagList::m_tags
std::set< std::string > m_tags
the list of tags
Definition: TagList.h:146
SH::TagList::TagList
TagList()
standard default constructor
Definition: TagList.cxx:60
SH::TagList::end
iterator end() const
the end iterator to use
Definition: TagList.cxx:107
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
python.PyAthena.obj
obj
Definition: PyAthena.py:135
Global.h