| The Gaudi Framework v27r1

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

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

Public Member Functions | Private Attributes | List of all members
RootHistCnv::RootCompressionSettings Class Reference

Simple class to decode a ROOT compression settings string, of the form '<Alg>:<level>' into the integer code to pass to ROOT. More...

`#include <src/RootCompressionSettings.h>`

## Public Member Functions
| RootCompressionSettings (const std::string &settings)
| Standard constructor. More...
int | level () const
| Get the level. More...

## Private Attributes
int | m_level
| The cached ROOT compression level int. More...

## Detailed Description

Simple class to decode a ROOT compression settings string, of the form '<Alg>:<level>' into the integer code to pass to ROOT.

Author
  Chris Jones

Date
  2013-10-24

Definition at line 19 of file RootCompressionSettings.h.

## Constructor & Destructor Documentation

RootHistCnv::RootCompressionSettings::RootCompressionSettings | ( | const std::string & | settings | ) |

Standard constructor.

Definition at line 20 of file RootCompressionSettings.cpp.

21 : m_level ( ROOT::CompressionSettings(ROOT::kZLIB,1) )
22 {
23 const std::string::size_type idx = settings.find(':');
24 if ( idx != std::string::npos )
25 {
26 // Get compression algorithm type
27 const std::string alg = settings.substr(0,idx);
28 ROOT::ECompressionAlgorithm alg_code = ROOT::kUseGlobalSetting;
29 if ( alg == "ZLIB" ) { alg_code = ROOT::kZLIB; }
30 else if ( alg == "LZMA" ) { alg_code = ROOT::kLZMA; }
31 else
32 {
33 throw std::runtime_error("ERROR: Unknown ROOT compression algorithm:"+alg);
34 }
35
36 // get compression level
37 const std::string slev = settings.substr(idx+1);
38 const int ilev = std::stoi(slev);
39
40 // set the level
41 m_level = ROOT::CompressionSettings(alg_code,ilev);
42 }
43 }
std::string
STL class.
std::runtime_error
STL class.
std::string::find
T find(T...args)
std::string::substr
T substr(T...args)
std::stoi
T stoi(T...args)
RootHistCnv::RootCompressionSettings::m_level
int m_level
The cached ROOT compression level int.
Definition: RootCompressionSettings.h:21

## Member Function Documentation

int RootHistCnv::RootCompressionSettings::level | ( |  | ) | const
| inline

Get the level.

Definition at line 28 of file RootCompressionSettings.h.

28 { return m_level; }
RootHistCnv::RootCompressionSettings::m_level
int m_level
The cached ROOT compression level int.
Definition: RootCompressionSettings.h:21

## Member Data Documentation

int RootHistCnv::RootCompressionSettings::m_level
| private

The cached ROOT compression level int.

Definition at line 21 of file RootCompressionSettings.h.

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

- RootHistCnv/src/RootCompressionSettings.h
- RootHistCnv/src/RootCompressionSettings.cpp