ATLAS Offline Software
AraToolBase.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 ARATOOLBASE_H
6 #define ARATOOLBASE_H
7 
8 #include "Gaudi/Property.h"
9 #include "GaudiKernel/PropertyHolder.h"
10 #include "GaudiKernel/IAlgTool.h"
11 #include "GaudiKernel/IDataHandleHolder.h"
12 #include "GaudiKernel/CommonMessaging.h"
13 #include <string>
14 
15 
17 {
18 public:
19  typedef PropertyHolder<CommonMessaging<implements<IAlgTool, IDataHandleHolder, IProperty, IStateful> > > PropertyMgr;
20 
21 protected:
22  bool runningARA() const { return m_runningARA; }
23 
24 private:
27 
28 
29 public:
30 
31 
32  AraToolBase(PropertyMgr * pmgr=0);
33 
34  virtual ~AraToolBase();
35 
36 
37  template<class TYPE>
38  Gaudi::Details::PropertyBase* declareProperty
39  ( const std::string& name ,
40  TYPE& value,
41  const std::string& doc = "none" ) ;
42 
44 
45  public:
46 
47 };
48 
49 template<class TYPE>
50 inline Gaudi::Details::PropertyBase *
52 ( const std::string& name ,
53  TYPE& value,
54  const std::string& doc )
55 {
56 
57  if(m_runningARA) {
58  } else {
59  return m_propertyMgr->declareProperty(name, value, doc);
60  }
61 
62  return 0;
63 }
64 
65 #endif
66 
AraToolBase::m_runningARA
bool m_runningARA
Definition: AraToolBase.h:26
AraToolBase::getPropertyMgr
PropertyMgr * getPropertyMgr()
Definition: AraToolBase.h:43
AraToolBase::~AraToolBase
virtual ~AraToolBase()
Definition: AraToolBase.cxx:15
AraToolBase::AraToolBase
AraToolBase(PropertyMgr *pmgr=0)
Definition: AraToolBase.cxx:7
athena.value
value
Definition: athena.py:122
AraToolBase::m_propertyMgr
PropertyMgr * m_propertyMgr
Definition: AraToolBase.h:25
AraToolBase::runningARA
bool runningARA() const
Definition: AraToolBase.h:22
TYPE
#define TYPE(CODE, TYP, IOTYP)
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AraToolBase::PropertyMgr
PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > PropertyMgr
Definition: AraToolBase.h:19
AraToolBase::declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Definition: AraToolBase.h:52
AraToolBase
Definition: AraToolBase.h:17