ATLAS Offline Software
Loading...
Searching...
No Matches
AuxStoreTest.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
6#ifndef APRTEST_AUXSTORE
7#define APRTEST_AUXSTORE
8
11
12
13namespace APRTest
14{
15
17 {
18 IAuxStore* m_extra_store = 0;
19 public:
20 int m_data = 0;
21
22 virtual ~AuxStore() {}
23
24
25 virtual void setStore( IAuxStore* store ) override {
26 m_extra_store = store;
27 }
28
30
31 virtual void* getData(SG::auxid_t auxid, size_t size, size_t capacity ) override;
32 virtual const void* getData(SG::auxid_t auxid ) const override;
33
34 virtual IAuxStore* getStore() override { return static_cast<IAuxStore*>(this); }
35 virtual const IAuxStore* getStore() const override { return static_cast<const IAuxStore*>(this); }
36
37 virtual AuxStoreType getStoreType() const override { return AST_ContainerStore; }
38
39 virtual size_t size() const override
41
42
43 };
44
45 inline
46 void* AuxStore::getData(SG::auxid_t auxid, size_t size, size_t capacity )
47 {
48 return m_extra_store? m_extra_store->getData( auxid, size, capacity)
49 : SG::AuxStoreInternal::getData( auxid, size, capacity);
50 }
51
52 inline
53 const void* AuxStore::getData(SG::auxid_t auxid) const
54 {
55 return m_extra_store? m_extra_store->getData( auxid)
57 }
58
59
61 public:
62 explicit AClassWithDict(int v=54321) { _val=v; };
63 int _val;
64 };
65
66}
67
68#endif
An auxiliary data store that holds data internally.
AClassWithDict(int v=54321)
virtual AuxStoreType getStoreType() const override
Return the type of the store object.
virtual ~AuxStore()
virtual void * getData(SG::auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data item.
virtual const IAuxStore * getStore() const override
virtual IAuxStore * getStore() override
Return the pointer to the store object currently in use.
virtual size_t size() const override
Return the number of elements in the store.
IAuxStore * m_extra_store
virtual void setStore(IAuxStore *store) override
An auxiliary data store that holds data internally.
virtual const void * getData(SG::auxid_t auxid) const override
Return the data vector for one aux data item.
virtual size_t size() const override
Return the number of elements in the store.
Interface for objects taking part in direct ROOT I/O.
AuxStoreType
Type of the auxiliary store.
@ AST_ContainerStore
The store describes a container.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27