ATLAS Offline Software
Loading...
Searching...
No Matches
SGGetterImpl.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
14
15
16#ifndef D3PDMAKERUTILS_SGGETTERIMPL_H
17#define D3PDMAKERUTILS_SGGETTERIMPL_H
18
19
23#include "GaudiKernel/IClassIDSvc.h"
24#include "GaudiKernel/ServiceHandle.h"
25
26
27namespace D3PD {
28
29
51 : virtual public IObjGetterTool
52{
53public:
59 SGGetterImpl (const std::string& name, ServiceHandle<StoreGateSvc>& sg);
60
61
65 virtual const std::type_info& typeinfo() const;
66
67
71 CLID clid() const;
72
73
82 virtual const void* getUntyped (bool allowMissing = false);
83
84
90#define SGGETTERIMPL_PROPS \
91 do { \
92 this->declareProperty ("TypeName", this->m_typename, \
93 "Name of the type of the object being retrieved");\
94 this->declareProperty ("SGKey", this->m_sgkey, \
95 "StoreGate key of the object being retrieved. " \
96 "This may be a comma or space-separated list; " \
97 "the first existing key will be used."); \
98 this->declareProperty ("ClassIDSvc", this->m_clidsvc, \
99 "ClassIDSvc instance to use."); \
100 } while (0)
101
102
103protected:
109 StatusCode initializeImpl ();
110
111
113 std::string m_typename;
114
116 std::string m_sgkey;
117
120
123
124private:
127
130};
131
132
133} // namespace D3PD
134
135
136#endif // not D3PDMAKERUTILS_SGGETTERIMPL_H
uint32_t CLID
The Class ID type.
Abstract interface to get an object to put in the tuple.
Helper to resolve the SG key to use.
Abstract interface to get an object to put in the tuple.
std::string m_typename
Property: Name of the type of the object being retrieved.
SGKeyResolver m_resolver
Helper: Resolve the SG key to use.
SGGetterImpl(const std::string &name, ServiceHandle< StoreGateSvc > &sg)
Constructor.
StatusCode initializeImpl()
Initialize this mixin class.
CLID m_clid
CLID for the object being retrieved.
virtual const void * getUntyped(bool allowMissing=false)
Return the target object.
ServiceHandle< StoreGateSvc > & m_sg
The event storage service.
ServiceHandle< IClassIDSvc > m_clidsvc
Property: Instance of the ClassIDSvc to use.
CLID clid() const
Return the class ID being read by this tool.
virtual const std::type_info & typeinfo() const
Return the type of object retrieved by this tool.
std::string m_sgkey
Property: StoreGate key of the object being retrieved.
Helper to resolve the SG key to use.
Block filler tool for noisy FEB information.