From 8dae4bc640473442e098bf00686e15540e10e60e Mon Sep 17 00:00:00 2001 From: Sebastien Wertz Date: Wed, 11 Jan 2023 15:49:01 +0100 Subject: [PATCH] fix inconsistent double variable usage in flat table --- PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h b/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h index 44af0e12cab9c..ebfd12dc637d8 100644 --- a/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h +++ b/PhysicsTools/NanoAOD/interface/SimpleFlatTableProducer.h @@ -131,6 +131,8 @@ class SimpleFlatTableProducerBase : public edm::stream::EDProducer<> { vars_.push_back(std::make_unique(vname, varPSet)); else if (type == "float") vars_.push_back(std::make_unique(vname, varPSet)); + else if (type == "double") + vars_.push_back(std::make_unique(vname, varPSet)); else if (type == "int8") vars_.push_back(std::make_unique(vname, varPSet)); else if (type == "uint8") @@ -165,7 +167,7 @@ class SimpleFlatTableProducerBase : public edm::stream::EDProducer<> { variable.add("doc")->setComment("few words description of the branch content"); variable.ifValue(edm::ParameterDescription( "type", "int", true, edm::Comment("the c++ type of the branch in the flat table")), - edm::allowedValues("int", "uint", "float", "int8", "uint8", "int16", "uint16", "bool")); + edm::allowedValues("int", "uint", "float", "double", "int8", "uint8", "int16", "uint16", "bool")); variable.addOptionalNode( edm::ParameterDescription( "precision", true, edm::Comment("the precision with which to store the value in the flat table")) xor @@ -205,6 +207,7 @@ class SimpleFlatTableProducerBase : public edm::stream::EDProducer<> { typedef FuncVariable, int32_t> IntVar; typedef FuncVariable, uint32_t> UIntVar; typedef FuncVariable, float> FloatVar; + typedef FuncVariable, double> DoubleVar; typedef FuncVariable, int8_t> Int8Var; typedef FuncVariable, uint8_t> UInt8Var; typedef FuncVariable, int16_t> Int16Var; @@ -278,7 +281,7 @@ class SimpleFlatTableProducer : public SimpleFlatTableProducerBase("doc")->setComment("few words description of the branch content"); extvariable.ifValue(edm::ParameterDescription( "type", "int", true, edm::Comment("the c++ type of the branch in the flat table")), - edm::allowedValues("int", "uint", "float", "int8", "uint8", "int16", "uint16", "bool")); + edm::allowedValues("int", "uint", "float", "double", "int8", "uint8", "int16", "uint16", "bool")); extvariable.addOptionalNode( edm::ParameterDescription( "precision", true, edm::Comment("the precision with which to store the value in the flat table")) xor