File indexing completed on 2025-10-19 08:44:34
0001
0002
0003 #pragma once
0004
0005 #include <stdexcept>
0006 #include <podio/CollectionBase.h>
0007
0008
0009 template <typename T> struct PodioTypeMap {
0010 using collection_t = typename T::collection_type;
0011 using mutable_t = typename T::mutable_type;
0012 };
0013
0014 namespace edm4hep {
0015 class TrackerHitSimTrackerHitLink;
0016 class TrackerHitSimTrackerHitLinkCollection;
0017 class MutableTrackerHitSimTrackerHitLink;
0018 };
0019 namespace edm4hep {
0020 class TrackerHitPlane;
0021 class TrackerHitPlaneCollection;
0022 class MutableTrackerHitPlane;
0023 };
0024 namespace edm4hep {
0025 class CaloHitContribution;
0026 class CaloHitContributionCollection;
0027 class MutableCaloHitContribution;
0028 };
0029 namespace edm4hep {
0030 class TrackMCParticleLink;
0031 class TrackMCParticleLinkCollection;
0032 class MutableTrackMCParticleLink;
0033 };
0034 namespace edm4hep {
0035 class RecoMCParticleLink;
0036 class RecoMCParticleLinkCollection;
0037 class MutableRecoMCParticleLink;
0038 };
0039 namespace edm4hep {
0040 class Cluster;
0041 class ClusterCollection;
0042 class MutableCluster;
0043 };
0044 namespace edm4hep {
0045 class SimCalorimeterHit;
0046 class SimCalorimeterHitCollection;
0047 class MutableSimCalorimeterHit;
0048 };
0049 namespace edm4hep {
0050 class ParticleID;
0051 class ParticleIDCollection;
0052 class MutableParticleID;
0053 };
0054 namespace edm4hep {
0055 class Vertex;
0056 class VertexCollection;
0057 class MutableVertex;
0058 };
0059 namespace edm4hep {
0060 class RecDqdx;
0061 class RecDqdxCollection;
0062 class MutableRecDqdx;
0063 };
0064 namespace edm4hep {
0065 class RawTimeSeries;
0066 class RawTimeSeriesCollection;
0067 class MutableRawTimeSeries;
0068 };
0069 namespace edm4hep {
0070 class GeneratorEventParameters;
0071 class GeneratorEventParametersCollection;
0072 class MutableGeneratorEventParameters;
0073 };
0074 namespace edm4hep {
0075 class RawCalorimeterHit;
0076 class RawCalorimeterHitCollection;
0077 class MutableRawCalorimeterHit;
0078 };
0079 namespace edm4hep {
0080 class ClusterMCParticleLink;
0081 class ClusterMCParticleLinkCollection;
0082 class MutableClusterMCParticleLink;
0083 };
0084 namespace edm4hep {
0085 class CalorimeterHit;
0086 class CalorimeterHitCollection;
0087 class MutableCalorimeterHit;
0088 };
0089 namespace edm4hep {
0090 class Track;
0091 class TrackCollection;
0092 class MutableTrack;
0093 };
0094 namespace edm4hep {
0095 class EventHeader;
0096 class EventHeaderCollection;
0097 class MutableEventHeader;
0098 };
0099 namespace edm4hep {
0100 class GeneratorPdfInfo;
0101 class GeneratorPdfInfoCollection;
0102 class MutableGeneratorPdfInfo;
0103 };
0104 namespace edm4hep {
0105 class MCParticle;
0106 class MCParticleCollection;
0107 class MutableMCParticle;
0108 };
0109 namespace edm4hep {
0110 class ReconstructedParticle;
0111 class ReconstructedParticleCollection;
0112 class MutableReconstructedParticle;
0113 };
0114 namespace edm4hep {
0115 class CaloHitMCParticleLink;
0116 class CaloHitMCParticleLinkCollection;
0117 class MutableCaloHitMCParticleLink;
0118 };
0119 namespace edm4hep {
0120 class SimTrackerHit;
0121 class SimTrackerHitCollection;
0122 class MutableSimTrackerHit;
0123 };
0124 namespace edm4hep {
0125 class TrackerHit3D;
0126 class TrackerHit3DCollection;
0127 class MutableTrackerHit3D;
0128 };
0129 namespace edm4hep {
0130 class TimeSeries;
0131 class TimeSeriesCollection;
0132 class MutableTimeSeries;
0133 };
0134 namespace edm4hep {
0135 class VertexRecoParticleLink;
0136 class VertexRecoParticleLinkCollection;
0137 class MutableVertexRecoParticleLink;
0138 };
0139 namespace edm4hep {
0140 class CaloHitSimCaloHitLink;
0141 class CaloHitSimCaloHitLinkCollection;
0142 class MutableCaloHitSimCaloHitLink;
0143 };
0144 namespace edm4eic {
0145 class CherenkovParticleID;
0146 class CherenkovParticleIDCollection;
0147 class MutableCherenkovParticleID;
0148 };
0149 namespace edm4eic {
0150 class Tensor;
0151 class TensorCollection;
0152 class MutableTensor;
0153 };
0154 namespace edm4eic {
0155 class SimPulse;
0156 class SimPulseCollection;
0157 class MutableSimPulse;
0158 };
0159 namespace edm4eic {
0160 class MCRecoVertexParticleAssociation;
0161 class MCRecoVertexParticleAssociationCollection;
0162 class MutableMCRecoVertexParticleAssociation;
0163 };
0164 namespace edm4eic {
0165 class ProtoCluster;
0166 class ProtoClusterCollection;
0167 class MutableProtoCluster;
0168 };
0169 namespace edm4eic {
0170 class TrackSegment;
0171 class TrackSegmentCollection;
0172 class MutableTrackSegment;
0173 };
0174 namespace edm4eic {
0175 class Cluster;
0176 class ClusterCollection;
0177 class MutableCluster;
0178 };
0179 namespace edm4eic {
0180 class Measurement2D;
0181 class Measurement2DCollection;
0182 class MutableMeasurement2D;
0183 };
0184 namespace edm4eic {
0185 class Vertex;
0186 class VertexCollection;
0187 class MutableVertex;
0188 };
0189 namespace edm4eic {
0190 class MCRecoTrackParticleAssociation;
0191 class MCRecoTrackParticleAssociationCollection;
0192 class MutableMCRecoTrackParticleAssociation;
0193 };
0194 namespace edm4eic {
0195 class RawTrackerHit;
0196 class RawTrackerHitCollection;
0197 class MutableRawTrackerHit;
0198 };
0199 namespace edm4eic {
0200 class TrackParameters;
0201 class TrackParametersCollection;
0202 class MutableTrackParameters;
0203 };
0204 namespace edm4eic {
0205 class Trajectory;
0206 class TrajectoryCollection;
0207 class MutableTrajectory;
0208 };
0209 namespace edm4eic {
0210 class MCRecoCalorimeterHitAssociation;
0211 class MCRecoCalorimeterHitAssociationCollection;
0212 class MutableMCRecoCalorimeterHitAssociation;
0213 };
0214 namespace edm4eic {
0215 class PMTHit;
0216 class PMTHitCollection;
0217 class MutablePMTHit;
0218 };
0219 namespace edm4eic {
0220 class CalorimeterHit;
0221 class CalorimeterHitCollection;
0222 class MutableCalorimeterHit;
0223 };
0224 namespace edm4eic {
0225 class Track;
0226 class TrackCollection;
0227 class MutableTrack;
0228 };
0229 namespace edm4eic {
0230 class ReconstructedParticle;
0231 class ReconstructedParticleCollection;
0232 class MutableReconstructedParticle;
0233 };
0234 namespace edm4eic {
0235 class MCRecoTrackerHitAssociation;
0236 class MCRecoTrackerHitAssociationCollection;
0237 class MutableMCRecoTrackerHitAssociation;
0238 };
0239 namespace edm4eic {
0240 class HadronicFinalState;
0241 class HadronicFinalStateCollection;
0242 class MutableHadronicFinalState;
0243 };
0244 namespace edm4eic {
0245 class TrackClusterMatch;
0246 class TrackClusterMatchCollection;
0247 class MutableTrackClusterMatch;
0248 };
0249 namespace edm4eic {
0250 class MCRecoParticleAssociation;
0251 class MCRecoParticleAssociationCollection;
0252 class MutableMCRecoParticleAssociation;
0253 };
0254 namespace edm4eic {
0255 class MCRecoClusterParticleAssociation;
0256 class MCRecoClusterParticleAssociationCollection;
0257 class MutableMCRecoClusterParticleAssociation;
0258 };
0259 namespace edm4eic {
0260 class RingImage;
0261 class RingImageCollection;
0262 class MutableRingImage;
0263 };
0264 namespace edm4eic {
0265 class InclusiveKinematics;
0266 class InclusiveKinematicsCollection;
0267 class MutableInclusiveKinematics;
0268 };
0269 namespace edm4eic {
0270 class TrackSeed;
0271 class TrackSeedCollection;
0272 class MutableTrackSeed;
0273 };
0274 namespace edm4eic {
0275 class RawHGCROCHit;
0276 class RawHGCROCHitCollection;
0277 class MutableRawHGCROCHit;
0278 };
0279 namespace edm4eic {
0280 class TrackerHit;
0281 class TrackerHitCollection;
0282 class MutableTrackerHit;
0283 };
0284
0285 template <typename Visitor> struct VisitPodioCollection {
0286 void operator()(Visitor& visitor, const podio::CollectionBase& collection) {
0287 auto podio_typename = collection.getTypeName();
0288 if (podio_typename == "edm4hep::TrackerHitSimTrackerHitLinkCollection") {
0289 return visitor(*reinterpret_cast<const edm4hep::TrackerHitSimTrackerHitLinkCollection*>(&collection));
0290 }
0291 if (podio_typename == "edm4hep::TrackerHitPlaneCollection") {
0292 return visitor(*reinterpret_cast<const edm4hep::TrackerHitPlaneCollection*>(&collection));
0293 }
0294 if (podio_typename == "edm4hep::CaloHitContributionCollection") {
0295 return visitor(*reinterpret_cast<const edm4hep::CaloHitContributionCollection*>(&collection));
0296 }
0297 if (podio_typename == "edm4hep::TrackMCParticleLinkCollection") {
0298 return visitor(*reinterpret_cast<const edm4hep::TrackMCParticleLinkCollection*>(&collection));
0299 }
0300 if (podio_typename == "edm4hep::RecoMCParticleLinkCollection") {
0301 return visitor(*reinterpret_cast<const edm4hep::RecoMCParticleLinkCollection*>(&collection));
0302 }
0303 if (podio_typename == "edm4hep::ClusterCollection") {
0304 return visitor(*reinterpret_cast<const edm4hep::ClusterCollection*>(&collection));
0305 }
0306 if (podio_typename == "edm4hep::SimCalorimeterHitCollection") {
0307 return visitor(*reinterpret_cast<const edm4hep::SimCalorimeterHitCollection*>(&collection));
0308 }
0309 if (podio_typename == "edm4hep::ParticleIDCollection") {
0310 return visitor(*reinterpret_cast<const edm4hep::ParticleIDCollection*>(&collection));
0311 }
0312 if (podio_typename == "edm4hep::VertexCollection") {
0313 return visitor(*reinterpret_cast<const edm4hep::VertexCollection*>(&collection));
0314 }
0315 if (podio_typename == "edm4hep::RecDqdxCollection") {
0316 return visitor(*reinterpret_cast<const edm4hep::RecDqdxCollection*>(&collection));
0317 }
0318 if (podio_typename == "edm4hep::RawTimeSeriesCollection") {
0319 return visitor(*reinterpret_cast<const edm4hep::RawTimeSeriesCollection*>(&collection));
0320 }
0321 if (podio_typename == "edm4hep::GeneratorEventParametersCollection") {
0322 return visitor(*reinterpret_cast<const edm4hep::GeneratorEventParametersCollection*>(&collection));
0323 }
0324 if (podio_typename == "edm4hep::RawCalorimeterHitCollection") {
0325 return visitor(*reinterpret_cast<const edm4hep::RawCalorimeterHitCollection*>(&collection));
0326 }
0327 if (podio_typename == "edm4hep::ClusterMCParticleLinkCollection") {
0328 return visitor(*reinterpret_cast<const edm4hep::ClusterMCParticleLinkCollection*>(&collection));
0329 }
0330 if (podio_typename == "edm4hep::CalorimeterHitCollection") {
0331 return visitor(*reinterpret_cast<const edm4hep::CalorimeterHitCollection*>(&collection));
0332 }
0333 if (podio_typename == "edm4hep::TrackCollection") {
0334 return visitor(*reinterpret_cast<const edm4hep::TrackCollection*>(&collection));
0335 }
0336 if (podio_typename == "edm4hep::EventHeaderCollection") {
0337 return visitor(*reinterpret_cast<const edm4hep::EventHeaderCollection*>(&collection));
0338 }
0339 if (podio_typename == "edm4hep::GeneratorPdfInfoCollection") {
0340 return visitor(*reinterpret_cast<const edm4hep::GeneratorPdfInfoCollection*>(&collection));
0341 }
0342 if (podio_typename == "edm4hep::MCParticleCollection") {
0343 return visitor(*reinterpret_cast<const edm4hep::MCParticleCollection*>(&collection));
0344 }
0345 if (podio_typename == "edm4hep::ReconstructedParticleCollection") {
0346 return visitor(*reinterpret_cast<const edm4hep::ReconstructedParticleCollection*>(&collection));
0347 }
0348 if (podio_typename == "edm4hep::CaloHitMCParticleLinkCollection") {
0349 return visitor(*reinterpret_cast<const edm4hep::CaloHitMCParticleLinkCollection*>(&collection));
0350 }
0351 if (podio_typename == "edm4hep::SimTrackerHitCollection") {
0352 return visitor(*reinterpret_cast<const edm4hep::SimTrackerHitCollection*>(&collection));
0353 }
0354 if (podio_typename == "edm4hep::TrackerHit3DCollection") {
0355 return visitor(*reinterpret_cast<const edm4hep::TrackerHit3DCollection*>(&collection));
0356 }
0357 if (podio_typename == "edm4hep::TimeSeriesCollection") {
0358 return visitor(*reinterpret_cast<const edm4hep::TimeSeriesCollection*>(&collection));
0359 }
0360 if (podio_typename == "edm4hep::VertexRecoParticleLinkCollection") {
0361 return visitor(*reinterpret_cast<const edm4hep::VertexRecoParticleLinkCollection*>(&collection));
0362 }
0363 if (podio_typename == "edm4hep::CaloHitSimCaloHitLinkCollection") {
0364 return visitor(*reinterpret_cast<const edm4hep::CaloHitSimCaloHitLinkCollection*>(&collection));
0365 }
0366 if (podio_typename == "edm4eic::CherenkovParticleIDCollection") {
0367 return visitor(*reinterpret_cast<const edm4eic::CherenkovParticleIDCollection*>(&collection));
0368 }
0369 if (podio_typename == "edm4eic::TensorCollection") {
0370 return visitor(*reinterpret_cast<const edm4eic::TensorCollection*>(&collection));
0371 }
0372 if (podio_typename == "edm4eic::SimPulseCollection") {
0373 return visitor(*reinterpret_cast<const edm4eic::SimPulseCollection*>(&collection));
0374 }
0375 if (podio_typename == "edm4eic::MCRecoVertexParticleAssociationCollection") {
0376 return visitor(*reinterpret_cast<const edm4eic::MCRecoVertexParticleAssociationCollection*>(&collection));
0377 }
0378 if (podio_typename == "edm4eic::ProtoClusterCollection") {
0379 return visitor(*reinterpret_cast<const edm4eic::ProtoClusterCollection*>(&collection));
0380 }
0381 if (podio_typename == "edm4eic::TrackSegmentCollection") {
0382 return visitor(*reinterpret_cast<const edm4eic::TrackSegmentCollection*>(&collection));
0383 }
0384 if (podio_typename == "edm4eic::ClusterCollection") {
0385 return visitor(*reinterpret_cast<const edm4eic::ClusterCollection*>(&collection));
0386 }
0387 if (podio_typename == "edm4eic::Measurement2DCollection") {
0388 return visitor(*reinterpret_cast<const edm4eic::Measurement2DCollection*>(&collection));
0389 }
0390 if (podio_typename == "edm4eic::VertexCollection") {
0391 return visitor(*reinterpret_cast<const edm4eic::VertexCollection*>(&collection));
0392 }
0393 if (podio_typename == "edm4eic::MCRecoTrackParticleAssociationCollection") {
0394 return visitor(*reinterpret_cast<const edm4eic::MCRecoTrackParticleAssociationCollection*>(&collection));
0395 }
0396 if (podio_typename == "edm4eic::RawTrackerHitCollection") {
0397 return visitor(*reinterpret_cast<const edm4eic::RawTrackerHitCollection*>(&collection));
0398 }
0399 if (podio_typename == "edm4eic::TrackParametersCollection") {
0400 return visitor(*reinterpret_cast<const edm4eic::TrackParametersCollection*>(&collection));
0401 }
0402 if (podio_typename == "edm4eic::TrajectoryCollection") {
0403 return visitor(*reinterpret_cast<const edm4eic::TrajectoryCollection*>(&collection));
0404 }
0405 if (podio_typename == "edm4eic::MCRecoCalorimeterHitAssociationCollection") {
0406 return visitor(*reinterpret_cast<const edm4eic::MCRecoCalorimeterHitAssociationCollection*>(&collection));
0407 }
0408 if (podio_typename == "edm4eic::PMTHitCollection") {
0409 return visitor(*reinterpret_cast<const edm4eic::PMTHitCollection*>(&collection));
0410 }
0411 if (podio_typename == "edm4eic::CalorimeterHitCollection") {
0412 return visitor(*reinterpret_cast<const edm4eic::CalorimeterHitCollection*>(&collection));
0413 }
0414 if (podio_typename == "edm4eic::TrackCollection") {
0415 return visitor(*reinterpret_cast<const edm4eic::TrackCollection*>(&collection));
0416 }
0417 if (podio_typename == "edm4eic::ReconstructedParticleCollection") {
0418 return visitor(*reinterpret_cast<const edm4eic::ReconstructedParticleCollection*>(&collection));
0419 }
0420 if (podio_typename == "edm4eic::MCRecoTrackerHitAssociationCollection") {
0421 return visitor(*reinterpret_cast<const edm4eic::MCRecoTrackerHitAssociationCollection*>(&collection));
0422 }
0423 if (podio_typename == "edm4eic::HadronicFinalStateCollection") {
0424 return visitor(*reinterpret_cast<const edm4eic::HadronicFinalStateCollection*>(&collection));
0425 }
0426 if (podio_typename == "edm4eic::TrackClusterMatchCollection") {
0427 return visitor(*reinterpret_cast<const edm4eic::TrackClusterMatchCollection*>(&collection));
0428 }
0429 if (podio_typename == "edm4eic::MCRecoParticleAssociationCollection") {
0430 return visitor(*reinterpret_cast<const edm4eic::MCRecoParticleAssociationCollection*>(&collection));
0431 }
0432 if (podio_typename == "edm4eic::MCRecoClusterParticleAssociationCollection") {
0433 return visitor(*reinterpret_cast<const edm4eic::MCRecoClusterParticleAssociationCollection*>(&collection));
0434 }
0435 if (podio_typename == "edm4eic::RingImageCollection") {
0436 return visitor(*reinterpret_cast<const edm4eic::RingImageCollection*>(&collection));
0437 }
0438 if (podio_typename == "edm4eic::InclusiveKinematicsCollection") {
0439 return visitor(*reinterpret_cast<const edm4eic::InclusiveKinematicsCollection*>(&collection));
0440 }
0441 if (podio_typename == "edm4eic::TrackSeedCollection") {
0442 return visitor(*reinterpret_cast<const edm4eic::TrackSeedCollection*>(&collection));
0443 }
0444 if (podio_typename == "edm4eic::RawHGCROCHitCollection") {
0445 return visitor(*reinterpret_cast<const edm4eic::RawHGCROCHitCollection*>(&collection));
0446 }
0447 if (podio_typename == "edm4eic::TrackerHitCollection") {
0448 return visitor(*reinterpret_cast<const edm4eic::TrackerHitCollection*>(&collection));
0449 }
0450 throw std::runtime_error("Unrecognized podio typename!");
0451 }
0452 };