21 using namespace Gaudi;
42 if (
objType() == CLID_StatisticsDirectory ) {
43 dsc =
"Directory containing statistics results.";
44 }
else if (
objType() == CLID_StatisticsFile ) {
45 dsc =
"File containing statistics results.";
75 TBranch* b = con->
getBranch(
"##Descriptors",
"GaudiStatisticsDescription" );
77 for ( Long64_t
n = b->GetEntries(), i = 0; i <
n; ++i ) {
79 b->SetAddress( &
ref );
80 int nb = b->GetEntry( i );
83 log() <<
MSG::VERBOSE <<
"Read description:" <<
ref->container <<
" " << ident <<
" " << cntName
87 if (
ref->container.
find(
'/', cntName.
length() + 1 ) == string::npos ) {
88 refs.push_back(
ref );
100 for (
auto&
ref : refs ) {
104 [&]( Leaves::const_reference j ) {
return containerName( j ) ==
ref->container; } );
107 if (
ref->clid == CLID_StatisticsDirectory ||
ref->clid == CLID_StatisticsFile ||
108 ref->clid == CLID_RowWiseTuple ||
ref->clid == CLID_ColumnWiseTuple ) {
109 string spar[] = {fname,
ref->container};
110 unsigned long ipar[] = {~0x0UL, ~0x0UL};
115 string leaf_name = top +
ref->container.
substr( 7 );
121 makeError(
"Failed to register leaves to directory:" + ident,
false ).
ignore();
124 makeError(
"Failed to create leave address to directory:" + ident,
false ).
ignore();
128 makeError(
"Failed to add leaves to directory:" + ident,
false ).
ignore();
133 return makeError(
"Failed to access required tuple data description.",
false );
137 for (
auto&
ref : refs )
delete ref;
StatusCode makeError(const std::string &msg, bool throw_exception=false) const
Helper method to issue error messages.
TBranch * getBranch(std::string_view section, std::string_view branch_name)
Access data branch by name: Get existing branch in read only mode.
virtual StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &refLeaves)=0
Explore the object store: retrieve all leaves attached to the object The object is identified by its ...
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
RootDirectoryCnv(long typ, const CLID &clid, ISvcLocator *svc, RootCnvSvc *mgr)
Initializing Constructor.
IRegistry * registry() const
Get pointer to Registry.
virtual StatusCode registerAddress(std::string_view fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.
virtual const std::string topLevel(IRegistry *pReg) const
Retrieve the full path of the file a given object is placed into.
StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress) override
IAddressCreator implementation: Address creation.
RootCnvSvc * m_dbMgr
Conversion service needed for proper operation to forward requests.
StatusCode updateRepRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Update references of persistent object representation.
constexpr static const auto SUCCESS
StatusCode connectDatabase(const std::string &dataset, int mode, RootDataConnection **con)
Connect the output file to the service with open mode.
virtual const std::string fileName(IRegistry *pReg) const
Retrieve the name of the file a given object is placed into.
StatusCode fillObjRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Resolve the references of the transient object.
SmartIF< IDataManagerSvc > m_dataMgr
Reference to data manager service to manipulate the TES.
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Converter overrides: Convert the transient object to the requested representation.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Converter overrides: Create transient object from persistent data.
virtual IRegistry * registry() const =0
Update branch name.
This class is used for returning status codes from appropriate routines.
StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Update transient object from persistent data.
MsgStream & log() const
Helper to use mesage logger.
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.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
long repSvcType() const override
Retrieve the class type of the data store the converter uses.
unsigned int CLID
Class ID definition.
StatusCode fillRepRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Fill references of persistent object representation.
const long POOL_StorageType
Description: NTuple directory converter class definition Definition of the converter to manage the di...
const StatusCode & ignore() const
Ignore/check StatusCode.
StatusCode updateObjRefs(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Update the references of an updated transient object.
constexpr static const auto FAILURE
Small class representing an N tuple directory in the transient store.
#define DECLARE_COMPONENT_WITH_ID(type, id)
virtual const id_type & identifier() const =0
Full identifier (or key)
StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj) override
Converter overrides: Update persistent object representation.
Opaque address interface definition.
Description: Base class converter for N-tuples and related classes.
virtual const std::string containerName(IRegistry *pDir) const
Retrieve the name of the container a given object is placed into.
A DataObject is the base class of any identifiable object on any data store.
Concrete implementation of the IDataConnection interface to access ROOT files.
Header file for std:chrono::duration-based Counters.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
const CLID & objType() const override
Retrieve the class type of objects the converter produces.