Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CondTools
Geometry
plugins
PTrackerParametersDBBuilder.cc
Go to the documentation of this file.
1
#include "
PTrackerParametersDBBuilder.h
"
2
3
#include "
FWCore/Framework/interface/ESTransientHandle.h
"
4
#include "
FWCore/Framework/interface/ESHandle.h
"
5
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
6
#include "
FWCore/ServiceRegistry/interface/Service.h
"
7
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
8
#include "
CondFormats/GeometryObjects/interface/PTrackerParameters.h
"
9
#include "
DetectorDescription/Core/interface/DDCompactView.h
"
10
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
11
#include "
Geometry/TrackerGeometryBuilder/interface/TrackerParametersFromDD.h
"
12
13
void
14
PTrackerParametersDBBuilder::beginRun
(
const
edm::Run
&,
edm::EventSetup
const
& es )
15
{
16
PTrackerParameters
* ptp =
new
PTrackerParameters
;
17
edm::Service<cond::service::PoolDBOutputService>
mydbservice;
18
if
( !mydbservice.
isAvailable
())
19
{
20
edm::LogError
(
"PTrackerParametersDBBuilder"
) <<
"PoolDBOutputService unavailable"
;
21
return
;
22
}
23
edm::ESTransientHandle<DDCompactView>
cpv;
24
es.
get
<
IdealGeometryRecord
>().
get
( cpv );
25
26
TrackerParametersFromDD
builder;
27
builder.
build
( &(*cpv), *ptp );
28
29
if
( mydbservice->
isNewTagRequest
(
"PTrackerParametersRcd"
))
30
{
31
mydbservice->
createNewIOV
<
PTrackerParameters
>( ptp, mydbservice->
beginOfTime
(), mydbservice->
endOfTime
(),
"PTrackerParametersRcd"
);
32
}
else
33
{
34
edm::LogError
(
"PTrackerParametersDBBuilder"
) <<
"PTrackerParameters and PTrackerParametersRcd Tag already present"
;
35
}
36
}
MessageLogger.h
edm::Service< cond::service::PoolDBOutputService >
TrackerParametersFromDD.h
PTrackerParameters
Definition:
PTrackerParameters.h:6
edm::LogError
Definition:
MessageLogger.h:164
PoolDBOutputService.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition:
PoolDBOutputService.cc:118
PTrackerParametersDBBuilder.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
edm::EventSetup
Definition:
EventSetup.h:44
TrackerParametersFromDD
Definition:
TrackerParametersFromDD.h:9
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
PTrackerParametersDBBuilder::beginRun
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
Definition:
PTrackerParametersDBBuilder.cc:14
PTrackerParameters.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
IdealGeometryRecord.h
TrackerParametersFromDD::build
bool build(const DDCompactView *, PTrackerParameters &)
Definition:
TrackerParametersFromDD.cc:8
ESTransientHandle.h
edm::ESTransientHandle
Definition:
ESTransientHandle.h:41
DDCompactView.h
edm::Run
Definition:
Run.h:41
Generated for CMSSW Reference Manual by
1.8.5