CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
XMLGeometryBuilder Class Reference

#include <XMLGeometryBuilder.h>

Inheritance diagram for XMLGeometryBuilder:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void endJob ()
 
 XMLGeometryBuilder (const edm::ParameterSet &iConfig)
 
 ~XMLGeometryBuilder ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

std::string fname
 
bool zip
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 12 of file XMLGeometryBuilder.h.

Constructor & Destructor Documentation

XMLGeometryBuilder::XMLGeometryBuilder ( const edm::ParameterSet iConfig)
explicit

Definition at line 20 of file XMLGeometryBuilder.cc.

References fname, edm::ParameterSet::getUntrackedParameter(), and zip.

21 {
22  fname = iConfig.getUntrackedParameter<std::string>("XMLFileName","test.xml");
23  zip = iConfig.getUntrackedParameter<bool>("ZIP",true);
24 }
T getUntrackedParameter(std::string const &, T const &) const
XMLGeometryBuilder::~XMLGeometryBuilder ( )

Definition at line 26 of file XMLGeometryBuilder.cc.

27 {
28 
29 }

Member Function Documentation

virtual void XMLGeometryBuilder::analyze ( const edm::Event ,
const edm::EventSetup  
)
inlinevirtual

Implements edm::EDAnalyzer.

Definition at line 18 of file XMLGeometryBuilder.h.

18 {}
void XMLGeometryBuilder::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 32 of file XMLGeometryBuilder.cc.

References cond::service::PoolDBOutputService::beginOfTime(), gather_cfg::cout, cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::endOfTime(), fname, edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), and zip.

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 }
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:47
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
tuple cout
Definition: gather_cfg.py:41
virtual void XMLGeometryBuilder::endJob ( void  )
inlinevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 19 of file XMLGeometryBuilder.h.

19 {};

Member Data Documentation

std::string XMLGeometryBuilder::fname
private

Definition at line 19 of file XMLGeometryBuilder.h.

Referenced by beginJob(), and XMLGeometryBuilder().

bool XMLGeometryBuilder::zip
private

Definition at line 22 of file XMLGeometryBuilder.h.

Referenced by beginJob(), and XMLGeometryBuilder().