ATLAS Offline Software
Loading...
Searching...
No Matches
AuxStoreTest.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
29 using SG::AuxStoreInternal::getData;
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
40 { return m_extra_store ? m_extra_store->size() : SG::AuxStoreInternal::size(); }
41
42 virtual void toTransient (const EventContext& ) override { }
43
44 };
45
46 inline
47 void* AuxStore::getData(SG::auxid_t auxid, size_t size, size_t capacity )
48 {
49 return m_extra_store? m_extra_store->getData( auxid, size, capacity)
50 : SG::AuxStoreInternal::getData( auxid, size, capacity);
51 }
52
53 inline
54 const void* AuxStore::getData(SG::auxid_t auxid) const
55 {
56 return m_extra_store? m_extra_store->getData( auxid)
57 : SG::AuxStoreInternal::getData( auxid);
58 }
59
60
62 public:
63 explicit AClassWithDict(int v=54321) { _val=v; };
64 int _val;
65 };
66
67}
68
69#endif
An auxiliary data store that holds data internally.
size_t size() const
Number of registered mappings.
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
virtual const IAuxStore * getStore() const override
virtual void toTransient(const EventContext &) override
Perform post-read processing on this store.
virtual IAuxStore * getStore() override
Return the pointer to the store object currently in use.
virtual size_t size() const override
IAuxStore * m_extra_store
virtual void setStore(IAuxStore *store) override
Interface for objects taking part in direct ROOT I/O.
AuxStoreType
Type of the auxiliary store.
@ AST_ContainerStore
The store describes a container.
AuxStoreInternal(bool standalone=false)
An auxiliary data store that holds data internally.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27