52 if (
objType() == CLID_StatisticsDirectory ) {
53 dsc =
"Directory containing statistics results.";
54 }
else if (
objType() == CLID_StatisticsFile ) {
55 dsc =
"File containing statistics results.";
71 typedef vector<RootNTupleDescriptor*> REFS;
77 typedef vector<IRegistry*> Leaves;
85 TBranch* b = con->
getBranch(
"##Descriptors",
"GaudiStatisticsDescription" );
87 for ( Long64_t n = b->GetEntries(), i = 0; i < n; ++i ) {
89 b->SetAddress( &ref );
90 int nb = b->GetEntry( i );
92 string s = ref->container.substr( 0, cntName.length() );
93 log() <<
MSG::VERBOSE <<
"Read description:" << ref->container <<
" " << ident <<
" " << cntName
96 if ( ref->container.length() >= cntName.length() + 1 ) {
97 if ( ref->container.find(
'/', cntName.length() + 1 ) == string::npos ) {
98 refs.push_back( ref );
108 status =
m_dataMgr->objectLeaves( pObject, leaves );
110 for (
auto& ref : refs ) {
113 std::none_of( std::begin( leaves ), std::end( leaves ),
114 [&]( Leaves::const_reference j ) {
return containerName( j ) == ref->container; } );
117 if ( ref->clid == CLID_StatisticsDirectory || ref->clid == CLID_StatisticsFile ||
118 ref->clid == CLID_RowWiseTuple || ref->clid == CLID_ColumnWiseTuple ) {
119 string spar[] = { fname, ref->container };
120 unsigned long ipar[] = { ~0x0UL, ~0x0UL };
125 string leaf_name = top + ref->container.substr( 7 );
126 status =
m_dataMgr->registerAddress( leaf_name, pA );
128 log() <<
MSG::DEBUG <<
"Created address for " << leaf_name <<
" of type " << ref->clid <<
endmsg;
131 makeError(
"Failed to register leaves to directory:" + ident,
false ).
ignore();
134 makeError(
"Failed to create leave address to directory:" + ident,
false ).
ignore();
138 makeError(
"Failed to add leaves to directory:" + ident,
false ).
ignore();
143 return makeError(
"Failed to access required tuple data description.",
false );
147 for (
auto& ref : refs )
delete ref;
const long POOL_StorageType
unsigned int CLID
Class ID definition.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT_WITH_ID(type, id)
const CLID & objType() const override
Retrieve the class type of objects the converter produces.
A DataObject is the base class of any identifiable object on any data store.
IRegistry * registry() const
Get pointer to Registry.
RootCnvSvc * m_dbMgr
Conversion service needed for proper operation to forward requests.
long repSvcType() const override
Retrieve the class type of the data store the converter uses.
Concrete implementation of the IDataConnection interface to access ROOT files.
TBranch * getBranch(std::string_view section, std::string_view branch_name)
Access data branch by name: Get existing branch in read only mode.
Description: NTuple directory converter class definition Definition of the converter to manage the di...
StatusCode updateRepRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Update references of persistent object representation.
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Converter overrides: Convert the transient object to the requested representation.
StatusCode fillObjRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Resolve the references of the transient object.
StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Update transient object from persistent data.
RootDirectoryCnv(long typ, const CLID &clid, ISvcLocator *svc, RootCnvSvc *mgr)
Initializing Constructor.
StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Update persistent object representation.
StatusCode updateObjRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Update the references of an updated transient object.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Converter overrides: Create transient object from persistent data.
StatusCode fillRepRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Fill references of persistent object representation.
StatusCode saveDescription(const std::string &path, const std::string &ident, const std::string &desc, const std::string &opt, const CLID &clid)
Save statistics object description.
virtual const std::string fileName(IRegistry *pReg) const
Retrieve the name of the file a given object is placed into.
StatusCode makeError(const std::string &msg, bool throw_exception=false) const
Helper method to issue error messages.
MsgStream & log() const
Helper to use mesage logger.
SmartIF< IDataManagerSvc > m_dataMgr
Reference to data manager service to manipulate the TES.
RootStatCnv(long typ, const CLID &clid, ISvcLocator *svc, RootCnvSvc *mgr)
Initializing Constructor.
virtual const std::string topLevel(IRegistry *pReg) const
Retrieve the full path of the file a given object is placed into.
virtual const std::string containerName(IRegistry *pDir) const
Retrieve the name of the container a given object is placed into.
Opaque address interface definition.
virtual IRegistry * registry() const =0
Update branch name.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
virtual const id_type & identifier() const =0
Full identifier (or key)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Small class representing an N tuple directory in the transient store.