Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Validation
RecoMET
src
METFileSaver.cc
Go to the documentation of this file.
1
#include "
Validation/RecoMET/interface/METFileSaver.h
"
2
// author: Mike Schmitt, University of Florida
3
// first version 8/24/2006
4
// modification: Bobby Scurlock
5
// date: 03.20.2008
6
// notes: This is to save outputfile.
7
8
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
9
#include "
FWCore/Framework/interface/MakerMacros.h
"
10
11
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
12
#include "
FWCore/ServiceRegistry/interface/Service.h
"
13
14
#include "
FWCore/Framework/interface/Event.h
"
15
#include "
DataFormats/Common/interface/Handle.h
"
16
//#include "FWCore/Framework/interface/Handle.h"
17
#include "
FWCore/Framework/interface/ESHandle.h
"
18
19
#include <vector>
20
#include <utility>
21
#include <ostream>
22
#include <fstream>
23
#include <iostream>
24
#include <algorithm>
25
#include <cmath>
26
#include <memory>
27
#include "
DQMServices/Core/interface/DQMStore.h
"
28
29
METFileSaver::METFileSaver
(
const
edm::ParameterSet
& iConfig)
30
{
31
outputFile_
= iConfig.
getUntrackedParameter
<std::string>(
"OutputFile"
);
32
if
(
outputFile_
.size() > 0)
33
edm::LogInfo
(
"OutputInfo"
) <<
" MET Task histograms will be saved to '"
<<
outputFile_
.c_str() <<
"'"
;
34
else
edm::LogInfo
(
"OutputInfo"
) <<
" MET Task histograms will NOT be saved"
;
35
36
}
37
38
void
METFileSaver::beginJob
()
39
{
40
// get ahold of back-end interface
41
dbe_
=
edm::Service<DQMStore>
().
operator
->();
42
43
}
44
45
void
METFileSaver::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
46
{
47
}
48
49
void
METFileSaver::endJob
()
50
{
51
// Store the DAQ Histograms
52
if
(
outputFile_
.size() > 0 &&
dbe_
)
53
dbe_
->
save
(
outputFile_
);
54
}
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
MessageLogger.h
edm::Service< DQMStore >
cppFunctionSkipper.operator
string operator
Definition:
cppFunctionSkipper.py:10
Event.h
DQMStore::save
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition:
DQMStore.cc:2113
MakerMacros.h
Handle.h
METFileSaver::beginJob
virtual void beginJob()
Definition:
METFileSaver.cc:38
iEvent
int iEvent
Definition:
GenABIO.cc:243
DQMStore.h
ESHandle.h
Service.h
edm::EventSetup
Definition:
EventSetup.h:44
METFileSaver::analyze
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition:
METFileSaver.cc:45
edm::LogInfo
Definition:
MessageLogger.h:214
METFileSaver::endJob
virtual void endJob()
Definition:
METFileSaver.cc:49
METFileSaver::outputFile_
std::string outputFile_
Definition:
METFileSaver.h:41
METFileSaver.h
edm::ParameterSet
Definition:
ParameterSet.h:35
METFileSaver::dbe_
DQMStore * dbe_
Definition:
METFileSaver.h:37
edm::Event
Definition:
Event.h:50
METFileSaver::METFileSaver
METFileSaver(const edm::ParameterSet &)
Definition:
METFileSaver.cc:29
ModuleDef.h
Generated for CMSSW Reference Manual by
1.8.5