Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:40

0001 #ifndef PhysicsTools_NanoAOD_SummaryTableOutputFields_h
0002 #define PhysicsTools_NanoAOD_SummaryTableOutputFields_h
0003 
0004 #include "DataFormats/NanoAOD/interface/MergeableCounterTable.h"
0005 
0006 #include "RNTupleFieldPtr.h"
0007 
0008 class SummaryTableOutputFields {
0009 public:
0010   SummaryTableOutputFields() = default;
0011   SummaryTableOutputFields(const nanoaod::MergeableCounterTable &tab, RNTupleModel &model);
0012   void fill(const nanoaod::MergeableCounterTable &tab);
0013 
0014 private:
0015   template <typename T, typename Col>
0016   std::vector<RNTupleFieldPtr<T>> makeFields(const std::vector<Col> &tabcols, RNTupleModel &model);
0017   template <typename T, typename Col>
0018   static void fillScalarFields(const std::vector<Col> &tabcols, std::vector<RNTupleFieldPtr<T>> fields);
0019   template <typename T, typename Col>
0020   static void fillVectorFields(const std::vector<Col> &tabcols, std::vector<RNTupleFieldPtr<T>> fields);
0021 
0022   std::vector<RNTupleFieldPtr<std::uint64_t>> m_intFields;
0023   std::vector<RNTupleFieldPtr<double>> m_floatFields;
0024   std::vector<RNTupleFieldPtr<double>> m_floatWithNormFields;
0025   std::vector<RNTupleFieldPtr<std::vector<double>>> m_vfloatFields;
0026   std::vector<RNTupleFieldPtr<std::vector<double>>> m_vfloatWithNormFields;
0027   std::vector<RNTupleFieldPtr<std::vector<std::uint64_t>>> m_vintFields;
0028 };
0029 
0030 #endif