DataObjectHandleBase.h
Go to the documentation of this file.
1 #ifndef GAUDIHIVE_DATAOBJECTHANDLEBASE_H
2 #define GAUDIHIVE_DATAOBJECTHANDLEBASE_H
3 
5 #include "GaudiKernel/SmartIF.h"
8 
9 //---------------------------------------------------------------------------
10 
22 //---------------------------------------------------------------------------
23 
25 
26 public:
27 
33 
34  virtual ~DataObjectHandleBase() {}
35 
36 
37  const std::string toString() const;
38  const std::string pythonRepr() const override;
39  void fromString(const std::string& s);
40 
42 
43 
45  bool isOptional() const {return m_optional;}
46  void setOptional(bool optional = true) { m_optional = optional; }
47 
49  return m_altNames; }
50  void setAlternativeDataProductNames(const std::vector<std::string> & alternativeAddresses) { m_altNames = alternativeAddresses; }
51 
52  bool initialized() const { return m_init; }
53  bool wasRead() const { return m_wasRead; }
54  bool wasWritten() const { return m_wasWritten; }
55 
56  bool isValid() const;
57 
58 protected:
59  void setRead(bool wasRead=true) {m_wasRead = wasRead;}
61 
62  void init();
63 
64 protected:
65 
68 
69  bool m_init;
70  bool m_goodType;
71  bool m_optional;
73 
75 
76 };
77 
78 //---------------------------------------------------------------------------
79 //---------------------------------------------------------------------------
80 
81 
82 namespace Gaudi {
83  namespace Parsers {
85  }
86  namespace Utils {
88  }
89 }
90 
91 #endif
void setWritten(bool wasWritten=true)
SmartIF< IDataProviderSvc > m_EDS
void setRead(bool wasRead=true)
void setOptional(bool optional=true)
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
void fromString(const std::string &s)
StatusCode parse(DataObjectHandleBase &, const std::string &)
const std::string pythonRepr() const override
DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
std::vector< std::string > m_altNames
const std::string toString() const
string s
Definition: gaudirun.py:245
GAUDI_API std::ostream & toStream(const DataObjectHandleBase &v, std::ostream &o)
SmartIF< IMessageSvc > m_MS
bool isOptional() const
Check if the data object declared is optional for the algorithm.
#define GAUDI_API
Definition: Kernel.h:107
STL class.
friend std::ostream & operator<<(std::ostream &str, const DataObjectHandleBase &d)
Helper functions to set/get the application return code.
Definition: __init__.py:1
const std::vector< std::string > & alternativeDataProductNames() const
void setAlternativeDataProductNames(const std::vector< std::string > &alternativeAddresses)