Main Page
Namespaces
Classes
Package Documentation
DQMServices
Components
plugins
EDMtoMEConverter.h
Go to the documentation of this file.
1
#ifndef EDMtoMEConverter_h
2
#define EDMtoMEConverter_h
3
12
// framework & common header files
13
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
14
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
15
#include "
FWCore/Framework/interface/Event.h
"
16
#include "
FWCore/Framework/interface/Run.h
"
17
#include "
FWCore/Framework/interface/LuminosityBlock.h
"
18
#include "
FWCore/Framework/interface/FileBlock.h
"
19
#include "
FWCore/Framework/interface/EventSetup.h
"
20
#include "
DataFormats/Common/interface/Handle.h
"
21
#include "
FWCore/Framework/interface/ESHandle.h
"
22
#include "
FWCore/Framework/interface/MakerMacros.h
"
23
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
24
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
25
#include "
FWCore/Utilities/interface/InputTag.h
"
26
27
//DQM services
28
#include "
DQMServices/Core/interface/DQMStore.h
"
29
#include "
FWCore/ServiceRegistry/interface/Service.h
"
30
#include "
DQMServices/Core/interface/MonitorElement.h
"
31
32
// data format
33
#include "
DataFormats/Histograms/interface/MEtoEDMFormat.h
"
34
35
// helper files
36
#include <iostream>
37
#include <cstdlib>
38
#include <string>
39
#include <memory>
40
#include <vector>
41
#include <map>
42
#include <tuple>
43
44
#include "TString.h"
45
#include "TList.h"
46
47
#include "classlib/utils/StringList.h"
48
#include "classlib/utils/StringOps.h"
49
50
class
EDMtoMEConverter
:
public
edm::EDAnalyzer
51
{
52
53
public
:
54
55
explicit
EDMtoMEConverter
(
const
edm::ParameterSet
&);
56
~EDMtoMEConverter
()
override
;
57
void
beginJob
()
override
;
58
void
endJob
()
override
;
59
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
60
void
beginRun
(
const
edm::Run
&,
const
edm::EventSetup
&)
override
;
61
void
endRun
(
const
edm::Run
&,
const
edm::EventSetup
&)
override
;
62
void
beginLuminosityBlock
(
const
edm::LuminosityBlock
&,
const
edm::EventSetup
&)
override
;
63
void
endLuminosityBlock
(
const
edm::LuminosityBlock
&,
const
edm::EventSetup
&)
override
;
64
void
respondToOpenInputFile
(
const
edm::FileBlock
&)
override
;
65
66
template
<
class
T>
67
void
getData
(
T
& iGetFrom);
68
69
using
TagList
= std::vector<uint32_t>;
70
71
private
:
72
73
std::string
name
;
74
int
verbosity
;
75
int
frequency
;
76
77
bool
convertOnEndLumi
;
78
bool
convertOnEndRun
;
79
80
DQMStore
*
dbe
;
81
82
// private statistics information
83
unsigned
int
iCountf
;
84
std::map<int,int>
iCount
;
85
86
template
<
typename
T>
87
class
Tokens
{
88
public
:
89
using
type
=
T
;
90
using
Product
=
MEtoEDM<T>
;
91
92
Tokens
() =
default
;
93
94
void
set
(
const
edm::InputTag
& runInputTag,
const
edm::InputTag
& lumiInputTag,
edm::ConsumesCollector
& iC);
95
96
void
getData
(
const
edm::Run
& iRun,
edm::Handle<Product>
&
handle
)
const
;
97
void
getData
(
const
edm::LuminosityBlock
& iLumi,
edm::Handle<Product>
&
handle
)
const
;
98
99
private
:
100
edm::EDGetTokenT<Product>
runToken
;
101
edm::EDGetTokenT<Product>
lumiToken
;
102
};
103
104
std::tuple<
105
Tokens<TH1F>
,
106
Tokens<TH1S>
,
107
Tokens<TH1D>
,
108
Tokens<TH2F>
,
109
Tokens<TH2S>
,
110
Tokens<TH2D>
,
111
Tokens<TH3F>
,
112
Tokens<TProfile>
,
113
Tokens<TProfile2D>
,
114
Tokens<double>
,
115
Tokens<int>
,
116
Tokens<long long>
,
117
Tokens<TString>
118
>
tokens_
;
119
};
// end class declaration
120
121
#endif
edm::FileBlock
Definition:
FileBlock.h:20
EDMtoMEConverter::dbe
DQMStore * dbe
Definition:
EDMtoMEConverter.h:80
EDMtoMEConverter::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition:
EDMtoMEConverter.cc:287
MessageLogger.h
EDMtoMEConverter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
EDMtoMEConverter.cc:325
EDMtoMEConverter::endRun
void endRun(const edm::Run &, const edm::EventSetup &) override
Definition:
EDMtoMEConverter.cc:307
EDMtoMEConverter::respondToOpenInputFile
void respondToOpenInputFile(const edm::FileBlock &) override
Definition:
EDMtoMEConverter.cc:281
MEtoEDMFormat.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
Event.h
EDMtoMEConverter::EDMtoMEConverter
EDMtoMEConverter(const edm::ParameterSet &)
Definition:
EDMtoMEConverter.cc:218
edm::LuminosityBlock
Definition:
LuminosityBlock.h:46
EDMtoMEConverter::endLuminosityBlock
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition:
EDMtoMEConverter.cc:318
MakerMacros.h
edm::Handle
Definition:
AssociativeIterator.h:47
EventSetup.h
EDMtoMEConverter::Tokens::Tokens
Tokens()=default
edm::EDGetTokenT< Product >
Frameworkfwd.h
EDMtoMEConverter::Tokens::type
T type
Definition:
EDMtoMEConverter.h:89
EDMtoMEConverter::~EDMtoMEConverter
~EDMtoMEConverter() override
ParameterSet.h
EDMtoMEConverter::tokens_
std::tuple< Tokens< TH1F >, Tokens< TH1S >, Tokens< TH1D >, Tokens< TH2F >, Tokens< TH2S >, Tokens< TH2D >, Tokens< TH3F >, Tokens< TProfile >, Tokens< TProfile2D >, Tokens< double >, Tokens< int >, Tokens< long long >, Tokens< TString > > tokens_
Definition:
EDMtoMEConverter.h:118
EDMtoMEConverter::Tokens::runToken
edm::EDGetTokenT< Product > runToken
Definition:
EDMtoMEConverter.h:100
DQMStore
Definition:
DQMStore.h:78
MEtoEDM
Definition:
MEtoEDMFormat.h:37
DQMStore.h
EDMtoMEConverter::Tokens
Definition:
EDMtoMEConverter.h:87
ESHandle.h
EDMtoMEConverter::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition:
EDMtoMEConverter.cc:314
EDMtoMEConverter::beginJob
void beginJob() override
Definition:
EDMtoMEConverter.cc:267
Service.h
edm::EventSetup
Definition:
EventSetup.h:47
Run.h
edm::EDAnalyzer
Definition:
EDAnalyzer.h:27
EDAnalyzer.h
EDMtoMEConverter::endJob
void endJob() override
Definition:
EDMtoMEConverter.cc:271
EDMtoMEConverter::convertOnEndLumi
bool convertOnEndLumi
Definition:
EDMtoMEConverter.h:77
EDMtoMEConverter::convertOnEndRun
bool convertOnEndRun
Definition:
EDMtoMEConverter.h:78
cmsBatch.handle
handle
Definition:
cmsBatch.py:284
MonitorElement.h
EDMtoMEConverter::verbosity
int verbosity
Definition:
EDMtoMEConverter.h:74
LuminosityBlock.h
EDMtoMEConverter::TagList
std::vector< uint32_t > TagList
Definition:
EDMtoMEConverter.h:69
edm::InputTag
Definition:
InputTag.h:15
EDMtoMEConverter
Definition:
EDMtoMEConverter.h:50
InputTag.h
EDMtoMEConverter::name
std::string name
Definition:
EDMtoMEConverter.h:73
edm::ParameterSet
Definition:
ParameterSet.h:36
EDMtoMEConverter::frequency
int frequency
Definition:
EDMtoMEConverter.h:75
EDMtoMEConverter::Tokens::getData
void getData(const edm::Run &iRun, edm::Handle< Product > &handle) const
Definition:
EDMtoMEConverter.cc:23
edm::Event
Definition:
Event.h:69
T
long double T
Definition:
Basic3DVectorLD.h:66
EDMtoMEConverter::iCountf
unsigned int iCountf
Definition:
EDMtoMEConverter.h:83
FileBlock.h
EDMtoMEConverter::getData
void getData(T &iGetFrom)
Definition:
EDMtoMEConverter.cc:331
EDMtoMEConverter::Tokens::lumiToken
edm::EDGetTokenT< Product > lumiToken
Definition:
EDMtoMEConverter.h:101
edm::Run
Definition:
Run.h:43
EDMtoMEConverter::iCount
std::map< int, int > iCount
Definition:
EDMtoMEConverter.h:84
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Handle.h
Generated for CMSSW Reference Manual by
1.8.11