CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/FWCore/Framework/src/EDAnalyzer.cc

Go to the documentation of this file.
00001 /*----------------------------------------------------------------------
00002   
00003 
00004 ----------------------------------------------------------------------*/
00005 
00006 #include "FWCore/Framework/interface/EDAnalyzer.h"
00007 #include "FWCore/Framework/src/CPCSentry.h"
00008 #include "FWCore/Framework/interface/Event.h"
00009 #include "FWCore/Framework/interface/LuminosityBlock.h"
00010 #include "FWCore/Framework/interface/Run.h"
00011 #include "FWCore/Framework/src/edmodule_mightGet_config.h"
00012 
00013 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
00015 
00016 namespace edm {
00017   EDAnalyzer::~EDAnalyzer() {
00018   }
00019 
00020   bool
00021   EDAnalyzer::doEvent(EventPrincipal const& ep, EventSetup const& c,
00022                         CurrentProcessingContext const* cpc) {
00023     detail::CPCSentry sentry(current_context_, cpc);
00024     Event e(const_cast<EventPrincipal&>(ep), moduleDescription_);
00025     this->analyze(e, c);
00026     return true;
00027   }
00028 
00029   void
00030   EDAnalyzer::doBeginJob() {
00031     this->beginJob();
00032   }
00033 
00034   void 
00035   EDAnalyzer::doEndJob() {
00036     this->endJob();
00037   }
00038 
00039   bool
00040   EDAnalyzer::doBeginRun(RunPrincipal const& rp, EventSetup const& c,
00041                         CurrentProcessingContext const* cpc) {
00042     detail::CPCSentry sentry(current_context_, cpc);
00043     Run r(const_cast<RunPrincipal&>(rp), moduleDescription_);
00044     this->beginRun(r, c);
00045     return true;
00046   }
00047 
00048   bool
00049   EDAnalyzer::doEndRun(RunPrincipal const& rp, EventSetup const& c,
00050                         CurrentProcessingContext const* cpc) {
00051     detail::CPCSentry sentry(current_context_, cpc);
00052     Run r(const_cast<RunPrincipal&>(rp), moduleDescription_);
00053     this->endRun(r, c);
00054     return true;
00055   }
00056 
00057   bool
00058   EDAnalyzer::doBeginLuminosityBlock(LuminosityBlockPrincipal const& lbp, EventSetup const& c,
00059                         CurrentProcessingContext const* cpc) {
00060     detail::CPCSentry sentry(current_context_, cpc);
00061     LuminosityBlock lb(const_cast<LuminosityBlockPrincipal&>(lbp), moduleDescription_);
00062     this->beginLuminosityBlock(lb, c);
00063     return true;
00064   }
00065 
00066   bool
00067   EDAnalyzer::doEndLuminosityBlock(LuminosityBlockPrincipal const& lbp, EventSetup const& c,
00068                         CurrentProcessingContext const* cpc) {
00069     detail::CPCSentry sentry(current_context_, cpc);
00070     LuminosityBlock lb(const_cast<LuminosityBlockPrincipal&>(lbp), moduleDescription_);
00071     this->endLuminosityBlock(lb, c);
00072     return true;
00073   }
00074 
00075   void
00076   EDAnalyzer::doRespondToOpenInputFile(FileBlock const& fb) {
00077     respondToOpenInputFile(fb);
00078   }
00079 
00080   void
00081   EDAnalyzer::doRespondToCloseInputFile(FileBlock const& fb) {
00082     respondToCloseInputFile(fb);
00083   }
00084 
00085   void
00086   EDAnalyzer::doRespondToOpenOutputFiles(FileBlock const& fb) {
00087     respondToOpenOutputFiles(fb);
00088   }
00089 
00090   void
00091   EDAnalyzer::doRespondToCloseOutputFiles(FileBlock const& fb) {
00092     respondToCloseOutputFiles(fb);
00093   }
00094 
00095   void 
00096   EDAnalyzer::doPreForkReleaseResources() {
00097     preForkReleaseResources();
00098   }
00099   
00100   void 
00101   EDAnalyzer::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
00102     postForkReacquireResources(iChildIndex, iNumberOfChildren);
00103   }
00104    
00105   CurrentProcessingContext const*
00106   EDAnalyzer::currentContext() const {
00107     return current_context_;
00108   }
00109 
00110   void
00111   EDAnalyzer::fillDescriptions(ConfigurationDescriptions& descriptions) {
00112     ParameterSetDescription desc;
00113     desc.setUnknown();
00114     descriptions.addDefault(desc);
00115   }
00116   
00117   void
00118   EDAnalyzer::prevalidate(ConfigurationDescriptions& iConfig) {
00119     edmodule_mightGet_config(iConfig);
00120   }
00121   
00122 
00123 
00124   static const std::string kBaseType("EDAnalyzer");
00125   const std::string&
00126   EDAnalyzer::baseType() {
00127     return kBaseType;
00128   }
00129 }