Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:17

0001 // -*- C++ -*-
0002 //
0003 // Package:    TestBeginEndJobAnalyzer
0004 // Class:      TestBeginEndJobAnalyzer
0005 //
0006 /**\class TestBeginEndJobAnalyzer TestBeginEndJobAnalyzer.cc stubs/TestBeginEndJobAnalyzer/src/TestBeginEndJobAnalyzer.cc
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Chris Jones
0015 //         Created:  Fri Sep  2 13:54:17 EDT 2005
0016 //
0017 //
0018 
0019 #include "FWCore/Framework/test/stubs/TestBeginEndJobAnalyzer.h"
0020 #include "FWCore/Framework/interface/Frameworkfwd.h"
0021 #include <memory>
0022 #include <iostream>
0023 
0024 void hello(const char* hi) {
0025   //std::cout << "IN " << hi << std::endl;
0026 }
0027 
0028 TestBeginEndJobAnalyzer::Control& TestBeginEndJobAnalyzer::control() {
0029   static Control l;
0030   return l;
0031 }
0032 
0033 TestBeginEndJobAnalyzer::TestBeginEndJobAnalyzer(const edm::ParameterSet& /* iConfig */) { hello("constr"); }
0034 
0035 TestBeginEndJobAnalyzer::~TestBeginEndJobAnalyzer() {
0036   hello("destr");
0037   control().destructorCalled = true;
0038 }
0039 
0040 void TestBeginEndJobAnalyzer::beginJob() {
0041   hello("bjob");
0042   control().beginJobCalled = true;
0043 }
0044 
0045 void TestBeginEndJobAnalyzer::endJob() {
0046   hello("ejob");
0047   control().endJobCalled = true;
0048 }
0049 
0050 void TestBeginEndJobAnalyzer::beginRun(edm::Run const&, edm::EventSetup const&) { control().beginRunCalled = true; }
0051 
0052 void TestBeginEndJobAnalyzer::endRun(edm::Run const&, edm::EventSetup const&) { control().endRunCalled = true; }
0053 
0054 void TestBeginEndJobAnalyzer::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) {
0055   control().beginLumiCalled = true;
0056 }
0057 
0058 void TestBeginEndJobAnalyzer::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) {
0059   control().endLumiCalled = true;
0060 }
0061 
0062 void TestBeginEndJobAnalyzer::analyze(const edm::Event& /* iEvent */, const edm::EventSetup& /* iSetup */) {}