41 if (info ==
nullptr) {
44 if (!contId.empty() && (contId.size() < 5 || contId.substr(contId.size() - 5, 4) !=
"Aux.")
45 && !info->clazz().Properties().HasProperty(
"IAuxStore")) {
48 TClass* cl = info->clazz().Class();
52 TClass* holderTC = cl->GetBaseClass(
"SG::IAuxStoreHolder");
53 if (holderTC ==
nullptr) {
72 if (
type.IsFundamental()) {
73 delete [] (
char*)
data;
data =
nullptr;
100 if (eti ==
nullptr) {
104 }
catch (
const std::runtime_error&) {
114 if (info ==
nullptr) {
117 if (!contId.empty() && (contId.size() < 5 || contId.substr(contId.size() - 5, 4) !=
"Aux.")
118 && !info->clazz().Properties().HasProperty(
"IAuxStore")) {
122 TClass* cl = info->clazz().Class();
126 TClass* storeTC = cl->GetBaseClass(
"SG::IAuxStoreIO");
127 if (storeTC ==
nullptr) {
134 return m_store->getSelectedAuxIDs();
141 return m_store->getIOData(auxid);
148 return m_store->getIOType(auxid);
163 void* buffer =
nullptr;
165 StatusCode
sc = ipcTool->
getObject(&buffer, nbytes, num);
166 while (
sc.isRecoverable() && nbytes > 0) {
169 if (!
sc.isSuccess() || nbytes == 0) {
170 return(StatusCode::SUCCESS);
173 classId.
fromString(
static_cast<const char*
>(buffer));
174 if (!ipcTool->
getObject(&buffer, nbytes, num).isSuccess() || nbytes == 0) {
175 return(StatusCode::FAILURE);
177 const std::string contName = std::string(
static_cast<const char*
>(buffer));
179 void* nameData =
nullptr;
181 while (ipcTool->
getObject(&nameData, nbytes, num).isSuccess() && nbytes > 0) {
182 const char* del1 =
static_cast<const char*
>(memchr(nameData,
'\n', nbytes));
183 const char* del2 =
static_cast<const char*
>(memchr(del1 + 1,
'\n', nbytes - (del1 -
static_cast<const char*
>(nameData) - 1)));
184 const std::string dataStr(
static_cast<const char*
>(nameData));
185 const std::string& attrName = dataStr.substr(0, del1 -
static_cast<const char*
>(nameData));
186 const std::string& typeName = dataStr.substr(del1 -
static_cast<const char*
>(nameData) + 1, del2 - del1 - 1);
187 const std::string& elemName = dataStr.substr(del2 -
static_cast<const char*
>(nameData) + 1);
188 if (ipcTool->
getObject(&buffer, nbytes, num).isSuccess()) {
192 void* dynAttr =
nullptr;
193 if (
type.IsFundamental()) {
194 dynAttr =
new char[nbytes];
195 std::memcpy(dynAttr, buffer, nbytes); buffer =
nullptr;
205 return(StatusCode::SUCCESS);
212 const std::string& contName,
215 if (!auxIDs.
empty()) {
216 const std::string& classIdStr = classId.
toString();
217 if (!ipcTool->
putObject(classIdStr.c_str(), classIdStr.size() + 1, num).isSuccess()) {
218 return(StatusCode::FAILURE);
220 if (!ipcTool->
putObject(contName.c_str(), contName.size() + 1, num).isSuccess()) {
221 return(StatusCode::FAILURE);
226 if (!ipcTool->
putObject(dataStr.c_str(), dataStr.size() + 1, num).isSuccess()) {
227 return(StatusCode::FAILURE);
229 const std::type_info* tip = this->
getType(auxid);
230 if (tip ==
nullptr) {
231 return(StatusCode::FAILURE);
234 StatusCode
sc = StatusCode::FAILURE;
235 if (
type.IsFundamental()) {
241 delete []
static_cast<char*
>(buffer); buffer =
nullptr;
243 if (!
sc.isSuccess()) {
244 return(StatusCode::FAILURE);
247 return(StatusCode::SUCCESS);
This file contains the class definition for the AuxDiscoverySvc class.
An auxiliary data store that holds data internally.
Handle mappings between names and auxid_t.
Make an AuxVectorData object from either a raw vector or an aux store.
std::vector< size_t > vec
This file contains the class definition for the Guid class (migrated from POOL).
char data[hepevt_bytes_allocation_ATLAS]
Interface providing I/O for a generic auxiliary store.
AthenaPoolAuxStore(bool standalone)
bool getAuxStore(void *obj, const Guid &classId, const std::string &contId)
StatusCode sendStore(const IAthenaSerializeSvc *serSvc, IAthenaIPCTool *ipcTool, const void *obj, const Guid &classId, const std::string &contName, int num=0)
Send dynamic aux store variables to streaming tool.
std::string getElemName(SG::auxid_t auxid)
SG::auxid_set_t getAuxIDs(const void *obj, const Guid &classId, const std::string &contId)
const SG::IAuxStoreIO * m_store
std::string getTypeName(SG::auxid_t auxid)
bool setData(SG::auxid_t auxid, void *data, const RootType &type)
SG::auxid_t getAuxID(const std::string &attrName, const std::string &elemName, const std::string &typeName)
const std::type_info * getType(SG::auxid_t auxid)
AthenaPoolAuxStore * m_storeInt
const void * getData(SG::auxid_t auxid)
std::string getAttrName(SG::auxid_t auxid)
StatusCode receiveStore(const IAthenaSerializeSvc *serSvc, IAthenaIPCTool *ipcTool, void *obj, int num=0)
Receive dynamic aux store variables from streaming tool.
SG::IAuxStoreHolder * m_storeHolder
bool empty() const
Return true if there are no 1 bits in the set.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
constexpr void fromString(std::string_view s)
Automatic conversion from string representation.
static const Guid & null() noexcept
NULL-Guid: static class method.
constexpr void toString(std::span< char, StrLen > buf, bool uppercase=true) const noexcept
Automatic conversion to string representation.
virtual void * deserialize(void *buffer, size_t &nbytes, const std::string &name) const =0
virtual void * serialize(const void *object, const std::string &name, size_t &nbytes) const =0
const std::type_info * getTypeInfo() const
Return the type_info for the described type.
An auxiliary data store that holds data internally.
bool standalone() const
Return the standalone flag.
void addVector(std::unique_ptr< IAuxTypeVector > vec, bool isDecoration)
Explicitly add a vector to the store.
AuxStoreInternal(bool standalone=false)
Constructor.
Handle mappings between names and auxid_t.
SG::auxid_t findAuxID(const std::string &name, const std::string &clsname="") const
Look up a name -> auxid_t mapping.
std::unique_ptr< IAuxTypeVector > makeVectorFromData(SG::auxid_t auxid, void *data, IAuxTypeVector *linkedVector, bool isPacked, bool ownFlag) const
Construct an IAuxTypeVector object from a vector.
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
std::string getTypeName(SG::auxid_t auxid) const
Return the type name of an aux data item.
void copy(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n) const
Copy elements between vectors.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Make an AuxVectorData object from either a raw array or an aux store.
Interface for objects taking part in direct ROOT I/O.
@ AST_ObjectStore
The store describes a single object.
Interface providing I/O for a generic auxiliary store.
A set of aux data identifiers.
Definition of class DbTypeInfo.
static const DbTypeInfo * create(const std::string &cl_name)
Create type information using name.
Find the auxid for a dynamic branch.
std::string normalizedTypeinfoName(const std::type_info &info)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
static const auxid_t null_auxid
To signal no aux data item.
SG::auxid_t getDynamicAuxID(const std::type_info &ti, const std::string &name, const std::string &elementTypeName, const std::string &branch_type_name, bool standalone, SG::auxid_t linked_auxid)
Find the auxid for a dynamic branch.
size_t auxid_t
Identifier for a particular aux data item.
Convert a type_info to a normalized string representation (matching the names used in the root dictio...