Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CondTools
Geometry
plugins
DTRecoIdealDBLoader.cc
Go to the documentation of this file.
1
#include "
DTRecoIdealDBLoader.h
"
2
3
#include <
Geometry/DTGeometryBuilder/src/DTGeometryParsFromDD.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/DTRecoGeometryRcd.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
DTRecoIdealDBLoader::DTRecoIdealDBLoader
(
const
edm::ParameterSet
& iConfig) : label_()
30
{
31
std::cout
<<
"DTRecoIdealDBLoader::DTRecoIdealDBLoader"
<<std::endl;
32
}
33
34
DTRecoIdealDBLoader::~DTRecoIdealDBLoader
()
35
{
36
std::cout
<<
"DTRecoIdealDBLoader::~DTRecoIdealDBLoader"
<<std::endl;
37
}
38
39
void
40
DTRecoIdealDBLoader::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
(
"DTRecoIdealDBLoader"
)<<
"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
DTGeometryParsFromDD
dtgp;
56
57
dtgp.
build
( &cpv, *pMNDC, *rig );
58
59
if
( mydbservice->
isNewTagRequest
(
"DTRecoGeometryRcd"
) ) {
60
mydbservice->
createNewIOV
<
RecoIdealGeometry
>(rig
61
, mydbservice->
beginOfTime
()
62
, mydbservice->
endOfTime
()
63
,
"DTRecoGeometryRcd"
);
64
}
else
{
65
edm::LogError
(
"DTRecoIdealDBLoader"
)<<
"DTRecoGeometryRcd Tag is already present."
;
66
}
67
}
DTRecoIdealDBLoader::~DTRecoIdealDBLoader
~DTRecoIdealDBLoader()
Definition:
DTRecoIdealDBLoader.cc:34
edm::Service< cond::service::PoolDBOutputService >
DTRecoIdealDBLoader::beginRun
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
Definition:
DTRecoIdealDBLoader.cc:40
DTRecoIdealDBLoader::DTRecoIdealDBLoader
DTRecoIdealDBLoader(const edm::ParameterSet &iConfig)
Definition:
DTRecoIdealDBLoader.cc:29
MuonGeometryRecord.h
Event.h
EventSetup.h
MuonNumberingRecord
Definition:
MuonNumberingRecord.h:28
DTRecoIdealDBLoader::label_
std::string label_
Definition:
DTRecoIdealDBLoader.h:20
DDCompactView
type of data representation of DDCompactView
Definition:
DDCompactView.h:76
ParameterSet.h
edm::LogError
Definition:
MessageLogger.h:164
PoolDBOutputService.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition:
PoolDBOutputService.cc:118
edm::ESHandle
Definition:
DTSurvey.h:22
MuonDDDConstants.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition:
PoolDBOutputService.cc:194
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
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:26
RecoIdealGeometry
Definition:
RecoIdealGeometry.h:28
DTRecoIdealDBLoader.h
DTRecoGeometryRcd.h
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition:
PoolDBOutputService.cc:189
ESTransientHandle.h
DTGeometryParsFromDD.h
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::ESTransientHandle
Definition:
ESTransientHandle.h:41
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
DDCompactView.h
DTGeometryParsFromDD::build
void build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rig)
Definition:
DTGeometryParsFromDD.cc:37
DTGeometryParsFromDD
Definition:
DTGeometryParsFromDD.h:25
edm::Run
Definition:
Run.h:41
Generated for CMSSW Reference Manual by
1.8.5