CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
XMLGeometryBuilder.cc
Go to the documentation of this file.
1 #include "XMLGeometryBuilder.h"
2 
4 
13 
14 
15 #include <iostream>
16 #include <string>
17 #include <vector>
18 #include <fstream>
19 
21 {
22  fname = iConfig.getUntrackedParameter<std::string>("XMLFileName","test.xml");
23  zip = iConfig.getUntrackedParameter<bool>("ZIP",true);
24 }
25 
27 {
28 
29 }
30 
31 void
33 {
34  std::cout<<"XMLGeometryBuilder::beginJob"<<std::endl;
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 
T getUntrackedParameter(std::string const &, T const &) const
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:47
virtual void beginJob()
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
XMLGeometryBuilder(const edm::ParameterSet &iConfig)
tuple cout
Definition: gather_cfg.py:121