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 <stdlib.h>
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
virtual
~EDMtoMEConverter
();
57
virtual
void
beginJob
();
58
virtual
void
endJob
();
59
virtual
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&);
60
virtual
void
beginRun
(
const
edm::Run
&,
const
edm::EventSetup
&);
61
virtual
void
endRun
(
const
edm::Run
&,
const
edm::EventSetup
&);
62
virtual
void
beginLuminosityBlock
(
const
edm::LuminosityBlock
&,
const
edm::EventSetup
&);
63
virtual
void
endLuminosityBlock
(
const
edm::LuminosityBlock
&,
const
edm::EventSetup
&);
64
virtual
void
respondToOpenInputFile
(
const
edm::FileBlock
&);
65
66
template
<
class
T>
67
void
getData
(
T
& iGetFrom);
68
69
typedef
std::vector<uint32_t>
TagList
;
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
() {}
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
EDMtoMEConverter::analyze
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition:
EDMtoMEConverter.cc:325
edm::FileBlock
Definition:
FileBlock.h:20
EDMtoMEConverter::TagList
std::vector< uint32_t > TagList
Definition:
EDMtoMEConverter.h:69
EDMtoMEConverter::dbe
DQMStore * dbe
Definition:
EDMtoMEConverter.h:80
MessageLogger.h
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:45
EDMtoMEConverter::Tokens::Tokens
Tokens()
Definition:
EDMtoMEConverter.h:92
MakerMacros.h
edm::Handle
Definition:
AssociativeIterator.h:47
EventSetup.h
EDMtoMEConverter::endRun
virtual void endRun(const edm::Run &, const edm::EventSetup &)
Definition:
EDMtoMEConverter.cc:307
edm::EDGetTokenT< Product >
Frameworkfwd.h
EDMtoMEConverter::Tokens::type
T type
Definition:
EDMtoMEConverter.h:89
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:75
MEtoEDM
Definition:
MEtoEDMFormat.h:66
EDMtoMEConverter::beginRun
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
Definition:
EDMtoMEConverter.cc:287
EDMtoMEConverter::endLuminosityBlock
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
Definition:
EDMtoMEConverter.cc:318
DQMStore.h
EDMtoMEConverter::endJob
virtual void endJob()
Definition:
EDMtoMEConverter.cc:271
EDMtoMEConverter::beginJob
virtual void beginJob()
Definition:
EDMtoMEConverter.cc:267
EDMtoMEConverter::Tokens
Definition:
EDMtoMEConverter.h:87
ESHandle.h
Service.h
edm::EventSetup
Definition:
EventSetup.h:45
Run.h
edm::EDAnalyzer
Definition:
EDAnalyzer.h:27
EDAnalyzer.h
EDMtoMEConverter::convertOnEndLumi
bool convertOnEndLumi
Definition:
EDMtoMEConverter.h:77
EDMtoMEConverter::respondToOpenInputFile
virtual void respondToOpenInputFile(const edm::FileBlock &)
Definition:
EDMtoMEConverter.cc:281
EDMtoMEConverter::convertOnEndRun
bool convertOnEndRun
Definition:
EDMtoMEConverter.h:78
cmsBatch.handle
handle
Definition:
cmsBatch.py:284
MonitorElement.h
EDMtoMEConverter::beginLuminosityBlock
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
Definition:
EDMtoMEConverter.cc:314
EDMtoMEConverter::verbosity
int verbosity
Definition:
EDMtoMEConverter.h:74
LuminosityBlock.h
edm::InputTag
Definition:
InputTag.h:15
EDMtoMEConverter
Definition:
EDMtoMEConverter.h:50
InputTag.h
EDMtoMEConverter::~EDMtoMEConverter
virtual ~EDMtoMEConverter()
Definition:
EDMtoMEConverter.cc:265
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:66
T
long double T
Definition:
Basic3DVectorLD.h:57
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:42
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