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 
29 
30 #include <string>
31 #include <vector>
32 #include <TTree.h>
33 
34 class ShallowTree : public edm::EDAnalyzer {
35 private:
36  virtual void beginJob();
37  virtual void analyze(const edm::Event&, const edm::EventSetup&);
38  virtual void endJob(){}
39 
41  public:
42  virtual ~BranchConnector() {};
43  virtual void connect(const edm::Event&) = 0;
44  };
45 
46  template <class T>
48  private:
49  std::string ml; //module label
50  std::string pin; //product instance name
53  public:
55  void connect(const edm::Event&);
56  };
57 
59  TTree * tree;
60  std::vector<BranchConnector*> connectors;
62 
63 public:
64  explicit ShallowTree(const edm::ParameterSet& iConfig) : pset(iConfig) {}
65 
66  enum LEAFTYPE {BOOL=1, BOOL_V,
72 };
73 
74 #endif
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: ShallowTree.cc:13
virtual void beginJob()
Definition: ShallowTree.cc:42
virtual void connect(const edm::Event &)=0
TypedBranchConnector(edm::BranchDescription const *, std::string, TTree *)
Definition: ShallowTree.cc:29
edm::ParameterSet pset
Definition: ShallowTree.h:61
TTree * tree
Definition: ShallowTree.h:59
void connect(const edm::Event &)
Definition: ShallowTree.cc:21
ShallowTree(const edm::ParameterSet &iConfig)
Definition: ShallowTree.h:64
edm::Service< TFileService > fs
Definition: ShallowTree.h:58
virtual void endJob()
Definition: ShallowTree.h:38
std::vector< BranchConnector * > connectors
Definition: ShallowTree.h:60
long double T