File indexing completed on 2024-04-06 12:24:17
0001 #ifndef NTupler_H
0002 #define NTupler_H
0003
0004 #include "FWCore/Framework/interface/Frameworkfwd.h"
0005 #include "FWCore/Framework/interface/ProducesCollector.h"
0006
0007 #include "FWCore/Framework/interface/Event.h"
0008 #include "TTree.h"
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 class NTupler {
0019 public:
0020 NTupler() : useTFileService_(false) {}
0021 virtual ~NTupler() {}
0022
0023 virtual unsigned int registerleaves(edm::ProducesCollector) = 0;
0024 virtual void fill(edm::Event& iEvent) = 0;
0025
0026 protected:
0027 bool useTFileService_;
0028 TTree* tree_;
0029 };
0030
0031 #include "FWCore/PluginManager/interface/PluginFactory.h"
0032 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0033
0034 typedef edmplugin::PluginFactory<NTupler*(const edm::ParameterSet&)> NTuplerFactory;
0035
0036 #endif