| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <RootCompressionSettings.h>`

Collaboration diagram for RootHistCnv::RootCompressionSettings:
[legend]

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

## Private Attributes
std::string | m_compSettings
| The compression settings string.
int | m_level
| The cached ROOT compression level int.

## 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 24 of file RootCompressionSettings.cpp.

: m_compSettings ( settings ),
m_level ( ROOT::CompressionSettings(ROOT::kZLIB,1) )
{
const std::string::size_type idx = m_compSettings.find(':');
if ( idx != std::string::npos )
{
// Get compression algorithm type
const std::string alg = m_compSettings.substr(0,idx);
ROOT::ECompressionAlgorithm alg_code = ROOT::kUseGlobalSetting;
if ( alg == "ZLIB" ) { alg_code = ROOT::kZLIB; }
else if ( alg == "LZMA" ) { alg_code = ROOT::kLZMA; }
else
{
throw std::runtime_error("ERROR: Unknown ROOT compression algorithm:"+alg);
}
// get compression level
const std::string slev = m_compSettings.substr(idx+1);
const int ilev = boost::lexical_cast<int>(slev);
// set the level
m_level = ROOT::CompressionSettings(alg_code,ilev);
}
}

RootHistCnv::RootCompressionSettings::~RootCompressionSettings | ( |  | ) |
| inline

Destructor.

Definition at line 28 of file RootCompressionSettings.h.

{ }

## Member Function Documentation

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

Get the level.

Definition at line 33 of file RootCompressionSettings.h.

{ return m_level; }

## Member Data Documentation

std::string RootHistCnv::RootCompressionSettings::m_compSettings
| private

The compression settings string.

Definition at line 38 of file RootCompressionSettings.h.

int RootHistCnv::RootCompressionSettings::m_level
| private

The cached ROOT compression level int.

Definition at line 41 of file RootCompressionSettings.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/RootHistCnv/src/RootCompressionSettings.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/RootHistCnv/src/RootCompressionSettings.cpp