Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CondTools
Geometry
plugins
RPCRecoIdealDBLoader.cc
Go to the documentation of this file.
1
#include "
RPCRecoIdealDBLoader.h
"
2
3
#include <
Geometry/RPCGeometryBuilder/src/RPCGeometryParsFromDD.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 "
Geometry/Records/interface/RPCRecoGeometryRcd.h
"
14
#include "
Geometry/Records/interface/MuonGeometryRecord.h
"
15
16
#include "
DetectorDescription/Core/interface/DDCompactView.h
"
17
18
#include "
Geometry/Records/interface/MuonNumberingRecord.h
"
19
#include "
Geometry/MuonNumbering/interface/MuonDDDConstants.h
"
20
21
#include <iostream>
22
#include <string>
23
#include <vector>
24
#include <map>
25
#include <sstream>
26
#include <algorithm>
27
using namespace
std;
28
29
RPCRecoIdealDBLoader::RPCRecoIdealDBLoader
(
const
edm::ParameterSet
& iConfig) : label_()
30
{
31
std::cout
<<
"RPCRecoIdealDBLoader::RPCRecoIdealDBLoader"
<<std::endl;
32
}
33
34
RPCRecoIdealDBLoader::~RPCRecoIdealDBLoader
()
35
{
36
std::cout
<<
"RPCRecoIdealDBLoader::~RPCRecoIdealDBLoader"
<<std::endl;
37
}
38
39
void
40
RPCRecoIdealDBLoader::beginRun
(
const
edm::Run
&,
edm::EventSetup
const
& es)
41
{
42
RecoIdealGeometry
* rig =
new
RecoIdealGeometry
;
43
edm::Service<cond::service::PoolDBOutputService>
mydbservice;
44
if
( !mydbservice.
isAvailable
() ){
45
edm::LogError
(
"RPCRecoIdealDBLoader"
)<<
"PoolDBOutputService unavailable"
;
46
return
;
47
}
48
49
edm::ESTransientHandle<DDCompactView>
pDD;
50
edm::ESHandle<MuonDDDConstants>
pMNDC;
51
es.
get
<
IdealGeometryRecord
>().
get
(
label_
, pDD );
52
es.
get
<
MuonNumberingRecord
>().
get
( pMNDC );
53
54
const
DDCompactView
& cpv = *pDD;
55
RPCGeometryParsFromDD
rpcpd;
56
57
rpcpd.
build
( &cpv, *pMNDC, *rig );
58
59
if
( mydbservice->
isNewTagRequest
(
"RPCRecoGeometryRcd"
) ) {
60
mydbservice->
createNewIOV
<
RecoIdealGeometry
>(rig
61
, mydbservice->
beginOfTime
()
62
, mydbservice->
endOfTime
()
63
,
"RPCRecoGeometryRcd"
);
64
}
else
{
65
edm::LogError
(
"RPCRecoIdealDBLoader"
)<<
"RPCRecoGeometryRcd Tag is already present."
;
66
}
67
}
RPCGeometryParsFromDD::build
void build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rgeo)
Definition:
RPCGeometryParsFromDD.cc:32
edm::Service< cond::service::PoolDBOutputService >
MuonGeometryRecord.h
Event.h
EventSetup.h
MuonNumberingRecord
Definition:
MuonNumberingRecord.h:28
RPCRecoIdealDBLoader::~RPCRecoIdealDBLoader
~RPCRecoIdealDBLoader()
Definition:
RPCRecoIdealDBLoader.cc:34
DDCompactView
type of data representation of DDCompactView
Definition:
DDCompactView.h:77
RPCRecoIdealDBLoader::beginRun
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
Definition:
RPCRecoIdealDBLoader.cc:40
ParameterSet.h
edm::LogError
Definition:
MessageLogger.h:164
PoolDBOutputService.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition:
PoolDBOutputService.cc:115
RPCRecoGeometryRcd.h
edm::ESHandle
Definition:
DTSurvey.h:22
MuonDDDConstants.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition:
PoolDBOutputService.cc:191
RPCRecoIdealDBLoader::label_
std::string label_
Definition:
RPCRecoIdealDBLoader.h:18
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:46
ESHandle.h
Service.h
RecoIdealGeometry.h
edm::EventSetup
Definition:
EventSetup.h:44
MuonNumberingRecord.h
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
RPCGeometryParsFromDD.h
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:26
RecoIdealGeometry
Definition:
RecoIdealGeometry.h:28
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition:
PoolDBOutputService.cc:186
ESTransientHandle.h
RPCRecoIdealDBLoader::RPCRecoIdealDBLoader
RPCRecoIdealDBLoader(const edm::ParameterSet &iConfig)
Definition:
RPCRecoIdealDBLoader.cc:29
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::ESTransientHandle
Definition:
ESTransientHandle.h:39
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
RPCGeometryParsFromDD
Definition:
RPCGeometryParsFromDD.h:22
DDCompactView.h
RPCRecoIdealDBLoader.h
edm::Run
Definition:
Run.h:41
Generated for CMSSW Reference Manual by
1.8.5