8 #include "Compression.h"
21 : m_level (
ROOT::CompressionSettings(
ROOT::kZLIB,1) )
23 const std::string::size_type idx = settings.find(
':');
24 if ( idx != std::string::npos )
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; }
33 throw std::runtime_error(
"ERROR: Unknown ROOT compression algorithm:"+alg);
37 const std::string slev = settings.substr(idx+1);
38 const int ilev = std::stoi(slev);
41 m_level = ROOT::CompressionSettings(alg_code,ilev);
RootCompressionSettings(const std::string &settings)
Standard constructor.
int m_level
The cached ROOT compression level int.