CMS 3D CMS Logo

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