ATLAS Offline Software
Loading...
Searching...
No Matches
T_AthenaPoolViewVectorCnv.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 ATHENAPOOLCNVSVC_T_ATHENAPOOLVIEWVECTORCNV_H
17#define ATHENAPOOLCNVSVC_T_ATHENAPOOLVIEWVECTORCNV_H
18
19
23#include "StorageSvc/DbReflex.h"
28#include "AthLinks/ElementLink.h"
31#include "CxxUtils/StrFormat.h"
33#include <vector>
34#include <cstdlib>
35
36
50template <class DV>
52 : public T_AthenaPoolCustomCnv<ViewVector<DV>, ViewVector<DV> >
53{
54public:
57 typedef trans_t pers_t;
58
60 typedef std::vector<ElementLink<DV> > pers2_t;
61
64
65
70 T_AthenaPoolViewVectorCnv (ISvcLocator* svcloc);
71
72
76 virtual StatusCode initialize() override;
77
78
85 virtual pers_t* createPersistent( trans_t* trans ) override;
86
87
94 virtual trans_t* createTransient(const Token* token) override;
95
96
97private:
104 std::vector<Guid> initGuids (const std::type_info& ti) const;
105
107 std::vector<Guid> m_guids;
108
110 std::vector<Guid> m_guids2;
111};
112
113
115
116
117#endif // not ATHENAPOOLCNVSVC_T_ATHENAPOOLVIEWVECTORCNV_H
DataVector adapter that acts like it holds const pointers.
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
Helpers for checking error return status codes and reporting errors.
A couple hooks for debugging.
Exceptions that can be thrown from AthenaPoolCnvSvc.
Provide helper functions to create formatted strings.
his file contains the class definition for the templated T_AthenaPoolCustomCnv class.
Identify view containers to be made persistent.
Compatibility for old converter classes that don't get passed the key.
T_AthenaPoolViewVectorCnv(ISvcLocator *svcloc)
Constructor.
std::vector< Guid > m_guids2
List of guids for std::vector<ElementLink<DV> > classes.
T_AthenaPoolCustomCnv< trans_t, pers_t > Base
Base class.
std::vector< Guid > initGuids(const std::type_info &ti) const
Return the set of GUIDs for persistent type ti.
ViewVector< DV > trans_t
The transient and persistent types.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
virtual trans_t * createTransient(const Token *token) override
Read the persistent object and convert it to transient.
std::vector< Guid > m_guids
List of guids for ViewVector classes.
std::vector< ElementLink< DV > > pers2_t
Alternate persistent type; raw vector of EL.
virtual pers_t * createPersistent(trans_t *trans) override
Convert a transient object to persistent form.
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:22
Identify view containers to be made persistent.
Definition ViewVector.h:67
Helper to make a vector<EL> from a DataVector.