Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CondTools
Geometry
plugins
XMLGeometryBuilder.cc
Go to the documentation of this file.
1
#include "
XMLGeometryBuilder.h
"
2
3
#include "
FWCore/MessageLogger/interface/MessageLogger.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/ESHandle.h
"
11
#include "
CondFormats/Common/interface/FileBlob.h
"
12
#include "
Geometry/Records/interface/GeometryFileRcd.h
"
13
14
15
#include <iostream>
16
#include <string>
17
#include <vector>
18
#include <fstream>
19
20
XMLGeometryBuilder::XMLGeometryBuilder
(
const
edm::ParameterSet
& iConfig)
21
{
22
fname
= iConfig.
getUntrackedParameter
<
std::string
>(
"XMLFileName"
,
"test.xml"
);
23
zip
= iConfig.
getUntrackedParameter
<
bool
>(
"ZIP"
,
true
);
24
}
25
26
XMLGeometryBuilder::~XMLGeometryBuilder
()
27
{
28
29
}
30
31
void
32
XMLGeometryBuilder::beginJob
()
33
{
34
std::cout
<<
"XMLGeometryBuilder::beginJob"
<<std::endl;
35
edm::Service<cond::service::PoolDBOutputService>
mydbservice;
36
if
( !mydbservice.
isAvailable
() ){
37
edm::LogError
(
"XMLGeometryBuilder"
)<<
"PoolDBOutputService unavailable"
;
38
return
;
39
}
40
41
FileBlob
* pgf=
new
FileBlob
(
fname
,
zip
);
42
43
if
( mydbservice->
isNewTagRequest
(
"GeometryFileRcd"
) ) {
44
mydbservice->
createNewIOV
<
FileBlob
>( pgf,mydbservice->
beginOfTime
(),mydbservice->
endOfTime
(),
"GeometryFileRcd"
);
45
}
else
{
46
edm::LogError
(
"XMLGeometryBuilder"
)<<
"GeometryFileRcd Tag already exist"
;
47
}
48
}
49
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
MessageLogger.h
edm::Service< cond::service::PoolDBOutputService >
XMLGeometryBuilder::zip
bool zip
Definition:
XMLGeometryBuilder.h:22
Event.h
EventSetup.h
XMLGeometryBuilder.h
GeometryFileRcd.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
ParameterSet.h
edm::LogError
Definition:
MessageLogger.h:164
PoolDBOutputService.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition:
PoolDBOutputService.cc:90
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition:
PoolDBOutputService.cc:160
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:46
ESHandle.h
Service.h
FileBlob
Definition:
FileBlob.h:8
XMLGeometryBuilder::beginJob
virtual void beginJob()
Definition:
XMLGeometryBuilder.cc:32
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:83
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition:
PoolDBOutputService.cc:155
XMLGeometryBuilder::XMLGeometryBuilder
XMLGeometryBuilder(const edm::ParameterSet &iConfig)
Definition:
XMLGeometryBuilder.cc:20
FileBlob.h
edm::ParameterSet
Definition:
ParameterSet.h:35
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
XMLGeometryBuilder::~XMLGeometryBuilder
~XMLGeometryBuilder()
Definition:
XMLGeometryBuilder.cc:26
XMLGeometryBuilder::fname
std::string fname
Definition:
XMLGeometryBuilder.h:19
Generated for CMSSW Reference Manual by
1.8.5