Go to the documentation of this file.
43 if ( optsSvc.has(
"RFileCnv.GlobalCompression" ) ) {
64 unsigned long* ipar = (
unsigned long*)pAddress->
ipar();
65 char mode[2] = { char( ipar[1] ), 0 };
76 static TROOT
root(
"root",
"ROOT I/O" );
84 if ( mode[0] ==
'O' ) {
86 if ( findTFile( ooname, rfile ).isFailure() ) {
90 rfile = TFile::Open( fname.
c_str(),
"READ" );
91 if ( rfile && rfile->IsOpen() ) {
92 regTFile( ooname, rfile ).ignore();
94 ipar[0] = (
unsigned long)rfile;
111 }
else if ( mode[0] ==
'U' ) {
118 }
else if ( mode[0] ==
'N' ) {
120 log <<
MSG::INFO <<
"opening Root file \"" << fname <<
"\" for writing";
121 if ( !m_compLevel.empty() ) {
log <<
", CompressionLevel='" << m_compLevel <<
"'"; }
124 rfile = TFile::Open( fname.c_str(),
"RECREATE",
"Gaudi Trees" );
125 if ( !( rfile && rfile->IsOpen() ) ) {
129 if ( !m_compLevel.empty() ) {
131 rfile->SetCompressionSettings( settings.
level() );
134 regTFile( ooname, rfile ).ignore();
139 ipar[0] = (
unsigned long)rfile;
170 if ( pFile && pFile->
isOpen() ) {
172 unsigned long* ipar = (
unsigned long*)pAddress->
ipar();
173 if ( findTFile( ooname, rfile ).isFailure() ) {
178 rfile->Write(
nullptr, TObject::kOverwrite );
190 mds = serviceLocator()->service(
"Gaudi::MetaDataSvc",
false );
StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject) override
Convert the transient object to the requested representation.
Small class representing an N tuple file in the transient store.
virtual const std::string * par() const =0
Retrieve String parameters.
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
StatusCode parse(GaudiUtils::HashMap< K, V > &result, std::string_view input)
Basic parser for the types of HashMap used in DODBasicMapper.
StatusCode initialize() override
Initialise.
#define DECLARE_CONVERTER(x)
SmartIF< IIncidentSvc > m_incSvc
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Convert the transient object to the requested representation.
StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Create the transient representation of an object.
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
std::string m_compLevel
Compression setting, property RFileCnv.GlobalCompression.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
constexpr static const auto SUCCESS
StatusCode service(const std::string &name, T *&psvc, bool createIf=false) const
Access a service by name, creating it if it doesn't already exist.
void setOpen(bool flag)
Set "open" flag.
bool isOpen() const
Access "open" flag.
int level() const
Get the level.
StatusCode initialize() override
Initialize the converter.
SmartIF< IMessageSvc > & msgSvc() const
Retrieve pointer to message service.
constexpr static const auto FAILURE
IRegistry * registry() const
Get pointer to Registry.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.