ATLAS Offline Software
Loading...
Searching...
No Matches
SGDataVectorGetterTool.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: SGDataVectorGetterTool.h 790090 2016-12-16 05:31:29Z ssnyder $
14
15
16#ifndef D3PDMAKERCORECOMPS_SGDATAVECTORGETTERTOOL_H
17#define D3PDMAKERCORECOMPS_SGDATAVECTORGETTERTOOL_H
18
19
26#include "GaudiKernel/ServiceHandle.h"
27
28
29namespace DataModel_detail {
30class DVLInfoBase;
31} // namespace DataModel_detail
32
33
34namespace D3PD {
35
36
55{
56public:
63 SGDataVectorGetterTool (const std::string& type,
64 const std::string& name,
65 const IInterface* parent);
66
67
69 virtual StatusCode initialize();
70
71
73 virtual StatusCode finalize();
74
75
81 virtual const std::type_info& elementTypeinfo() const;
82
83
91 virtual StatusCode reset (bool allowMissing = false);
92
93
99 virtual const void* nextUntyped();
100
101
112 virtual size_t sizeHint (bool allowMissing = false);
113
114
115private:
118
120 const DataModel_detail::DVLInfoBase* getInfo (const std::type_info& ti);
121
124
127
132};
133
134
135} // namespace D3PD
136
137
138#endif // not D3PDMAKERCORECOMPS_SGCOLLECTIONGETTERTOOL_H
Type-safe wrapper for collection getter tools.
Helpers for checking error return status codes and reporting errors.
An STL vector of pointers that by default owns its pointed-to elements.
This file contains the class definition for the IAthenaPoolCnvSvc interface class.
Common object getter code for retrieving from StoreGate.
Helper to convert pointers.
CollectionGetterToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
ServiceHandle< IAthenaPoolCnvSvc > m_athenaPoolCnvSvc
Used to auto-load converters, if needed.
virtual StatusCode initialize()
Standard Gaudi initialize method.
TypeConverter m_converter
Converter from the pointer that we get from StoreGate to a pointer to the collection over which we it...
virtual size_t sizeHint(bool allowMissing=false)
Return an estimate of the number of elements in the iteration.
const DataModel_detail::DVLInfoBase * getInfo(const std::type_info &ti)
Retrieve DataVector/List information for this collection.
virtual const std::type_info & elementTypeinfo() const
Return the element type of the collection.
virtual StatusCode finalize()
Standard Gaudi finalize method.
virtual const void * nextUntyped()
Return a pointer to the next element in the collection.
DataModel_detail::DVLIteratorBase * m_it
Current iterator over the collection.
SGDataVectorGetterTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
const DataModel_detail::DVLInfoBase * m_info
DataVector/List information for this collection.
virtual StatusCode reset(bool allowMissing=false)
Reset the iteration to the start of the collection.
SGGetterImpl(const std::string &name, ServiceHandle< StoreGateSvc > &sg)
Constructor.
This is helper for converting between pointers of different types, given dynamically by std::type_inf...
Helper to iterate over a DV container.
Definition DVLInfo.h:32
Block filler tool for noisy FEB information.