Go to the documentation of this file.
42 if ( optsSvc.has(
"RFileCnv.GlobalCompression" ) ) {
56 unsigned long* ipar = (
unsigned long*)pAddress->
ipar();
57 char mode[2] = { char( ipar[1] ), 0 };
68 static TROOT
root(
"root",
"ROOT I/O" );
76 if ( mode[0] ==
'O' ) {
78 if ( findTFile( ooname, rfile ).isFailure() ) {
82 rfile = TFile::Open( fname.
c_str(),
"READ" );
83 if ( rfile && rfile->IsOpen() ) {
84 regTFile( ooname, rfile ).ignore();
86 ipar[0] = (
unsigned long)rfile;
103 }
else if ( mode[0] ==
'U' ) {
110 }
else if ( mode[0] ==
'N' ) {
112 log <<
MSG::INFO <<
"opening Root file \"" << fname <<
"\" for writing";
113 if ( !m_compLevel.empty() ) {
log <<
", CompressionLevel='" << m_compLevel <<
"'"; }
116 rfile = TFile::Open( fname.c_str(),
"RECREATE",
"Gaudi Trees" );
117 if ( !( rfile && rfile->IsOpen() ) ) {
121 if ( !m_compLevel.empty() ) {
123 rfile->SetCompressionSettings( settings.
level() );
126 regTFile( ooname, rfile ).ignore();
130 ipar[0] = (
unsigned long)rfile;
161 if ( pFile && pFile->
isOpen() ) {
163 unsigned long* ipar = (
unsigned long*)pAddress->
ipar();
164 if ( findTFile( ooname, rfile ).isFailure() ) {
169 rfile->Write(
nullptr, TObject::kOverwrite );
181 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 initialize() override
Initialise.
long
(c) Copyright 1998-2020 CERN for the benefit of the LHCb and ATLAS collaborations # # This software i...
#define DECLARE_CONVERTER(x)
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 parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
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.
constexpr static const auto FAILURE
IRegistry * registry() const
Get pointer to Registry.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.