From 838700c9f25030cc6dafd7197b99ad2586dda9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Brochet?= Date: Fri, 16 Oct 2015 09:05:46 +0200 Subject: [PATCH] Make pruned particles branches transient --- interface/GenParticlesProducer.h | 12 ++++++------ interface/Types.h | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/interface/GenParticlesProducer.h b/interface/GenParticlesProducer.h index 244d51f..16294b9 100644 --- a/interface/GenParticlesProducer.h +++ b/interface/GenParticlesProducer.h @@ -36,12 +36,12 @@ class GenParticlesProducer: public Framework::Producer { public: // Tree members - std::vector& packed_p4 = tree_packed["p4"].write>(); - std::vector& packed_y = tree_packed["y"].write>(); - std::vector& packed_pdg_id = tree_packed["pdg_id"].write>(); - std::vector& packed_status = tree_packed["status"].write>(); - std::vector& packed_status_flags = tree_packed["status_flags"].write>(); - std::vector>& packed_mothers_index = tree_packed["mothers_index"].write>>(); + std::vector& packed_p4 = tree_packed["p4"].transient_write>(); + std::vector& packed_y = tree_packed["y"].transient_write>(); + std::vector& packed_pdg_id = tree_packed["pdg_id"].transient_write>(); + std::vector& packed_status = tree_packed["status"].transient_write>(); + std::vector& packed_status_flags = tree_packed["status_flags"].transient_write>(); + std::vector>& packed_mothers_index = tree_packed["mothers_index"].transient_write>>(); std::vector& pruned_p4 = tree_pruned["p4"].write>(); std::vector& pruned_y = tree_pruned["y"].write>(); diff --git a/interface/Types.h b/interface/Types.h index cdd1b19..48e1aea 100644 --- a/interface/Types.h +++ b/interface/Types.h @@ -3,5 +3,6 @@ #include #define BRANCH(NAME, ...) __VA_ARGS__& NAME = tree[#NAME].write<__VA_ARGS__>() +#define TRANSIENT_BRANCH(NAME, ...) __VA_ARGS__& NAME = tree[#NAME].transient_write<__VA_ARGS__>() typedef ROOT::Math::LorentzVector> LorentzVector;