|
ATLAS Offline Software
|
Go to the documentation of this file.
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;
79 std::unique_ptr<SG::IAuxTypeVector>
vec(
registry.makeVectorFromData(auxid,
data,
nullptr,
false,
true));
96 if (auxid == SG::null_auxid &&
m_storeInt !=
nullptr) {
100 if (eti ==
nullptr) {
101 return SG::null_auxid;
104 }
catch (
const std::runtime_error&) {
105 return SG::null_auxid;
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) {
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);
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);
235 if (
type.IsFundamental()) {
243 if (!
sc.isSuccess()) {
244 return(StatusCode::FAILURE);
247 return(StatusCode::SUCCESS);
void addVector(std::unique_ptr< IAuxTypeVector > vec, bool isDecoration)
Explicitly add a vector to the store.
This file contains the class definition for the AuxDiscoverySvc class.
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.
Make an AuxVectorData object from either a raw vector or an aux store.
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.
const std::type_info * getTypeInfo() const
Return the type_info for the described type.
bool standalone() const
Return the standalone flag.
std::string getElemName(SG::auxid_t auxid)
std::string getAttrName(SG::auxid_t auxid)
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.
const std::string toString() const
Automatic conversion to string representation.
std::vector< size_t > vec
AuxStoreInternal(bool standalone=false)
Constructor.
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.
AthenaPoolAuxStore(bool standalone)
virtual void * serialize(const void *object, const std::string &name, size_t &nbytes) const =0
const SG::IAuxStoreIO * m_store
StatusCode receiveStore(const IAthenaSerializeSvc *serSvc, IAthenaIPCTool *ipcTool, void *obj, int num=0)
Receive dynamic aux store variables from streaming tool.
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
Interface providing I/O for a generic auxiliary store.
::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.
Find the auxid for a dynamic branch.
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)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
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)
An auxiliary data store that holds data internally.
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.
Handle mappings between names and auxid_t.
A set of aux data identifiers.
This file contains the class definition for the Guid class (migrated from POOL).
@ AST_ObjectStore
The store describes a single object.
SG::auxid_set_t getAuxIDs(const void *obj, const Guid &classId, const std::string &contId)
An auxiliary data store that holds data internally.
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)