Belle II Software  release-08-01-10
StringWrapper.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 #include <framework/datastore/RelationsObject.h>
11 #include <string>
12 
13 namespace Belle2 {
23  class StringWrapper : public RelationsObject {
24 
25  // Note: Currently all functions are simple enough to be defined in this file,
26  // so there is no separate .cc for implementations.
27 
28  public:
29 
34  StringWrapper() : m_string("") {};
35 
41  void setString(const std::string& inputstring)
42  {
43  m_string = inputstring;
44  }
45 
51  std::string getString() const
52  {
53  return m_string;
54  }
55 
56  private:
57  std::string m_string;
59  };
61 } //end namespace Belle2
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
This class is a wrapper for strings, such as MCDecayStrings, to allow them to be associated with part...
Definition: StringWrapper.h:23
StringWrapper()
Default constructor.
Definition: StringWrapper.h:34
std::string getString() const
Get string.
Definition: StringWrapper.h:51
void setString(const std::string &inputstring)
Set string.
Definition: StringWrapper.h:41
std::string m_string
the contained string
Definition: StringWrapper.h:57
Abstract base class for different kinds of events.