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
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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
 
std::string record
 
bool zip
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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(), record, AlCaHLTBitMon_QueryRunRegistry::string, and zip.

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 }
T getUntrackedParameter(std::string const &, T const &) const
XMLGeometryBuilder::~XMLGeometryBuilder ( )

Definition at line 27 of file XMLGeometryBuilder.cc.

28 {
29 
30 }

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 33 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(), record, and zip.

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 }
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().

std::string XMLGeometryBuilder::record
private

Definition at line 23 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().