1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
// -*- C++ -*-
//
// Package: Integration
// Class: UseValueExampleAnalyzer
//
/**\class UseValueExampleAnalyzer UseValueExampleAnalyzer.cc FWCore/Integration/test/UseValueExampleAnalyzer.cc
Description: <one line class summary>
Implementation:
<Notes on implementation>
*/
//
// Original Author: Chris D Jones
// Created: Thu Sep 8 03:55:42 EDT 2005
//
//
// system include files
#include <memory>
#include <iostream>
// user include files
#include "FWCore/Framework/interface/global/EDAnalyzer.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "ValueExample.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
//
// class decleration
//
class UseValueExampleAnalyzer : public edm::global::EDAnalyzer<> {
public:
explicit UseValueExampleAnalyzer(const edm::ParameterSet&);
void analyze(edm::StreamID, const edm::Event&, const edm::EventSetup&) const final;
private:
// ----------member data ---------------------------
};
//
// constants, enums and typedefs
//
//
// static data member definitions
//
//
// constructors and destructor
//
UseValueExampleAnalyzer::UseValueExampleAnalyzer(const edm::ParameterSet& /* iConfig */) {
//now do what ever initialization is needed
}
//
// member functions
//
// ------------ method called to produce the data ------------
void UseValueExampleAnalyzer::analyze(edm::StreamID,
const edm::Event& /* iEvent */,
const edm::EventSetup& /* iSetup*/) const {
std::cout << " value from service " << edm::Service<ValueExample>()->value() << std::endl;
}
//define this as a plug-in
DEFINE_FWK_MODULE(UseValueExampleAnalyzer);
|