Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CondTools
Geometry
plugins
CSCRecoIdealDBLoader.cc
Go to the documentation of this file.
1
#include "
CSCRecoIdealDBLoader.h
"
2
3
#include <
Geometry/CSCGeometryBuilder/src/CSCGeometryParsFromDD.h
>
4
5
#include "
FWCore/ServiceRegistry/interface/Service.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
#include "
FWCore/Framework/interface/Event.h
"
8
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
9
#include "
FWCore/Framework/interface/EventSetup.h
"
10
#include "
FWCore/Framework/interface/ESTransientHandle.h
"
11
#include "
FWCore/Framework/interface/ESHandle.h
"
12
#include "
CondFormats/GeometryObjects/interface/RecoIdealGeometry.h
"
13
#include "
CondFormats/GeometryObjects/interface/CSCRecoDigiParameters.h
"
14
#include "
Geometry/Records/interface/CSCRecoGeometryRcd.h
"
15
#include "
Geometry/Records/interface/CSCRecoDigiParametersRcd.h
"
16
#include "
Geometry/Records/interface/MuonGeometryRecord.h
"
17
18
#include "
DetectorDescription/Core/interface/DDCompactView.h
"
19
20
#include "
Geometry/Records/interface/MuonNumberingRecord.h
"
21
#include "
Geometry/MuonNumbering/interface/MuonDDDConstants.h
"
22
23
#include <iostream>
24
#include <string>
25
#include <vector>
26
#include <map>
27
#include <sstream>
28
#include <algorithm>
29
30
CSCRecoIdealDBLoader::CSCRecoIdealDBLoader
(
const
edm::ParameterSet
& iConfig) : label_()
31
{
32
std::cout
<<
"CSCRecoIdealDBLoader::CSCRecoIdealDBLoader"
<<std::endl;
33
}
34
35
CSCRecoIdealDBLoader::~CSCRecoIdealDBLoader
()
36
{
37
std::cout
<<
"CSCRecoIdealDBLoader::~CSCRecoIdealDBLoader"
<<std::endl;
38
}
39
40
void
41
CSCRecoIdealDBLoader::beginRun
(
const
edm::Run
&,
edm::EventSetup
const
& es)
42
{
43
std::cout
<<
"CSCRecoIdealDBLoader::beginRun"
<<std::endl;
44
RecoIdealGeometry
* rig =
new
RecoIdealGeometry
;
45
CSCRecoDigiParameters
* rdp =
new
CSCRecoDigiParameters
;
46
edm::Service<cond::service::PoolDBOutputService>
mydbservice;
47
if
( !mydbservice.
isAvailable
() ){
48
edm::LogError
(
"CSCRecoIdealDBLoader"
)<<
"PoolDBOutputService unavailable"
;
49
return
;
50
}
51
52
edm::ESTransientHandle<DDCompactView>
pDD;
53
edm::ESHandle<MuonDDDConstants>
pMNDC;
54
es.
get
<
IdealGeometryRecord
>().
get
(
label_
, pDD );
55
es.
get
<
MuonNumberingRecord
>().
get
( pMNDC );
56
57
const
DDCompactView
& cpv = *pDD;
58
CSCGeometryParsFromDD
cscgp;
59
60
cscgp.
build
( &cpv, *pMNDC, *rig, *rdp );
61
62
if
( mydbservice->
isNewTagRequest
(
"CSCRecoGeometryRcd"
) ) {
63
mydbservice->
createNewIOV
<
RecoIdealGeometry
>(rig
64
, mydbservice->
beginOfTime
()
65
, mydbservice->
endOfTime
()
66
,
"CSCRecoGeometryRcd"
);
67
}
else
{
68
edm::LogError
(
"CSCRecoIdealDBLoader"
)<<
"CSCRecoGeometryRcd Tag is already present."
;
69
}
70
if
( mydbservice->
isNewTagRequest
(
"CSCRecoDigiParametersRcd"
) ) {
71
mydbservice->
createNewIOV
<
CSCRecoDigiParameters
>(rdp
72
, mydbservice->
beginOfTime
()
73
, mydbservice->
endOfTime
()
74
,
"CSCRecoDigiParametersRcd"
);
75
}
else
{
76
edm::LogError
(
"CSCRecoIdealDBLoader"
)<<
"CSCRecoDigiParametersRcd Tag is already present."
;
77
}
78
79
}
edm::Service< cond::service::PoolDBOutputService >
CSCRecoDigiParameters.h
MuonGeometryRecord.h
Event.h
EventSetup.h
MuonNumberingRecord
Definition:
MuonNumberingRecord.h:28
DDCompactView
type of data representation of DDCompactView
Definition:
DDCompactView.h:77
CSCRecoIdealDBLoader.h
ParameterSet.h
CSCGeometryParsFromDD::build
bool build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rig, CSCRecoDigiParameters &rdp)
Build the geometry returning the RecoIdealGeometry and the CSCRecoDigiParameters objects.
Definition:
CSCGeometryParsFromDD.cc:24
edm::LogError
Definition:
MessageLogger.h:164
CSCGeometryParsFromDD
Definition:
CSCGeometryParsFromDD.h:21
CSCRecoDigiParametersRcd.h
PoolDBOutputService.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition:
PoolDBOutputService.cc:115
CSCGeometryParsFromDD.h
edm::ESHandle
Definition:
DTSurvey.h:22
MuonDDDConstants.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition:
PoolDBOutputService.cc:191
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:46
ESHandle.h
Service.h
RecoIdealGeometry.h
edm::EventSetup
Definition:
EventSetup.h:44
MuonNumberingRecord.h
CSCRecoIdealDBLoader::CSCRecoIdealDBLoader
CSCRecoIdealDBLoader(const edm::ParameterSet &iConfig)
Definition:
CSCRecoIdealDBLoader.cc:30
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
Definition:
PoolDBOutputService.h:77
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:26
RecoIdealGeometry
Definition:
RecoIdealGeometry.h:28
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
CSCRecoIdealDBLoader::beginRun
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
Definition:
CSCRecoIdealDBLoader.cc:41
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition:
PoolDBOutputService.cc:186
CSCRecoIdealDBLoader::~CSCRecoIdealDBLoader
~CSCRecoIdealDBLoader()
Definition:
CSCRecoIdealDBLoader.cc:35
ESTransientHandle.h
CSCRecoIdealDBLoader::label_
std::string label_
Definition:
CSCRecoIdealDBLoader.h:20
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::ESTransientHandle
Definition:
ESTransientHandle.h:39
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
DDCompactView.h
CSCRecoDigiParameters
Definition:
CSCRecoDigiParameters.h:21
CSCRecoGeometryRcd.h
edm::Run
Definition:
Run.h:41
Generated for CMSSW Reference Manual by
1.8.5