ATLAS Offline Software
MetaVector.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_META_VECTOR_HH
6 #define SAMPLE_HANDLER_META_VECTOR_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 #include <SampleHandler/Global.h>
19 
20 #include <vector>
21 #include <SampleHandler/Meta.h>
22 
23 namespace SH
24 {
27  template<class T> class MetaVector : public Meta
28  {
29  //
30  // public interface
31  //
32 
37  public:
38  void testInvariant () const;
39 
40 
49  public:
50  MetaVector ();
51 
52 
59  public:
60  MetaVector (const std::string& name, const std::vector<T>& set_value);
61 
62 
64  public:
65  std::vector<T> value;
66 
67 
68 
69  //
70  // private interface
71  //
72 
74  };
75 }
76 
77 #include <RootCoreUtils/Assert.h>
78 
79 namespace SH
80 {
81  template<class T> void MetaVector<T> ::
82  testInvariant () const
83  {
84  }
85 
86 
87 
88  template<class T> MetaVector<T> ::
89  MetaVector ()
90  : Meta ("")
91  {
92  RCU_NEW_INVARIANT (this);
93  }
94 
95 
96 
97  template<class T> MetaVector<T> ::
98  MetaVector (const std::string& name, const std::vector<T>& set_value)
99  : Meta (name), value (set_value)
100  {
101  RCU_NEW_INVARIANT (this);
102  }
103 }
104 
105 #endif
SH::MetaVector::value
std::vector< T > value
the value contained
Definition: MetaVector.h:65
athena.value
value
Definition: athena.py:122
Assert.h
SH::MetaVector
This class defines a templatized version of the meta-data in vector form.
Definition: D3PDTools/SampleHandler/SampleHandler/Global.h:42
SH::MetaVector::testInvariant
void testInvariant() const
test the invariant of this object
Definition: MetaVector.h:82
Meta.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SH::MetaVector::ClassDef
ClassDef(MetaVector, 1)
SH::MetaVector::MetaVector
MetaVector()
standard default constructor
Definition: MetaVector.h:89
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
Global.h
SH::Meta
A base class for classes that implement arbitrary meta-data.
Definition: Meta.h:43
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition: Assert.h:233