Skip to content

Commit

Permalink
Replace deprecated constants for compression level
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Nov 8, 2024
1 parent ddbd544 commit 2453221
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions IOPool/Output/src/RootOutputFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ namespace edm {
}

if (om_->compressionAlgorithm() == std::string("ZLIB")) {
filePtr_->SetCompressionAlgorithm(ROOT::kZLIB);
filePtr_->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kZLIB);
} else if (om_->compressionAlgorithm() == std::string("LZMA")) {
filePtr_->SetCompressionAlgorithm(ROOT::kLZMA);
filePtr_->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kLZMA);
} else if (om_->compressionAlgorithm() == std::string("ZSTD")) {
filePtr_->SetCompressionAlgorithm(ROOT::kZSTD);
filePtr_->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kZSTD);
} else if (om_->compressionAlgorithm() == std::string("LZ4")) {
filePtr_->SetCompressionAlgorithm(ROOT::kLZ4);
filePtr_->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kLZ4);
} else {
throw Exception(errors::Configuration)
<< "PoolOutputModule configured with unknown compression algorithm '" << om_->compressionAlgorithm() << "'\n"
Expand Down
8 changes: 4 additions & 4 deletions PhysicsTools/NanoAOD/plugins/NanoAODOutputModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ void NanoAODOutputModule::openFile(edm::FileBlock const&) {
std::vector<std::string>());

if (m_compressionAlgorithm == std::string("ZLIB")) {
m_file->SetCompressionAlgorithm(ROOT::kZLIB);
m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kZLIB);
} else if (m_compressionAlgorithm == std::string("LZMA")) {
m_file->SetCompressionAlgorithm(ROOT::kLZMA);
m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kLZMA);
} else if (m_compressionAlgorithm == std::string("ZSTD")) {
m_file->SetCompressionAlgorithm(ROOT::kZSTD);
m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kZSTD);
} else if (m_compressionAlgorithm == std::string("LZ4")) {
m_file->SetCompressionAlgorithm(ROOT::kLZ4);
m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kLZ4);
} else {
throw cms::Exception("Configuration")
<< "NanoAODOutputModule configured with unknown compression algorithm '" << m_compressionAlgorithm << "'\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ void NanoAODRNTupleOutputModule::openFile(edm::FileBlock const&) {
std::vector<std::string>());

if (m_compressionAlgorithm == "ZLIB") {
m_file->SetCompressionAlgorithm(ROOT::kZLIB);
m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kZLIB);
} else if (m_compressionAlgorithm == "LZMA") {
m_file->SetCompressionAlgorithm(ROOT::kLZMA);
m_file->SetCompressionAlgorithm(ROOT::RCompressionSetting::EAlgorithm::kLZMA);
} else {
throw cms::Exception("Configuration")
<< "NanoAODOutputModule configured with unknown compression algorithm '" << m_compressionAlgorithm << "'\n"
Expand Down

0 comments on commit 2453221

Please sign in to comment.