21 using namespace Gaudi;
37 const unsigned long* ipars = pAddr->
ipar();
38 const string* spars = pAddr->
par();
39 char mode = char( ipars[1] );
40 string fname = spars[0];
41 auto oname = pReg->
name();
42 bool recrea = mode ==
'R';
43 bool create = mode ==
'N';
45 bool read = mode ==
'O';
51 status =
saveDescription( fname, cntName,
"File containing statistics results.",
"", clid );
53 log() <<
MSG::INFO <<
"Opened NEW Database file:" << fname <<
" as " << oname <<
endmsg;
55 }
else if ( update ) {
57 status =
saveDescription( fname, cntName,
"File containing statistics results.",
"", clid );
59 log() <<
MSG::INFO <<
"Connect to existing Database file:" << fname <<
" as " << oname <<
" for UPDATE" 65 log() <<
MSG::INFO <<
"Connect to existing Database file:" << fname <<
" as " << oname <<
" for READ" <<
endmsg;
67 }
else if ( recrea ) {
69 status =
saveDescription( fname, cntName,
"File containing statistics results.",
"", clid );
MsgStream & log() const
Helper to use mesage logger.
constexpr static const auto FAILURE
void setOpen(bool flag)
Set "open" flag.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const CLID & objType() const override
Retrieve the class type of objects the converter produces.
const std::string containerName(IRegistry *) const override
Retrieve the name of the container a given object is placed into.
RootCnvSvc * m_dbMgr
Conversion service needed for proper operation to forward requests.
virtual IRegistry * registry() const =0
Update branch name.
def read(f, regex='.*', skipevents=0)
virtual const name_type & name() const =0
Name of the directory (or key)
StatusCode connectDatabase(const std::string &dataset, int mode, RootDataConnection **con)
Connect the output file to the service with open mode.
virtual const std::string * par() const =0
Retrieve String parameters.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
This class is used for returning status codes from appropriate routines.
Statistics file converter class definition.
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...
const long ROOT_StorageType
unsigned int CLID
Class ID definition.
constexpr static const auto SUCCESS
Description: NTuple directory converter class definition Definition of the converter to manage the di...
const StatusCode & ignore() const
Ignore/check StatusCode.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Converter overrides: Create transient object from persistent data.
RootDatabaseCnv(long typ, const CLID &, ISvcLocator *svc, RootCnvSvc *mgr)
Initializing Constructor.
#define DECLARE_COMPONENT_WITH_ID(type, id)
Opaque address interface definition.
A DataObject is the base class of any identifiable object on any data store.
Concrete implementation of the IDataConnection interface to access ROOT files.
Helper functions to set/get the application return code.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Small class representing an N tuple file in the transient store.