ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeFiller/interface/BaseFiller.h
Revision: 1.7
Committed: Mon Jul 7 16:14:01 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.6: +4 -4 lines
Log Message:
coding conventions

File Contents

# User Rev Content
1 paus 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.7 // $Id: BaseFiller.h,v 1.6 2008/07/01 14:38:33 loizides Exp $
3 paus 1.1 //
4     // BaseFiller
5     //
6     // Base class to define the interface for a filler.
7     //
8     // Authors: C.Paus
9     //--------------------------------------------------------------------------------------------------
10 loizides 1.2
11 paus 1.1 #ifndef TREEFILLER_BASEFILLER_H
12     #define TREEFILLER_BASEFILLER_H
13    
14     #include "FWCore/Framework/interface/Event.h"
15     #include "FWCore/ParameterSet/interface/ParameterSet.h"
16     #include "FWCore/Framework/interface/Frameworkfwd.h"
17     #include "MitAna/DataUtil/interface/TreeWriter.h"
18    
19     namespace mithep
20     {
21     class BaseFiller
22     {
23     public:
24 loizides 1.6 BaseFiller(const edm::ParameterSet &cfg, const char *name, bool active=true);
25 paus 1.1 virtual ~BaseFiller() {}
26    
27 loizides 1.3 bool Active() const { return active_; }
28 loizides 1.7 virtual void BookDataBlock(TreeWriter &tws) = 0;
29     virtual void FillDataBlock(const edm::Event &e, const edm::EventSetup &es) = 0;
30 loizides 1.3 const std::string &Name() const { return name_; }
31 loizides 1.7 virtual void ResolveLinks(const edm::Event &e, const edm::EventSetup &es) {}
32 paus 1.1
33     protected:
34 loizides 1.6 const edm::ParameterSet &Conf() const { return config_; }
35    
36 loizides 1.5 const std::string name_; //name of this filler
37     const edm::ParameterSet config_; //parameter set for this filler
38     const bool active_; //=1 if active
39 paus 1.1 };
40     }
41     #endif