--- UserCode/MitProd/TreeFiller/interface/FillMitTree.h 2008/06/18 19:17:21 1.2 +++ UserCode/MitProd/TreeFiller/interface/FillMitTree.h 2009/06/15 15:00:23 1.14 @@ -1,5 +1,5 @@ //-------------------------------------------------------------------------------------------------- -// $Id: FillMitTree.h,v 1.2 2008/06/18 19:17:21 loizides Exp $ +// $Id: FillMitTree.h,v 1.14 2009/06/15 15:00:23 loizides Exp $ // // FillMitTree // @@ -11,29 +11,40 @@ // Authors: C.Paus //-------------------------------------------------------------------------------------------------- -#ifndef TREEFILLER_FILLMITTREE_H -#define TREEFILLER_FILLMITTREE_H +#ifndef MITPROD_TREEFILLER_FILLMITTREE_H +#define MITPROD_TREEFILLER_FILLMITTREE_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "MitProd/TreeFiller/interface/BaseFiller.h" namespace mithep { + class BranchTable; + class BaseFiller; + class TreeWriter; + class ObjectService; + class FillMitTree : public edm::EDAnalyzer { public: - FillMitTree(const edm::ParameterSet&); + FillMitTree(const edm::ParameterSet &cfg); ~FillMitTree(); - void analyze (const edm::Event&, const edm::EventSetup&); - void beginJob(edm::EventSetup const&); - void endJob (); - - private: - std::vector fillers_; // list of our fillers and potential fillers + void analyze(const edm::Event &e, const edm::EventSetup &es); + void beginJob(const edm::EventSetup &es); + void endJob(); + + static ObjectService *os() { return os_; } + + protected: + bool addActiveFiller(BaseFiller *bf); + bool configure(const edm::ParameterSet &cfg); + + std::vector fillers_; //list of active fillers + bool defactive_; //default activity flag for fillers + BranchTable *brtable_; //branch dependency table + int acfnumber_; //keep track of active file number + TreeWriter *tws_; //pointer to tree writer + static ObjectService *os_; //object service (set in beginJob) }; } #endif