Skip to content
Snippets Groups Projects
Commit aa933909 authored by Alaettin Serhan Mete's avatar Alaettin Serhan Mete :eagle: Committed by Walter Lampl
Browse files

AthenaServices : Fill the float compression map if and only if something is setup to be compressed

parent c11ac182
No related branches found
No related tags found
5 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3
...@@ -874,7 +874,6 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item, ...@@ -874,7 +874,6 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item,
// Get a handle on the compression information for this store // Get a handle on the compression information for this store
std::string key = item_key; std::string key = item_key;
key.erase (key.size()-4, 4); key.erase (key.size()-4, 4);
SG::ThinningInfo::compression_map_t& compMap = compInfo[key];
// Build the compression list, retrieve the relevant AuxIDs and // Build the compression list, retrieve the relevant AuxIDs and
// store it in the relevant map that is going to be inserted into // store it in the relevant map that is going to be inserted into
...@@ -882,16 +881,15 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item, ...@@ -882,16 +881,15 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item,
xAOD::AuxCompression compression; xAOD::AuxCompression compression;
compression.setCompressedAuxIDs( comp_attr_map ); compression.setCompressedAuxIDs( comp_attr_map );
for( const auto& it : compression.getCompressedAuxIDs( allVars ) ) { for( const auto& it : compression.getCompressedAuxIDs( allVars ) ) {
if( it.second.size() > 0 ) // insert only if the set is non-empty if( it.second.size() > 0 ) { // insert only if the set is non-empty
compMap[ it.first ] = it.second; compInfo[ key ][ it.first ] = it.second;
} ATH_MSG_DEBUG( "Container " << key << " has " << it.second.size() <<
" variables that'll be lossy float compressed"
for( const auto& it : compMap ) { " with " << it.first << " mantissa bits" );
ATH_MSG_DEBUG( "Lossy float compression level " << it.first << }
" contains " << it.second.size() << " elements" } // End of loop over variables to be lossy float compressed
" for container " << key ); } // End of lossy float compression logic
}
}
} }
added = true; added = true;
......
...@@ -131,9 +131,10 @@ int main() { ...@@ -131,9 +131,10 @@ int main() {
const SG::CompressionInfo* compInfo = nullptr; const SG::CompressionInfo* compInfo = nullptr;
assert (pStore->retrieve (compInfo, "CompressionInfo_AthenaOutputStream").isSuccess()); assert (pStore->retrieve (compInfo, "CompressionInfo_AthenaOutputStream").isSuccess());
assert (compInfo->size() == 2); // 2 levels of compression as high/low assert (compInfo->size() == 1); // A single container has variables to be compressed
auto val = compInfo->find("comp"); auto val = compInfo->find("comp");
assert (val != compInfo->end()); assert (val != compInfo->end());
assert (val->second.size() == 2); // 2 levels of compression as high/low
assert (val->second.at(10).test(foo.auxid())); // compress foo high assert (val->second.at(10).test(foo.auxid())); // compress foo high
assert (!val->second.at(10).test(bar.auxid())); // don't compress bar since it's double assert (!val->second.at(10).test(bar.auxid())); // don't compress bar since it's double
assert (val->second.at(16).test(zzz.auxid())); // compress zzz low assert (val->second.at(16).test(zzz.auxid())); // compress zzz low
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment