CMS 3D CMS Logo

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

#include <TrackerGeometricDetESModule.h>

Inheritance diagram for TrackerGeometricDetESModule:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::auto_ptr< GeometricDetproduce (const IdealGeometryRecord &)
 
 TrackerGeometricDetESModule (const edm::ParameterSet &p)
 
virtual ~TrackerGeometricDetESModule (void)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

bool fromDDD_
 
unsigned int layerNumberPXB_
 
unsigned int totalBlade_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 14 of file TrackerGeometricDetESModule.h.

Constructor & Destructor Documentation

TrackerGeometricDetESModule::TrackerGeometricDetESModule ( const edm::ParameterSet p)

Definition at line 25 of file TrackerGeometricDetESModule.cc.

References edm::ESProducer::setWhatProduced().

26  : fromDDD_( p.getParameter<bool>( "fromDDD" )),
27  layerNumberPXB_( p.exists( "layerNumberPXB" ) ? p.getParameter<unsigned int>( "layerNumberPXB" ) : 16U ),// 16 for current, 18 for SLHC
28  totalBlade_( p.exists( "totalBlade" ) ? p.getParameter<unsigned int>( "totalBlade" ) : 24U ) // 24 for current, 56 for SLHC
29 {
30  setWhatProduced( this );
31 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
TrackerGeometricDetESModule::~TrackerGeometricDetESModule ( void  )
virtual

Definition at line 33 of file TrackerGeometricDetESModule.cc.

33 {}

Member Function Documentation

void TrackerGeometricDetESModule::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 36 of file TrackerGeometricDetESModule.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addOptional(), edm::false, and funct::true.

37 {
39  descDB.add<bool>( "fromDDD", false );
40  descDB.addOptional<unsigned int>( "layerNumberPXB", 16U );
41  descDB.addOptional<unsigned int>( "totalBlade", 24U );
42  descriptions.add( "trackerNumberingGeometryDB", descDB );
43 
45  descSLHCDB.add<bool>( "fromDDD", false );
46  descSLHCDB.addOptional<unsigned int>( "layerNumberPXB", 18U );
47  descSLHCDB.addOptional<unsigned int>( "totalBlade", 56U );
48  descriptions.add( "trackerNumberingSLHCGeometryDB", descSLHCDB );
49 
51  desc.add<bool>( "fromDDD", true );
52  desc.addOptional<unsigned int>( "layerNumberPXB", 16U );
53  desc.addOptional<unsigned int>( "totalBlade", 24U );
54  descriptions.add( "trackerNumberingGeometry", desc );
55 
57  descSLHC.add<bool>( "fromDDD", true );
58  descSLHC.addOptional<unsigned int>( "layerNumberPXB", 18U );
59  descSLHC.addOptional<unsigned int>( "totalBlade", 56U );
60  descriptions.add( "trackerNumberingSLHCGeometry", descSLHC );
61 }
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
volatile std::atomic< bool > shutdown_flag false
std::auto_ptr< GeometricDet > TrackerGeometricDetESModule::produce ( const IdealGeometryRecord iRecord)

Definition at line 64 of file TrackerGeometricDetESModule.cc.

References DDDCmsTrackerContruction::construct(), CondDBCmsTrackerConstruction::construct(), fromDDD_, edm::eventsetup::EventSetupRecord::get(), layerNumberPXB_, and totalBlade_.

65 {
66  if( fromDDD_ )
67  {
69  iRecord.get( cpv );
70 
71  DDDCmsTrackerContruction theDDDCmsTrackerContruction;
72  return std::auto_ptr<GeometricDet> (const_cast<GeometricDet*>( theDDDCmsTrackerContruction.construct(&(*cpv), layerNumberPXB_, totalBlade_ )));
73  }
74  else
75  {
77  iRecord.get( pgd );
78 
80  return std::auto_ptr<GeometricDet> ( const_cast<GeometricDet*>( cdbtc.construct( *pgd )));
81  }
82 }
const GeometricDet * construct(const DDCompactView *cpv, unsigned int layerNumberPXB, unsigned int totalBlade)
const GeometricDet * construct(const PGeometricDet &pgd)
void get(HolderT &iHolder) const

Member Data Documentation

bool TrackerGeometricDetESModule::fromDDD_
private

Definition at line 24 of file TrackerGeometricDetESModule.h.

Referenced by produce().

unsigned int TrackerGeometricDetESModule::layerNumberPXB_
private

Definition at line 25 of file TrackerGeometricDetESModule.h.

Referenced by produce().

unsigned int TrackerGeometricDetESModule::totalBlade_
private

Definition at line 26 of file TrackerGeometricDetESModule.h.

Referenced by produce().