Skip to content
Snippets Groups Projects
Commit 2016a68a authored by Sevda Esen's avatar Sevda Esen Committed by Andre Gunther
Browse files

Allow unknown locations when unpacking for tistos

parent ec2e5015
No related branches found
No related tags found
1 merge request!4445Allow unknown locations when unpacking for tistos
......@@ -44,7 +44,7 @@ namespace LHCb::Hlt::PackedData {
struct Counters {
Gaudi::Accumulators::MsgCounter<MSG::ERROR> inconsistentSize;
Gaudi::Accumulators::MsgCounter<MSG::ERROR> no_buffers;
Gaudi::Accumulators::MsgCounter<MSG::ERROR> unknown;
Gaudi::Accumulators::MsgCounter<MSG::ERROR> unknown_buffer;
Gaudi::Accumulators::MsgCounter<MSG::WARNING> absent;
Gaudi::Accumulators::MsgCounter<MSG::WARNING> missing_dependency;
Gaudi::Accumulators::BinomialCounter<> nothing_to_do;
......@@ -54,14 +54,15 @@ namespace LHCb::Hlt::PackedData {
Gaudi::Accumulators::SummingCounter<unsigned int> nbLinkedBufferData;
Gaudi::Accumulators::SummingCounter<unsigned int> missingLinks;
Gaudi::Accumulators::SummingCounter<unsigned int> wrong_LinkID;
Gaudi::Accumulators::SummingCounter<unsigned int> unknown_buffer_allowed;
Counters( Gaudi::Algorithm* parent )
: inconsistentSize{parent, "Size read does not match size expected"}
, no_buffers{parent, "Input has empty map of buffers -- can not do anything at this point. Verify "
"HltPackedBufferDecoder "
"configuration"}
, unknown{parent,
"Configured output location not known to ANNSvc for decoding key in current event - unable to unpack"}
, unknown_buffer{parent, "Configured output location not known to ANNSvc for decoding key in current event - "
"unable to unpack"}
, absent{parent, "DstData buffer for configured output not available - unable to unpack", 0}
, missing_dependency{parent, "DstData buffer for dependency not available - unable to unpack", 0}
, nothing_to_do{parent, "Target data already present"}
......@@ -70,7 +71,8 @@ namespace LHCb::Hlt::PackedData {
, nbBufferData{parent, "# BufferData"}
, nbLinkedBufferData{parent, "# Linked BufferData"}
, missingLinks{parent, "# Missing Link Locations"}
, wrong_LinkID{parent, "Mismatched LinkMgr id"} {}
, wrong_LinkID{parent, "Mismatched LinkMgr id"}
, unknown_buffer_allowed{parent, "UnknownBuffers"} {}
};
class Loader;
......@@ -335,6 +337,7 @@ namespace DataPacking::Buffer {
this, "AnonymousFormat", "/Event/DoNotUseExplicitly/AnonymousDependencyOnly/SourceID_{0}/0x{1:08x}"};
protected:
Gaudi::Property<bool> m_emptyContainerForUnknownBuffers{this, "WriteEmptyContainerIfBufferNotKnown", false};
Gaudi::Property<bool> m_emptyContainerForMissingBuffers{this, "WriteEmptyContainerIfBufferNotFound", true};
Gaudi::Property<bool> m_emptyContainerForFailedUnpacking{this, "WriteEmptyContainerIfUnpackingFails", true};
......@@ -378,7 +381,13 @@ namespace DataPacking::Buffer {
auto loader = loader_for( buffers );
auto j = loader.decoder()( m_data.fullKey().key() );
if ( !j ) {
++m_counters.unknown;
// For TisTosing in sprucing, allow unknown buffers to write out an empty container
if ( m_emptyContainerForUnknownBuffers ) {
++m_counters.unknown_buffer_allowed;
m_data.put( std::make_unique<DataVector>() ); // really do not want to do this...
} else {
++m_counters.unknown_buffer;
}
return;
}
......
......@@ -85,11 +85,11 @@ def _get_unpacked(type_name, location, **kwargs):
**kwargs).OutputName
def get_particles(location):
def get_particles(location, **kwargs):
"""
Unpacking of particles. This will also unpack the decay vertices associated with these particles implicitely
"""
return _get_unpacked("ParticlesSelection", location)
return _get_unpacked("ParticlesSelection", location, **kwargs)
def get_pp2mcp_relations(location):
......
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