CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TFWLiteSelector.h
Go to the documentation of this file.
1 #ifndef FWCore_TFWLiteSelector_TFWLiteSelector_h
2 #define FWCore_TFWLiteSelector_TFWLiteSelector_h
3 // -*- C++ -*-
4 //
5 // Package: TFWLiteSelector
6 // Class : TFWLiteSelector
7 //
40 //
41 // Original Author: Chris Jones
42 // Created: Fri Jun 30 21:04:46 CDT 2006
43 //
44 
45 // system include files
46 class TList;
47 
48 // user include files
49 
50 #include "boost/shared_ptr.hpp"
51 
53 
54 // forward declarations
55 template <class TWorker>
57 {
58 
59  public:
61  virtual ~TFWLiteSelector() {}
62 
63  // ---------- const member functions ---------------------
64 
65  // ---------- static member functions --------------------
66 
67  // ---------- member functions ---------------------------
68 
69  private:
70  TFWLiteSelector(const TFWLiteSelector&); // stop default
71 
72  const TFWLiteSelector& operator=(const TFWLiteSelector&); // stop default
73 
74  virtual void preProcessing(const TList*in, TList& out) {
75  //need to remove all output so that when we delete the worker
76  // we are not left with a stale pointer
77  out.Clear();
78  worker_.reset(new TWorker(in,out));
79  }
80  virtual void process(const edm::Event& iEvent) {
81  worker_->process(iEvent);
82  }
83  virtual void postProcessing(TList& out) {
84  worker_->postProcess(out);
85  }
86 
87  // ---------- member data --------------------------------
88  boost::shared_ptr<TWorker> worker_;
89  ClassDef(TFWLiteSelector,2)
90 };
91 
92 #endif
virtual void preProcessing(const TList *in, TList &out)
boost::shared_ptr< TWorker > worker_
int iEvent
Definition: GenABIO.cc:243
virtual void postProcessing(TList &out)
virtual void process(const edm::Event &iEvent)
const TFWLiteSelector & operator=(const TFWLiteSelector &)
tuple out
Definition: dbtoconf.py:99
virtual ~TFWLiteSelector()