ATLAS Offline Software
Loading...
Searching...
No Matches
TileMutableDataContainer.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 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4*/
13
14
15#ifndef TILEEVENT_TILEMUTABLEDATACONTAINER_H
16#define TILEEVENT_TILEMUTABLEDATACONTAINER_H
17
18
23#include "SGCore/ILockable.h"
24#include "GaudiKernel/StatusCode.h"
25#include <vector>
26#include <memory>
27
28
47template <class BASE_T>
49 : public BASE_T, public ILockable
50{
51public:
52 typedef BASE_T BASE;
53 typedef typename BASE::TYPE TYPE;
54 typedef typename BASE::UNIT UNIT;
56 typedef typename BASE::TElement Element;
57
58
68 TileMutableDataContainer (bool createColl = false,
72
73
82
83
86
87
95 StatusCode addCollection (std::unique_ptr<Collection> coll,
96 IdentifierHash hash);
97
98
99 // Const version is inherited.
101
102
111 StatusCode push_back (std::unique_ptr<Element> rch);
112
113
122 StatusCode push_back (Element* rch);
123
124
129 //coverity[BAD_OVERRIDE]
131
132
133 // Const version is inherited.
134 using BASE::indexFindPtr;
135
136
140 StatusCode status() const;
141
142
149 virtual void lock() override;
150
151
152protected:
160 void recycle();
161
162
163private:
165 std::vector<Collection*> m_mutableCollections;
166
169
171 StatusCode m_sc;
172
175
178};
179
180
182
183
184#endif // not TILEEVENT_TILEMUTABLEDATACONTAINER_H
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
An STL vector of pointers that by default owns its pointed-to elements.
const void * indexFindPtr(IdentifierHash hashId) const
Interface to allow an object to lock itself when made const in SG.
Definition ILockable.h:32
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
This is a "hash" representation of an Identifier.
TileMutableDataContainer & operator=(const TileMutableDataContainer &)=delete
TileMutableDataContainer(const TileMutableDataContainer &)=delete
TileMutableDataContainer(const BASE &other)
Copy constructor.
StatusCode addCollection(std::unique_ptr< Collection > coll, IdentifierHash hash)
Add a collection to the container.
StatusCode push_back(std::unique_ptr< Element > rch)
Add a new channel.
StatusCode status() const
Return the error status from the constructors.
virtual void lock() override
Lock this object.
void recycle()
Recycle this object for use in another event.
Collection * indexFindPtr(IdentifierHash hash)
Look up a (non-const) collection via hash.
TileMutableDataContainer(bool createColl=false, TYPE type=TileFragHash::Default, UNIT unit=TileRawChannelUnit::ADCcounts, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Constructor.
StatusCode push_back(Element *rch)
Add a new channel.
OwnershipPolicy
@ OWN_ELEMENTS
this data object owns its elements