CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ShallowTree.h
Go to the documentation of this file.
1 #ifndef Shallow_Tree_h
2 #define Shallow_Tree_h
3 
27 
28 #include <string>
29 #include <vector>
30 #include <TTree.h>
31 
32 class ShallowTree : public edm::EDAnalyzer {
33 private:
34  virtual void beginJob();
35  virtual void analyze(const edm::Event&, const edm::EventSetup&);
36  virtual void endJob(){}
37 
39  public:
40  virtual ~BranchConnector() {};
41  virtual void connect(const edm::Event&) = 0;
42  };
43 
44  template <class T>
46  private:
47  std::string ml; //module label
48  std::string pin; //product instance name
51  public:
53  void connect(const edm::Event&);
54  };
55 
57  TTree * tree;
58  std::vector<BranchConnector*> connectors;
60 
61 public:
62  explicit ShallowTree(const edm::ParameterSet& iConfig) : pset(iConfig) {}
63 
64  enum LEAFTYPE {BOOL=1, BOOL_V,
70 };
71 
72 #endif
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: ShallowTree.cc:11
virtual void beginJob()
Definition: ShallowTree.cc:41
virtual void connect(const edm::Event &)=0
TypedBranchConnector(edm::BranchDescription const *, std::string, TTree *)
Definition: ShallowTree.cc:28
edm::ParameterSet pset
Definition: ShallowTree.h:59
TTree * tree
Definition: ShallowTree.h:57
void connect(const edm::Event &)
Definition: ShallowTree.cc:20
ShallowTree(const edm::ParameterSet &iConfig)
Definition: ShallowTree.h:62
edm::Service< TFileService > fs
Definition: ShallowTree.h:56
virtual void endJob()
Definition: ShallowTree.h:36
std::vector< BranchConnector * > connectors
Definition: ShallowTree.h:58
long double T