Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Geometry
GlobalTrackingGeometryBuilder
plugins
GlobalTrackingGeometryESProducer.cc
Go to the documentation of this file.
1
6
#include <
Geometry/GlobalTrackingGeometryBuilder/plugins/GlobalTrackingGeometryESProducer.h
>
7
#include <
Geometry/GlobalTrackingGeometryBuilder/plugins/GlobalTrackingGeometryBuilder.h
>
8
9
#include <
Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h
>
10
11
#include <
FWCore/Framework/interface/ESHandle.h
>
12
#include <
FWCore/Framework/interface/ModuleFactory.h
>
13
14
#include <
FWCore/MessageLogger/interface/MessageLogger.h
>
15
#include <
FWCore/Framework/interface/NoProxyException.h
>
16
#include <
FWCore/Framework/interface/NoRecordException.h
>
17
18
#include <memory>
19
20
using namespace
edm;
21
22
GlobalTrackingGeometryESProducer::GlobalTrackingGeometryESProducer
(
const
edm::ParameterSet
&
p
){
23
setWhatProduced(
this
);
24
}
25
26
GlobalTrackingGeometryESProducer::~GlobalTrackingGeometryESProducer
(){}
27
28
boost::shared_ptr<GlobalTrackingGeometry>
29
GlobalTrackingGeometryESProducer::produce
(
const
GlobalTrackingGeometryRecord
&
record
) {
30
31
edm::ESHandle<TrackerGeometry>
tk;
32
edm::ESHandle<DTGeometry>
dt
;
33
edm::ESHandle<CSCGeometry>
csc;
34
edm::ESHandle<RPCGeometry>
rpc;
35
edm::ESHandle<GEMGeometry>
gem;
36
37
try
{
38
record.
getRecord
<
TrackerDigiGeometryRecord
>().
get
(tk);
39
}
catch
(
edm::eventsetup::NoProxyException<TrackerGeometry>
&
e
) {
40
// No Tk geo available
41
LogWarning
(
"GeometryGlobalTrackingGeometryBuilder"
) <<
"No Tracker geometry is available."
;
42
}
catch
(
edm::eventsetup::NoRecordException<TrackerDigiGeometryRecord>
& e){
43
LogWarning
(
"GeometryGlobalTrackingGeometryBuilder"
) <<
"No TrackerDigiGeometryRecord is available."
;
44
}
45
46
47
try
{
48
try
{
49
record.
getRecord
<
MuonGeometryRecord
>().
get
(dt);
50
}
catch
(
edm::eventsetup::NoProxyException<DTGeometry>
& e) {
51
// No DT geo available
52
LogWarning
(
"GeometryGlobalTrackingGeometryBuilder"
) <<
"No DT geometry is available."
;
53
}
54
55
try
{
56
record.
getRecord
<
MuonGeometryRecord
>().
get
(csc);
57
}
catch
(
edm::eventsetup::NoProxyException<CSCGeometry>
& e) {
58
// No CSC geo available
59
LogWarning
(
"GeometryGlobalTrackingGeometryBuilder"
) <<
"No CSC geometry is available."
;
60
}
61
62
try
{
63
record.
getRecord
<
MuonGeometryRecord
>().
get
(rpc);
64
}
catch
(
edm::eventsetup::NoProxyException<RPCGeometry>
& e) {
65
// No RPC geo available
66
LogWarning
(
"GeometryGlobalTrackingGeometryBuilder"
) <<
"No RPC geometry is available."
;
67
}
68
69
try
{
70
record.
getRecord
<
MuonGeometryRecord
>().
get
(gem);
71
}
catch
(
edm::eventsetup::NoProxyException<GEMGeometry>
& e) {
72
// No GEM geo available
73
LogInfo
(
"GeometryGlobalTrackingGeometryBuilder"
) <<
"No GEM geometry is available."
;
74
}
75
76
}
catch
(
edm::eventsetup::NoRecordException<MuonGeometryRecord>
& e){
77
LogWarning
(
"GeometryGlobalTrackingGeometryBuilder"
) <<
"No MuonGeometryRecord is available."
;
78
}
79
80
81
GlobalTrackingGeometryBuilder
builder;
82
return
boost::shared_ptr<GlobalTrackingGeometry>(builder.
build
(&(*tk), &(*dt), &(*csc), &(*rpc), &(*gem)));
83
}
84
85
DEFINE_FWK_EVENTSETUP_MODULE
(
GlobalTrackingGeometryESProducer
);
GlobalTrackingGeometryBuilder.h
dt
float dt
Definition:
AMPTWrapper.h:126
edm::eventsetup::NoRecordException
Definition:
NoRecordException.h:44
MessageLogger.h
GlobalTrackingGeometryESProducer::~GlobalTrackingGeometryESProducer
virtual ~GlobalTrackingGeometryESProducer()
Destructor.
Definition:
GlobalTrackingGeometryESProducer.cc:26
GlobalTrackingGeometryESProducer::produce
boost::shared_ptr< GlobalTrackingGeometry > produce(const GlobalTrackingGeometryRecord &record)
Produce GlobalTrackingGeometry.
Definition:
GlobalTrackingGeometryESProducer.cc:29
record
JetCorrectorParameters::Record record
Definition:
classes.h:7
GlobalTrackingGeometryBuilder::build
GlobalTrackingGeometry * build(const TrackerGeometry *tk, const DTGeometry *dt, const CSCGeometry *csc, const RPCGeometry *rpc, const GEMGeometry *gem)
Build the geometry.
Definition:
GlobalTrackingGeometryBuilder.cc:25
GlobalTrackingGeometryBuilder
Definition:
GlobalTrackingGeometryBuilder.h:20
edm::LogWarning
Definition:
MessageLogger.h:140
GlobalTrackingGeometryRecord
Definition:
GlobalTrackingGeometryRecord.h:17
GlobalTrackingGeometryESProducer.h
GlobalTrackingGeometryESProducer::GlobalTrackingGeometryESProducer
GlobalTrackingGeometryESProducer(const edm::ParameterSet &p)
Constructor.
Definition:
GlobalTrackingGeometryESProducer.cc:22
MuonGeometryRecord
Definition:
MuonGeometryRecord.h:26
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT & getRecord() const
Definition:
DependentRecordImplementation.h:46
edm::ESHandle< TrackerGeometry >
ESHandle.h
NoProxyException.h
NoRecordException.h
edm::LogInfo
Definition:
MessageLogger.h:214
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
edm::ParameterSet
Definition:
ParameterSet.h:35
ModuleFactory.h
GlobalTrackingGeometry.h
TrackerDigiGeometryRecord
Definition:
TrackerDigiGeometryRecord.h:31
GlobalTrackingGeometryESProducer
Definition:
GlobalTrackingGeometryESProducer.h:20
edm::eventsetup::NoProxyException
Definition:
NoProxyException.h:31
Generated for CMSSW Reference Manual by
1.8.5