Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
record
= iConfig.
getUntrackedParameter
<
std::string
>(
"record"
,
"GeometryFileRcd"
);
25
}
26
27
XMLGeometryBuilder::~XMLGeometryBuilder
()
28
{
29
30
}
31
32
void
33
XMLGeometryBuilder::beginJob
()
34
{
35
std::cout
<<
"XMLGeometryBuilder::beginJob"
<<std::endl;
36
edm::Service<cond::service::PoolDBOutputService>
mydbservice;
37
if
( !mydbservice.
isAvailable
() ){
38
edm::LogError
(
"XMLGeometryBuilder"
)<<
"PoolDBOutputService unavailable"
;
39
return
;
40
}
41
42
FileBlob
* pgf=
new
FileBlob
(
fname
,
zip
);
43
44
if
( mydbservice->
isNewTagRequest
(
record
) ) {
45
mydbservice->
createNewIOV
<
FileBlob
>( pgf,mydbservice->
beginOfTime
(),mydbservice->
endOfTime
(),
record
);
46
}
else
{
47
edm::LogError
(
"XMLGeometryBuilder"
)<<
"GeometryFileRcd Tag already exist"
;
48
}
49
}
50
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:118
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
FileBlob
Definition:
FileBlob.h:10
XMLGeometryBuilder::beginJob
virtual void beginJob()
Definition:
XMLGeometryBuilder.cc:33
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
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition:
PoolDBOutputService.cc:189
XMLGeometryBuilder::XMLGeometryBuilder
XMLGeometryBuilder(const edm::ParameterSet &iConfig)
Definition:
XMLGeometryBuilder.cc:20
XMLGeometryBuilder::record
std::string record
Definition:
XMLGeometryBuilder.h:23
FileBlob.h
edm::ParameterSet
Definition:
ParameterSet.h:35
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
XMLGeometryBuilder::~XMLGeometryBuilder
~XMLGeometryBuilder()
Definition:
XMLGeometryBuilder.cc:27
XMLGeometryBuilder::fname
std::string fname
Definition:
XMLGeometryBuilder.h:19
Generated for CMSSW Reference Manual by
1.8.5