|
ATLAS Offline Software
|
This class provides the interface between AthenaPoolCnvSvc and AuxStore classes.
More...
#include <AuxDiscoverySvc.h>
|
| AuxDiscoverySvc () |
|
bool | getAuxStore (void *obj, const Guid &classId, const std::string &contId) |
|
bool | setData (SG::auxid_t auxid, void *data, const RootType &type) |
|
bool | setAuxStore () |
|
SG::auxid_t | getAuxID (const std::string &attrName, const std::string &elemName, const std::string &typeName) |
|
SG::auxid_set_t | getAuxIDs (const void *obj, const Guid &classId, const std::string &contId) |
|
const void * | getData (SG::auxid_t auxid) |
|
const std::type_info * | getType (SG::auxid_t auxid) |
|
std::string | getAttrName (SG::auxid_t auxid) |
|
std::string | getTypeName (SG::auxid_t auxid) |
|
std::string | getElemName (SG::auxid_t auxid) |
|
StatusCode | receiveStore (const IAthenaSerializeSvc *serSvc, IAthenaIPCTool *ipcTool, void *obj, int num=0) |
| Receive dynamic aux store variables from streaming tool. More...
|
|
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. More...
|
|
This class provides the interface between AthenaPoolCnvSvc and AuxStore classes.
Definition at line 33 of file AuxDiscoverySvc.h.
◆ AuxDiscoverySvc()
AuxDiscoverySvc::AuxDiscoverySvc |
( |
| ) |
|
|
inline |
◆ getAttrName()
std::string AuxDiscoverySvc::getAttrName |
( |
SG::auxid_t |
auxid | ) |
|
◆ getAuxID()
SG::auxid_t AuxDiscoverySvc::getAuxID |
( |
const std::string & |
attrName, |
|
|
const std::string & |
elemName, |
|
|
const std::string & |
typeName |
|
) |
| |
Definition at line 93 of file AuxDiscoverySvc.cxx.
96 if (auxid == SG::null_auxid &&
m_storeInt !=
nullptr) {
99 const std::type_info* eti = elemType.getTypeInfo();
100 if (eti ==
nullptr) {
101 return SG::null_auxid;
104 }
catch (
const std::runtime_error&) {
105 return SG::null_auxid;
◆ getAuxIDs()
Definition at line 112 of file AuxDiscoverySvc.cxx.
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) {
◆ getAuxStore()
bool AuxDiscoverySvc::getAuxStore |
( |
void * |
obj, |
|
|
const Guid & |
classId, |
|
|
const std::string & |
contId |
|
) |
| |
Definition at line 39 of file AuxDiscoverySvc.cxx.
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) {
◆ getData()
◆ getElemName()
std::string AuxDiscoverySvc::getElemName |
( |
SG::auxid_t |
auxid | ) |
|
◆ getType()
◆ getTypeName()
std::string AuxDiscoverySvc::getTypeName |
( |
SG::auxid_t |
auxid | ) |
|
◆ receiveStore()
Receive dynamic aux store variables from streaming tool.
Definition at line 162 of file AuxDiscoverySvc.cxx.
166 while (
sc.isRecoverable() && nbytes > 0) {
169 if (!
sc.isSuccess() || nbytes == 0) {
170 return(StatusCode::SUCCESS);
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);
190 if (auxid != SG::null_auxid) {
192 void* dynAttr =
nullptr;
193 if (
type.IsFundamental()) {
194 dynAttr =
new char[nbytes];
205 return(StatusCode::SUCCESS);
◆ sendStore()
Send dynamic aux store variables to streaming tool.
Definition at line 208 of file AuxDiscoverySvc.cxx.
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);
235 if (
type.IsFundamental()) {
243 if (!
sc.isSuccess()) {
244 return(StatusCode::FAILURE);
247 return(StatusCode::SUCCESS);
◆ setAuxStore()
bool AuxDiscoverySvc::setAuxStore |
( |
| ) |
|
◆ setData()
◆ m_store
◆ m_storeHolder
◆ m_storeInt
The documentation for this class was generated from the following files:
void addVector(std::unique_ptr< IAuxTypeVector > vec, bool isDecoration)
Explicitly add a vector to the store.
char data[hepevt_bytes_allocation_ATLAS]
static const Guid & null()
NULL-Guid: static class method.
virtual AuxStoreType getStoreType() const =0
Return the type of the store object.
virtual const void * getData(SG::auxid_t auxid) const override
Return the data vector for one aux data item.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
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...
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
bool standalone() const
Return the standalone flag.
std::string getElemName(SG::auxid_t auxid)
std::string getAttrName(SG::auxid_t auxid)
const std::string toString() const
Automatic conversion to string representation.
std::vector< size_t > vec
virtual const std::type_info * getIOType(SG::auxid_t auxid) const =0
Return the type of the data to be stored for one aux data item.
bool setData(SG::auxid_t auxid, void *data, const RootType &type)
Interface providing I/O for a generic auxiliary store.
Handle mappings between names and auxid_t.
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
const void * getData(SG::auxid_t auxid)
size_t auxid_t
Identifier for a particular aux data item.
virtual void * serialize(const void *object, const std::string &name, size_t &nbytes) const =0
const SG::IAuxStoreIO * m_store
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.
std::string getTypeName(SG::auxid_t auxid) const
Return the type name of an aux data item.
static DbTypeInfo * create(const std::string &cl_name)
Create type information using name.
SG::IAuxStoreHolder * m_storeHolder
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual SG::auxid_set_t getSelectedAuxIDs() const
Get a list of dynamic variables that need to be written out.
AthenaPoolAuxStore * m_storeInt
bool empty() const
Return true if there are no 1 bits in the set.
SG::auxid_t getAuxID(const std::string &attrName, const std::string &elemName, const std::string &typeName)
virtual void setStore(IAuxStore *store)=0
Give an auxiliary store object to the holder object.
virtual const void * getIOData(SG::auxid_t auxid) const =0
Return a pointer to the data to be stored for one aux data item.
virtual void * deserialize(void *buffer, size_t &nbytes, const std::string &name) const =0
bool getAuxStore(void *obj, const Guid &classId, const std::string &contId)
const std::type_info * getType(SG::auxid_t auxid)
Make an AuxVectorData object from either a raw array or an aux store.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
const Guid & fromString(const std::string &s)
Automatic conversion from string representation.
A set of aux data identifiers.
@ AST_ObjectStore
The store describes a single object.
SG::auxid_set_t getAuxIDs(const void *obj, const Guid &classId, const std::string &contId)
Interface for objects taking part in direct ROOT I/O.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
std::string getTypeName(SG::auxid_t auxid)