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  record = iConfig.getUntrackedParameter<std::string>("record","GeometryFileRcd");
25 }
26 
28 {
29 
30 }
31 
32 void
34 {
35  std::cout<<"XMLGeometryBuilder::beginJob"<<std::endl;
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 
T getUntrackedParameter(std::string const &, T const &) const
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:46
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