22 using namespace Gaudi;
49 if (
objType() == CLID_StatisticsDirectory ) {
50 dsc =
"Directory containing statistics results.";
52 else if (
objType() == CLID_StatisticsFile ) {
53 dsc =
"File containing statistics results.";
73 typedef vector<RootNTupleDescriptor*> REFS;
79 typedef vector<IRegistry*> Leaves;
87 TBranch* b = con->
getBranch(
"##Descriptors",
"GaudiStatisticsDescription");
89 for(Long64_t
n=b->GetEntries(),
i=0;
i<
n; ++
i) {
92 int nb = b->GetEntry(
i);
94 string s = ref->
container.substr(0,cntName.length());
96 <<
" " << ident <<
" " << cntName <<
endmsg;
98 if ( ref->
container.length() >= cntName.length()+1 ) {
99 if ( ref->
container.find(
'/',cntName.length()+1) == string::npos ) {
112 for(REFS::iterator
i = refs.begin();
i != refs.end(); ++
i) {
113 REFS::value_type& ref = *
i;
115 bool need_to_add =
true;
116 for(Leaves::iterator j=leaves.begin(); j != leaves.end(); ++j ) {
118 if ( curr_leaf == ref->container ) {
125 if ( ref->clid == CLID_StatisticsDirectory ||
126 ref->clid == CLID_StatisticsFile ||
127 ref->clid == CLID_RowWiseTuple ||
128 ref->clid == CLID_ColumnWiseTuple )
130 string spar[] = { fname, ref->container};
131 unsigned long ipar[] = { ~0x0UL, ~0x0UL };
140 string leaf_name = top + ref->container.substr(7);
144 <<
" of type " << ref->clid <<
endmsg;
147 makeError(
"Failed to register leaves to directory:"+ident,
false).
ignore();
150 makeError(
"Failed to create leave address to directory:"+ident,
false).
ignore();
160 return makeError(
"Failed to access required tuple data description.",
false);
164 for(REFS::iterator k = refs.begin(); k != refs.end(); ++k) {
165 if ( *k )
delete (*k);
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr)
Converter overrides: Convert the transient object to the requested representation.
MsgStream & log() const
Helper to use mesage logger.
#define DECLARE_COMPONENT_WITH_ID(type, id)
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.
virtual const std::string topLevel(IRegistry *pReg) const
Retrieve the full path of the file a given object is placed into.
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
IAddressCreator implementation: Address creation.
bool isSuccess() const
Test for a status code of SUCCESS.
RootCnvSvc * m_dbMgr
Conversion service needed for proper operation to forward requests.
StatusCode makeError(const std::string &msg, bool throw_exception=false) const
Helper method to issue error messages.
StatusCode connectDatabase(const std::string &dataset, int mode, RootDataConnection **con)
Connect the output file to the service with open mode.
virtual StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj)
Converter overrides: Update persistent object representation.
IRegistry * registry() const
Get pointer to Registry.
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddr, DataObject *pObj)
Converter overrides: Fill references of persistent object representation.
virtual const CLID & objType() const
Retrieve the class type of objects the converter produces.
virtual IRegistry * registry() const =0
Update branch name.
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddr, DataObject *pObj)
Converter overrides: Resolve the references of the transient object.
This class is used for returning status codes from appropriate routines.
virtual const std::string fileName(IRegistry *pReg) const
Retrieve the name of the file a given object is placed into.
virtual StatusCode updateObjRefs(IOpaqueAddress *pAddr, DataObject *pObj)
Converter overrides: Update the references of an updated transient object.
TBranch * getBranch(const std::string §ion, const std::string &branch_name)
Access data branch by name: Get existing branch in read only mode.
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 long repSvcType() const
Retrieve the class type of the data store the converter uses.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
unsigned int CLID
Class ID definition.
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
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 ...
const long POOL_StorageType
Description: NTuple directory converter class definition Definition of the converter to manage the di...
virtual StatusCode updateRepRefs(IOpaqueAddress *pAddr, DataObject *pObj)
Converter overrides: Update references of persistent object representation.
std::string container
Identifier of description.
virtual StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *pObj)
Converter overrides: Update transient object from persistent data.
virtual const id_type & identifier() const =0
Full identifier (or key)
virtual StatusCode registerAddress(const std::string &fullPath, IOpaqueAddress *pAddress)=0
Register object address with the data store.
Opaque address interface definition.
This is a number of static methods for bootstrapping the Gaudi framework.
virtual const std::string containerName(IRegistry *pDir) const
Retrieve the name of the container a given object is placed into.
Description: Base class converter for N-tuples and related classes.
A DataObject is the base class of any identifiable object on any data store.
Small class representing an N tuple directory in the transient store.
Concrete implementation of the IDataConnection interface to access ROOT files.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
IDataManagerSvc * m_dataMgr
Reference to data manager service to manipulate the TES.
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj)
Converter overrides: Create transient object from persistent data.