Skip to content
Snippets Groups Projects
Commit aaf644e2 authored by Wouter Hulsbergen's avatar Wouter Hulsbergen
Browse files

perform some renaming of locations and revert back changes to get closer to...

perform some renaming of locations and revert back changes to get closer to master and be better backward compatible
parent eb9ef156
No related branches found
No related tags found
1 merge request!4299add PV pointer to particle, update v2 PV event model
......@@ -174,7 +174,7 @@ namespace LHCb {
typedef LHCb::PackedRecVertices PackedDataVector;
static const std::string& packedLocation() { return LHCb::PackedRecVertexLocation::Primary; }
static const std::string& unpackedLocation() { return LHCb::RecVertexLocation::Primary; }
constexpr inline static auto propertyName() { return "PVs_v1"; }
constexpr inline static auto propertyName() { return "PVs"; }
using PackerBase::PackerBase;
......
......@@ -47,6 +47,8 @@ namespace LHCb {
template <>
struct clid_<TwoProngVertex> : std::integral_constant<CLID, 1854> {};
template <>
struct clid_<PrimaryVertex> : std::integral_constant<CLID, 1855> {};
template <>
struct clid_<Particle> : std::integral_constant<CLID, 1881> {};
template <>
struct clid_<ProtoParticle> : std::integral_constant<CLID, 1852> {};
......
......@@ -14,9 +14,6 @@
using namespace LHCb::Packers::Traits;
using namespace LHCb::Hlt::PackedData;
using namespace LHCb::Packers::Traits;
using namespace LHCb::Hlt::PackedData;
namespace {
#if 0
class PTMap {
......
......@@ -39,6 +39,7 @@
namespace DataPacking::Buffer {
// These packers take one data buffer location and produce unpacked object of the specified type
DECLARE_COMPONENT_WITH_ID( Unpack<LHCb::RecVertex::Container>, "RecVertexUnpacker" )
DECLARE_COMPONENT_WITH_ID( Unpack<LHCb::PrimaryVertex::Container>, "PrimaryVertexUnpacker" )
DECLARE_COMPONENT_WITH_ID( Unpack<LHCb::Vertex::Container>, "VertexUnpacker" )
DECLARE_COMPONENT_WITH_ID( Unpack<LHCb::TwoProngVertex::Container>, "TwoProngVertexUnpacker" )
DECLARE_COMPONENT_WITH_ID( Unpack<LHCb::RichPID::Container>, "RichPIDUnpacker" )
......
......@@ -101,7 +101,7 @@ namespace LHCb::Packers {
auto const* link = m_linkMgr->link( id );
if ( !link ) throw GaudiException( "null link??? ", __func__, StatusCode::FAILURE );
if ( link->ID() == LinkManager::DirLinkType::INVALID )
throw GaudiException( "invalid link??? ", __func__, StatusCode::FAILURE );
throw GaudiException( "invalid link???", __func__, StatusCode::FAILURE );
return link->path();
}
......
......@@ -35,7 +35,6 @@
#include "Event/PackedVertex.h"
#include "Event/PackedWeightsVector.h"
#include "Event/Particle.h"
#include "Event/PrimaryVertex.h"
#include "Event/RecSummary.h"
#include "Event/RelatedInfoMap.h"
#include "Event/Track_v3.h"
......@@ -151,7 +150,7 @@ namespace LHCb::Packers::Traits {
template <>
struct Info_for_<LHCb::Event::PV::PrimaryVertexContainer>
: soapacker_mapping<LHCb::Event::PV::PrimaryVertexContainer> {
constexpr inline static auto Name = "PVs";
constexpr inline static auto Name = "ExtendedPVs";
};
template <>
struct Info_for_<Vertex> : packer_mapping<Vertex, VertexPacker> {};
......@@ -301,16 +300,41 @@ namespace LHCb::Packers::Traits {
#if 1
static_assert( std::is_same_v<
expand_t<std::tuple>,
std::tuple<RecVertex::Selection, Vertex::Selection, PrimaryVertex::Container, TwoProngVertex::Selection, RichPID::Selection,
std::tuple<RecVertex::Selection, PrimaryVertex::Selection, Vertex::Selection, TwoProngVertex::Selection, RichPID::Selection,
MuonPID::Selection, NeutralPID::Selection, ProtoParticle::Selection, Particle::Selection,
Track::Selection, FlavourTag::Selection, CaloHypo::Selection, CaloCluster::Selection,
RecVertex::Container, Vertex::Container, TwoProngVertex::Container, RichPID::Container,
RecVertex::Container, PrimaryVertex::Container, LHCb::Event::PV::PrimaryVertexContainer,Vertex::Container, TwoProngVertex::Container, RichPID::Container,
MuonPID::Container, NeutralPID::Container, ProtoParticle::Container, Particle::Container,
Track::Container, FlavourTag::Container, CaloHypo::Container, CaloCluster::Container,
CaloDigit::Container, CaloAdc::Container, WeightsVector::Container, RecSummary,
Relation1D<Particle, VertexBase>, Relation1D<Particle, RecVertex>,
Relation1D<Particle, MCParticle>, RelationWeighted1D<ProtoParticle, MCParticle, double>,
Relation1D<Particle, int>, Relation1D<Particle, RelatedInfoMap>>> );
=======
#else
template <typename T>
int fun() {
std::cout << "\n\n\n\\n*********************************************************\n";
std::cout << " " << type_name<T>();
std::cout << "\n\n\n\\n*********************************************************\n";
return 0;
}
static int iiii = fun<input_t>();
inline int oops() {
std::cout << "\n\n\n\\n*********************************************************\n";
std::cout << "RelationWeighted1D<Particle,RecVertex,double>::guid = "
<< RelationWeighted1D<Particle, RecVertex, double>::GUID() << std::endl;
std::cout << "Relation1D<Particle,RecVertex>::GUID = " << Relation1D<Particle, RecVertex>::GUID() << std::endl;
std::cout << "\n\n\n\\n*********************************************************\n";
return 0;
}
static int jjjjj = oops();
#endif
} // namespace LHCb::Packers::Traits
......@@ -12,6 +12,7 @@
// Include files
#include "Event/VertexBase.h"
#include "GaudiKernel/SharedObjectsContainer.h"
#include "Kernel/EventLocalAllocator.h"
// Forward declarations
......@@ -36,6 +37,7 @@ namespace LHCb {
public:
using Vector = std::vector<PrimaryVertex, LHCb::Allocators::EventLocal<PrimaryVertex>>;
using Container = KeyedContainer<PrimaryVertex, Containers::HashMap>;
using Selection = SharedObjectsContainer<PrimaryVertex>;
using VertexBase::VertexBase;
/// Default Constructor
......
......@@ -35,7 +35,7 @@ def type_map():
"SharedObjectsContainer<LHCb::MuonPID>":
"MuonPIDsSelection",
"SharedObjectsContainer<LHCb::RecVertex>":
"PVs_v1Selection",
"PVsSelection",
"SharedObjectsContainer<LHCb::Vertex>":
"VerticesSelection",
"SharedObjectsContainer<LHCb::TwoProngVertex>":
......@@ -59,7 +59,7 @@ def type_map():
"KeyedContainer<LHCb::NeutralPID,Containers::KeyedObjectManager<Containers::hashmap> >":
"NeutralPIDs",
"KeyedContainer<LHCb::RecVertex,Containers::KeyedObjectManager<Containers::hashmap> >":
"PVs_v1",
"PVs",
"KeyedContainer<LHCb::Vertex,Containers::KeyedObjectManager<Containers::hashmap> >":
"Vertices",
"KeyedContainer<LHCb::TwoProngVertex,Containers::KeyedObjectManager<Containers::hashmap> >":
......@@ -89,7 +89,7 @@ def type_map():
"LHCb::RecSummary":
"RecSummary",
"LHCb::Event::PV::PrimaryVertexContainer":
"PVs",
"ExtendedPVs",
}
return type_map
......@@ -150,7 +150,6 @@ def __decoder(input_process='Hlt2'):
], 'Unpacking helper only accepts Turbo, Spruce or Hlt2 processes'
from PyConf.Algorithms import HltPackedBufferDecoder
decoder = HltPackedBufferDecoder(
OutputLevel=2,
SourceID=input_process.replace("Turbo", "Hlt2"),
DecReports=force_location("DAQ/RawBanks/HltDecReports"),
RawBanks=force_location("DAQ/RawBanks/DstData"))
......
......@@ -100,7 +100,7 @@ def packers_map():
"Tracks_v2": SOATrackPacker,
"CaloClusters_v2": SOACaloClusterPacker,
"CaloHypos_v2": SOACaloHypoPacker,
"PVs_v2": SOAPVPacker
"ExtendedPVs": SOAPVPacker
}
......@@ -143,8 +143,8 @@ def unpackers_map():
"CaloClusters": CaloClusterUnpacker,
"CaloDigits": CaloDigitUnpacker,
"CaloAdcs": CaloAdcUnpacker,
"PVs": PrimaryVertexUnpacker,
"PVs_v1": RecVertexUnpacker,
"LightPVs": PrimaryVertexUnpacker,
"PVs": RecVertexUnpacker,
"ProtoParticles": ProtoParticleUnpacker,
"Particles": ParticleUnpacker,
"ParticlesSelection": ParticleSelectionUnpacker,
......@@ -159,5 +159,5 @@ def unpackers_map():
"Tracks_v2": SOATrackUnpacker,
"CaloClusters_v2": SOACaloClusterUnpacker,
"CaloHypos_v2": SOACaloHypoUnpacker,
"PVs_v2": SOAPVUnpacker
"ExtendedPVs": SOAPVUnpacker
}
......@@ -304,14 +304,18 @@ def postprocess_unpacked_data(data,
"""
# PV v1 only persisted for now
if "PVs_v1" in data and "PVs" not in data:
if "PVs" in data and "ExtendedPVs" not in data:
from PyConf.Algorithms import RecV1ToPVConverter
data["PVs"] = RecV1ToPVConverter(
InputVertices=data["PVs_v1"]).OutputVertices
elif "PVs" in data and "PVs_v1" not in data:
data["PVs_v1"] = data["PVs"]
data["ExtendedPVs"] = RecV1ToPVConverter(
InputVertices=data["PVs"]).OutputVertices
data["PVs"] = data["ExtendedPVs"]
elif "ExtendedPVs" in data and "PVs" not in data:
from PyConf.Algorithms import PVToRecConverterV1WithoutTracks
data["PVs_v1"] = PVToRecConverterV1WithoutTracks(
InputVertices=data["PVs"], AddTrackWeights=False).OutputVertices
InputVertices=data["ExtendedPVs"],
AddTrackWeights=False).OutputVertices
data["PVs"] = data["ExtendedPVs"]
# per track type splitter (to convert 0.0 persistency to latest)
if persistreco_version() == 0.0:
......
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