Wrapper class around a class of type BasicAnalyzer to "convert" it into a full EDAnalyzer. More...
#include <PhysicsTools/UtilAlgos/interface/EDAnalyzerWrapper.h>
Wrapper class around a class of type BasicAnalyzer to "convert" it into a full EDAnalyzer.
This template class is a wrapper round classes of type BasicAnalyzer as defined in in the BasicAnalyzer.h file of this package. From this class the wrapper expects the following member functions:
+ a contructor with a const edm::ParameterSet& and a TFileDirectory& as input. + a beginJob function + a endJob function + a analyze function with an const edm::EventBase& as input
these functions are called within the wrapper. The wrapper translates the common class into a basic EDAnalyzer as shown below:
include "PhysicsTools/PatExamples/interface/BasicMuonAnalyzer.h" include "PhysicsTools/UtilAlgos/interface/EDAnalyzerWrapper.h"
typedef edm::AnalyzerWrapper<BasicMuonAnalyzer> WrappedEDAnalyzer;
include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE(WrappedEDAnalyzer);
With this wrapper class we have the use case in mind that you keep classes, which easily can be used both within the full framework and within FWLite.
NOTE: in the current implementation this wrapper class does not support use of the EventSetup. If you want to make use of this feature we recommend you to start from an EDAnalyzer from the very beginning and just to stay within the full framework.