| The Gaudi Framework v32r1 (f65d50dc)

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
Gaudi::RootConnectionSetup Class Referencefinal

`#include <RootCnv/RootDataConnection.h>`

Collaboration diagram for Gaudi::RootConnectionSetup:
[legend]

## Public Types
typedef std::vector< std::string > | StringVec
| Type definition for string maps. More...

## Public Member Functions
| RootConnectionSetup ()=default
| Standard constructor. More...
void | setMessageSvc (MsgStream *m)
| Set message service reference. More...
MsgStream & | msgSvc () const
| Retrieve message service. More...
void | setIncidentSvc (IIncidentSvc *m)
| Set incident service reference. More...
IIncidentSvc * | incidentSvc () const
| Retrieve incident service. More...

## Static Public Member Functions
static StatusCode | setCompression (std::string_view compression)
| Set the global compression level. More...
static int | compression ()
| Access to global compression level. More...

## Public Attributes
StringVec | cacheBranches
| Vector of strings with branches to be cached for input files. More...
StringVec | vetoBranches
| Vector of strings with branches to NOT be cached for input files. More...
std::string | loadSection
| RootCnvSvc Property: Root data cache size. More...
int | cacheSize
| RootCnvSvc Property: Root data cache size. More...
int | learnEntries
| RootCnvSvc Property: ROOT cache learn entries. More...

## Private Attributes
std::unique_ptr< MsgStream > | m_msgSvc
| Reference to message service. More...
SmartIF< IIncidentSvc > | m_incidentSvc = nullptr
| Reference to incident service. More...

## Detailed Description

Definition at line 44 of file RootDataConnection.h.

## Member Typedef Documentation

## ◆ StringVec

typedef std::vector<std::string> Gaudi::RootConnectionSetup::StringVec

Type definition for string maps.

Definition at line 53 of file RootDataConnection.h.

## Constructor & Destructor Documentation

## ◆ RootConnectionSetup()

Gaudi::RootConnectionSetup::RootConnectionSetup | ( |  | ) |
| default

Standard constructor.

## Member Function Documentation

## ◆ compression()

int RootConnectionSetup::compression | ( |  | ) |
| static

Access to global compression level.

Global compression level.

Definition at line 144 of file RootDataConnection.cpp.

144 { return s_compressionLevel; }

## ◆ incidentSvc()

IIncidentSvc* Gaudi::RootConnectionSetup::incidentSvc | ( |  | ) | const
| inline

Retrieve incident service.

Definition at line 82 of file RootDataConnection.h.

82 { return m_incidentSvc.get(); }
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
Gaudi::RootConnectionSetup::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
Definition: RootDataConnection.h:49

## ◆ msgSvc()

MsgStream& Gaudi::RootConnectionSetup::msgSvc | ( |  | ) | const
| inline

Retrieve message service.

Definition at line 77 of file RootDataConnection.h.

77 { return *m_msgSvc; }
Gaudi::RootConnectionSetup::m_msgSvc
std::unique_ptr< MsgStream > m_msgSvc
Reference to message service.
Definition: RootDataConnection.h:47

## ◆ setCompression()

StatusCode RootConnectionSetup::setCompression | ( | std::string_view | compression | ) |
| static

Set the global compression level.

Definition at line 110 of file RootDataConnection.cpp.

