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 edm::EDConsumerBase

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

std::string fname
 
bool zip
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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(), AlCaHLTBitMon_QueryRunRegistry::string, 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:46
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:121
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().