21 using namespace Gaudi;
34 const unsigned long* ipars = pAddr->
ipar();
35 const string* spars = pAddr->
par();
36 char mode = char( ipars[1] );
37 string fname = spars[0];
38 auto oname = pReg->
name();
39 bool recrea = mode ==
'R';
40 bool create = mode ==
'N';
42 bool read = mode ==
'O';
48 status =
saveDescription( fname, cntName,
"File containing statistics results.",
"", clid );
50 log() <<
MSG::INFO <<
"Opened NEW Database file:" << fname <<
" as " << oname <<
endmsg;
52 }
else if ( update ) {
54 status =
saveDescription( fname, cntName,
"File containing statistics results.",
"", clid );
56 log() <<
MSG::INFO <<
"Connect to existing Database file:" << fname <<
" as " << oname <<
" for UPDATE" 62 log() <<
MSG::INFO <<
"Connect to existing Database file:" << fname <<
" as " << oname <<
" for READ" <<
endmsg;
64 }
else if ( recrea ) {
66 status =
saveDescription( fname, cntName,
"File containing statistics results.",
"", clid );
MsgStream & log() const
Helper to use mesage logger.
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.
constexpr static const auto SUCCESS
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.
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.
constexpr static const auto FAILURE
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.