110 {
111 #if ROOT_VERSION_CODE >= ROOT_VERSION( 5, 33, 0 )
112 int res = 0, level = ROOT::CompressionSettings( ROOT::kLZMA, 6 );
113 auto idx = compression.find( ':' );
114 if ( idx != string::npos ) {
115 auto alg = compression.substr( 0, idx );
116 ROOT::ECompressionAlgorithm alg_code = ROOT::kUseGlobalSetting;
117 if ( alg.size() == 4 && strncasecmp( alg.data(), "ZLIB", 4 ) == 0 )
118 alg_code = ROOT::kZLIB;
119 else if ( alg.size() == 4 && strncasecmp( alg.data(), "LZMA", 4 ) == 0 )
120 alg_code = ROOT::kLZMA;
121 else
122 throw runtime_error( "ERROR: request to set unknown ROOT compression algorithm:" + std::string{alg} );
123 res = ::sscanf( std::string{compression.substr( idx + 1 )}.c_str(), "%d",
124 &level ); // TODO: use C++17 std::from_chars instead...
125 if ( res == 1 ) {
126 s_compressionLevel = ROOT::CompressionSettings( alg_code, level );
127 return StatusCode::SUCCESS;
128 }
129 throw runtime_error( "ERROR: request to set unknown ROOT compression level:" +
130 std::string{compression.substr( idx + 1 )} );
131 } else if ( 1 == ::sscanf( std::string{compression}.c_str(), "%d", &level ) ) { // TODO: use C++17 std::from_chars
132 // instead
133 s_compressionLevel = level;
134 return StatusCode::SUCCESS;
135 }
136 throw runtime_error( "ERROR: request to set unknown ROOT compression mechanism:" + std::string{compression} );
137 #else
138 if ( !compression.empty() ) {}
139 return StatusCode::SUCCESS;
140 #endif
141 }
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
std::sscanf
T sscanf(T... args)
Gaudi::RootConnectionSetup::compression
static int compression()
Access to global compression level.
Definition: RootDataConnection.cpp:144
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
std::string
STL class.
std::runtime_error
STL class.
gaudirun.level
level
Definition: gaudirun.py:334

## ◆ setIncidentSvc()

void RootConnectionSetup::setIncidentSvc | ( | IIncidentSvc * | m | ) |

Set incident service reference.

Definition at line 150 of file RootDataConnection.cpp.

150 { m_incidentSvc.reset( s ); }
Gaudi::RootConnectionSetup::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
Definition: RootDataConnection.h:49
gaudirun.s
string s
Definition: gaudirun.py:316
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:86

## ◆ setMessageSvc()

void RootConnectionSetup::setMessageSvc | ( | MsgStream * | m | ) |

Set message service reference.

Definition at line 147 of file RootDataConnection.cpp.

147 { m_msgSvc.reset( m ); }
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:92
Gaudi::RootConnectionSetup::m_msgSvc
std::unique_ptr< MsgStream > m_msgSvc
Reference to message service.
Definition: RootDataConnection.h:47
std::unique_ptr::reset
T reset(T... args)

## Member Data Documentation

## ◆ cacheBranches

StringVec Gaudi::RootConnectionSetup::cacheBranches

Vector of strings with branches to be cached for input files.

Definition at line 56 of file RootDataConnection.h.

## ◆ cacheSize

int Gaudi::RootConnectionSetup::cacheSize

RootCnvSvc Property: Root data cache size.

Definition at line 62 of file RootDataConnection.h.

## ◆ learnEntries

int Gaudi::RootConnectionSetup::learnEntries

RootCnvSvc Property: ROOT cache learn entries.

Definition at line 64 of file RootDataConnection.h.

## ◆ loadSection

std::string Gaudi::RootConnectionSetup::loadSection

RootCnvSvc Property: Root data cache size.

Definition at line 60 of file RootDataConnection.h.

## ◆ m_incidentSvc

SmartIF<IIncidentSvc> Gaudi::RootConnectionSetup::m_incidentSvc = nullptr
| private

Reference to incident service.

Definition at line 49 of file RootDataConnection.h.

## ◆ m_msgSvc

std::unique_ptr<MsgStream> Gaudi::RootConnectionSetup::m_msgSvc
| private

Reference to message service.

Definition at line 47 of file RootDataConnection.h.

## ◆ vetoBranches

StringVec Gaudi::RootConnectionSetup::vetoBranches

Vector of strings with branches to NOT be cached for input files.

Definition at line 58 of file RootDataConnection.h.

The documentation for this class was generated from the following files:

- RootCnv/RootCnv/RootDataConnection.h
- RootCnv/src/RootDataConnection.cpp