|
ATLAS Offline Software
|
This class provides the interface to the ROOT software.
More...
#include <RootSvc.h>
This class provides the interface to the ROOT software.
Definition at line 39 of file RootSvc.h.
◆ ConnMap_t
◆ RootSvc() [1/3]
Athena::RootSvc::RootSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Standard Service Constructor.
Definition at line 27 of file RootSvc.cxx.
28 base_class(
name, pSvcLocator),
◆ ~RootSvc()
Athena::RootSvc::~RootSvc |
( |
| ) |
|
|
virtual |
Destructor.
Definition at line 35 of file RootSvc.cxx.
37 delete itr->second; itr->second = 0;
◆ RootSvc() [2/3]
Athena::RootSvc::RootSvc |
( |
| ) |
|
|
private |
◆ RootSvc() [3/3]
◆ commitOutput()
StatusCode Athena::RootSvc::commitOutput |
( |
| ) |
|
Commit data and flush buffer.
Definition at line 156 of file RootSvc.cxx.
160 return StatusCode::FAILURE;
164 return StatusCode::FAILURE;
166 return StatusCode::SUCCESS;
◆ connect()
StatusCode Athena::RootSvc::connect |
( |
const std::string & |
fname | ) |
|
Connect the file fname
to the service.
Definition at line 141 of file RootSvc.cxx.
146 return StatusCode::FAILURE;
148 if (!
conn->connectWrite(
"recreate").isSuccess()) {
150 return StatusCode::FAILURE;
153 return StatusCode::SUCCESS;
◆ connection()
Get the RootConnection associated with file fname
- Returns
- NULL if no such file is known to this service
Definition at line 189 of file RootSvc.cxx.
193 std::string fidString, ftype;
195 if( fidString.empty() ) {
201 ConnMap_t::const_iterator fitr =
m_conns.find(fid);
◆ createObject()
void * Athena::RootSvc::createObject |
( |
const RootType & |
type | ) |
const |
Create an object of a given RootType
.
Definition at line 104 of file RootSvc.cxx.
105 void* pObj =
type.Construct();
◆ destructObject()
void Athena::RootSvc::destructObject |
( |
const RootType & |
type, |
|
|
void * |
pObj |
|
) |
| const |
Destruct a given object of type RootType
.
Definition at line 110 of file RootSvc.cxx.
◆ disconnect()
StatusCode Athena::RootSvc::disconnect |
( |
const std::string & |
fname | ) |
|
Disconnect the file fname
from the service.
Definition at line 170 of file RootSvc.cxx.
175 return StatusCode::FAILURE;
177 if (!
conn->disconnect().isSuccess()) {
179 return StatusCode::FAILURE;
184 return StatusCode::SUCCESS;
◆ finalize()
StatusCode Athena::RootSvc::finalize |
( |
| ) |
|
Definition at line 61 of file RootSvc.cxx.
62 for (ConnMap_t::const_iterator itr =
m_conns.begin(), iend =
m_conns.end(); itr != iend; ++itr) {
63 if (!itr->second->disconnect().isSuccess()) {
◆ getType()
RootType Athena::RootSvc::getType |
( |
const std::type_info & |
type | ) |
const |
Load the type (dictionary) from Root.
RootType-base interface Load the type (dictionary) from Root.
Definition at line 75 of file RootSvc.cxx.
◆ initialize()
StatusCode Athena::RootSvc::initialize |
( |
| ) |
|
Gaudi Service Interface method implementations:
Definition at line 42 of file RootSvc.cxx.
46 return StatusCode::FAILURE;
55 return StatusCode::FAILURE;
58 return StatusCode::SUCCESS;
◆ open()
StatusCode Athena::RootSvc::open |
( |
const std::string & |
fname, |
|
|
const std::string & |
mode |
|
) |
| |
Open the file fname
with open mode mode
Definition at line 114 of file RootSvc.cxx.
118 std::string fidString, ftype;
120 if( fidString.empty() ) {
126 ConnMap_t::const_iterator fitr =
m_conns.find(fid);
135 return StatusCode::FAILURE;
137 return StatusCode::SUCCESS;
◆ operator=()
◆ readObject()
void * Athena::RootSvc::readObject |
( |
const Token & |
token, |
|
|
void *& |
pObj |
|
) |
| |
◆ writeObject()
Write object of a given class to Root.
Definition at line 85 of file RootSvc.cxx.
95 unsigned long ientry = 0;
◆ m_catalog
◆ m_conns
Map of file name keys and connection values.
Definition at line 96 of file RootSvc.h.
◆ m_dictSvc
◆ m_wconn
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
This class provides the implementation of Athena::RootConnection class, similar to Gaudi IDataConnect...
static const Guid & null()
NULL-Guid: static class method.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
ServiceHandle< ::IDictLoaderSvc > m_dictSvc
ServiceHandle to the dictionary service.
void lookupFileByPFN(const std::string &pfn, std::string &fid, std::string &tech) const
Get FID and filetype for a given PFN.
const std::string & containerName() const
Access container name.
pool::IFileCatalog * m_catalog
ConnMap_t m_conns
Map of file name keys and connection values.
void registerPFN(const std::string &pfn, const std::string &ftype, std::string &fid)
Register PFN, assign new FID if not given.
StatusCode commit()
Commit data stream to ROOT.
const std::string toString() const
Automatic conversion to string representation.
void commit()
Save catalog to file.
#define ATH_MSG_VERBOSE(x)
This class provides a token that identifies in a unique way objects on the persistent storage.
StatusCode write(const void *data, unsigned long &len)
Write root byte buffer to output stream.
Athena::RootConnection * m_wconn
void start()
redirect to init() for Gaudi FC
void setWriteCatalog(const std::string &connect)
Access to the (first) writable file catalog.
Athena::RootConnection * connection(const std::string &fname)
Get the RootConnection associated with file fname
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
#define ATH_MSG_WARNING(x)
const Guid & fromString(const std::string &s)
Automatic conversion from string representation.
StatusCode setContainer(const std::string &container, const std::string &type)
Set the container name and type, creating TTree and TBranch as needed.