Skip to content
Snippets Groups Projects
Commit 235b0d46 authored by Scott Snyder's avatar Scott Snyder Committed by scott snyder
Browse files

StoreGateBindings: Make sure BaseInfo is initialized for recorded objects.

When we record an object, make sure that the BaseInfo for that object
is properly initialized.  This mirrors what's done in StoreGateSvc::record(),
and is needed to avoid auto-symlink warnings for objects recorded only
via python.


Former-commit-id: bd1811bd
parent 446ec9a1
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ extern CLID PyCLID;
#include "TClassEdit.h"
#include "TClassRef.h"
#include "TROOT.h"
#include "TMethod.h"
#include "TMethodCall.h"
// PyROOT includes
#include "AthenaPyRoot.h"
......@@ -329,6 +331,18 @@ namespace SG {
::cxx_replace(tname, "basic_string<char> >", "string>");
::cxx_replace(tname, "basic_string<char>", "string");
m_clidMap[id] = tname;
// Try to make sure the BIB is initialized.
std::string bibname = "SG::BaseInfo<" + tname + ">";
TClass* bibcl = gROOT->GetClass (bibname.c_str());
if (bibcl) {
TMethod* m = bibcl->GetMethodAny ("baseinfo");
if (m) {
TMethodCall call (m);
call.Execute();
}
}
return m_clidMap[id].c_str();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment