| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 long | setCompression (const std::string &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 43 of file RootDataConnection.h.

## Member Typedef Documentation

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

Type definition for string maps.

Definition at line 52 of file RootDataConnection.h.

## Constructor & Destructor Documentation

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

Standard constructor.

## Member Function Documentation

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

Access to global compression level.

Global compression level.

Definition at line 125 of file RootDataConnection.cpp.

125 {
126 return s_compressionLevel;
127 }

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

Retrieve incident service.

Definition at line 81 of file RootDataConnection.h.

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

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

Retrieve message service.

Definition at line 76 of file RootDataConnection.h.

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

long RootConnectionSetup::setCompression | ( | const std::string & | compression | ) |
| static

Set the global compression level.

Definition at line 93 of file RootDataConnection.cpp.

93 {
94 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,33,0)
95 int res = 0, level = ROOT::CompressionSettings(ROOT::kLZMA,6);
96 auto idx = compression.find(':');
97 if ( idx != string::npos ) {
98 string alg = compression.substr(0,idx);
99 ROOT::ECompressionAlgorithm alg_code = ROOT::kUseGlobalSetting;
100 if ( strcasecmp(alg.c_str(),"ZLIB") == 0 )
101 alg_code = ROOT::kZLIB;
102 else if ( strcasecmp(alg.c_str(),"LZMA") == 0 )
103 alg_code = ROOT::kLZMA;
104 else
105 throw runtime_error("ERROR: request to set unknown ROOT compression algorithm:"+alg);
106 res = ::sscanf(compression.c_str()+idx+1,"%d",&level);
107 if ( res == 1 ) {
108 s_compressionLevel = ROOT::CompressionSettings(alg_code,level);
109 return StatusCode::SUCCESS;
110 }
111 throw runtime_error("ERROR: request to set unknown ROOT compression level:"+compression.substr(idx+1));
112 }
113 else if ( 1==::sscanf(compression.c_str(),"%d",&level) ) {
114 s_compressionLevel = level;
115 return StatusCode::SUCCESS;
116 }
117 throw runtime_error("ERROR: request to set unknown ROOT compression mechanism:"+compression);
118 #else
119 if ( !compression.empty() ) {}
120 return StatusCode::SUCCESS;
121 #endif
122 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
std::string::empty
T empty(T...args)
std::sscanf
T sscanf(T...args)
std::runtime_error
STL class.
std::string::find
T find(T...args)
std::string::c_str
T c_str(T...args)
std::string::substr
T substr(T...args)
gaudirun.level
level
Definition: gaudirun.py:261

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

Set incident service reference.

Definition at line 136 of file RootDataConnection.cpp.

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

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

Set message service reference.

Definition at line 131 of file RootDataConnection.cpp.

131 {
132 m_msgSvc.reset(m);
133 }
Gaudi::RootConnectionSetup::m_msgSvc
std::unique_ptr< MsgStream > m_msgSvc
Reference to message service.
Definition: RootDataConnection.h:46
std::unique_ptr::reset
T reset(T...args)

## Member Data Documentation

StringVec Gaudi::RootConnectionSetup::cacheBranches

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

Definition at line 55 of file RootDataConnection.h.

int Gaudi::RootConnectionSetup::cacheSize

RootCnvSvc Property: Root data cache size.

Definition at line 61 of file RootDataConnection.h.

int Gaudi::RootConnectionSetup::learnEntries

RootCnvSvc Property: ROOT cache learn entries.

Definition at line 63 of file RootDataConnection.h.

std::string Gaudi::RootConnectionSetup::loadSection

RootCnvSvc Property: Root data cache size.

Definition at line 59 of file RootDataConnection.h.

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

Reference to incident service.

Definition at line 48 of file RootDataConnection.h.

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

Reference to message service.

Definition at line 46 of file RootDataConnection.h.

StringVec Gaudi::RootConnectionSetup::vetoBranches

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

Definition at line 57 of file RootDataConnection.h.

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

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