Skip to content
Snippets Groups Projects

SelectivePacker: Consistently check whether TES entries are explicitly requested

Merged Gerhard Raven requested to merge selective-packer-require-request into master
All threads resolved!
1 file
+ 15
13
Compare changes
  • Side-by-side
  • Inline
@@ -669,7 +669,10 @@ namespace LHCb {
Packer& packer() { return m_packer; }
bool emplace( Entry const* v ) { return m_set.emplace( *v ).second; }
bool emplace( Entry const* v ) {
assert( v != nullptr );
return m_set.emplace( *v ).second;
}
void append_to( Buffer& buffer, Encoder& encoder, bool check,
LHCb::Hlt::PackedData::PackedDataChecksum* checksum ) const {
@@ -917,7 +920,15 @@ namespace LHCb {
template <typename Container>
void add( VOC<Container*> const& c ) {
for ( const auto& i : c ) add( i );
for ( const auto* i : c ) {
if ( !i ) continue;
if ( auto reg = i->registry(); !reg || !is_explicitly_requested( identifier( *reg ) ) ) {
m_lists.template get<Container>().packer().parent().debug()
<< " skipping " << ( reg ? identifier( *reg ) : "no registry" ) << endmsg;
continue;
}
add( *i );
}
}
template <typename V>
@@ -927,19 +938,10 @@ namespace LHCb {
template <typename V, typename M>
void add( const KeyedContainer<V, M>& kc ) {
auto r = kc.registry();
if ( r && is_explicitly_requested( identifier( *r ) ) ) {
for ( const auto& i : kc ) add( i );
} else {
// std::cerr << "skipped " << identifier( kc ) << std::endl; TODO: add a counter for each input location, and
// count how often it is requested...
}
for ( const auto& i : kc ) add( i );
}
void add( const RecSummary& rs ) {
auto r = rs.registry();
if ( r && is_explicitly_requested( identifier( *r ) ) ) m_lists.add( rs );
}
void add( const RecSummary& rs ) { m_lists.add( rs ); }
void add( const MCParticle& /*p*/ ) {
// foe now, assume MCParticles are somehow packed elsewhere...
Loading