Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-08 02:27:20

0001 // -*- C++ -*-
0002 //
0003 // Package:    Integration
0004 // Class:      UseValueExampleAnalyzer
0005 //
0006 /**\class UseValueExampleAnalyzer UseValueExampleAnalyzer.cc FWCore/Integration/test/UseValueExampleAnalyzer.cc
0007 
0008 Description: <one line class summary>
0009 
0010 Implementation:
0011 <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Chris D Jones
0015 //         Created:  Thu Sep  8 03:55:42 EDT 2005
0016 //
0017 //
0018 
0019 // system include files
0020 #include <memory>
0021 #include <iostream>
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/global/EDAnalyzer.h"
0025 
0026 #include "FWCore/Framework/interface/MakerMacros.h"
0027 
0028 #include "FWCore/Integration/test/ValueExample.h"
0029 #include "FWCore/ServiceRegistry/interface/Service.h"
0030 
0031 //
0032 // class decleration
0033 //
0034 
0035 class UseValueExampleAnalyzer : public edm::global::EDAnalyzer<> {
0036 public:
0037   explicit UseValueExampleAnalyzer(const edm::ParameterSet&);
0038 
0039   void analyze(edm::StreamID, const edm::Event&, const edm::EventSetup&) const final;
0040 
0041 private:
0042   // ----------member data ---------------------------
0043 };
0044 
0045 //
0046 // constants, enums and typedefs
0047 //
0048 
0049 //
0050 // static data member definitions
0051 //
0052 
0053 //
0054 // constructors and destructor
0055 //
0056 UseValueExampleAnalyzer::UseValueExampleAnalyzer(const edm::ParameterSet& /* iConfig */) {
0057   //now do what ever initialization is needed
0058 }
0059 
0060 //
0061 // member functions
0062 //
0063 
0064 // ------------ method called to produce the data  ------------
0065 void UseValueExampleAnalyzer::analyze(edm::StreamID,
0066                                       const edm::Event& /* iEvent */,
0067                                       const edm::EventSetup& /* iSetup*/) const {
0068   std::cout << " value from service " << edm::Service<ValueExample>()->value() << std::endl;
0069 }
0070 
0071 //define this as a plug-in
0072 DEFINE_FWK_MODULE(UseValueExampleAnalyzer);