#include <TrackerGeometricDetESModule.h>
Public Member Functions | |
std::auto_ptr< GeometricDet > | produce (const IdealGeometryRecord &) |
TrackerGeometricDetESModule (const edm::ParameterSet &p) | |
virtual | ~TrackerGeometricDetESModule (void) |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Attributes | |
bool | fromDDD_ |
unsigned int | layerNumberPXB_ |
unsigned int | totalBlade_ |
Definition at line 14 of file TrackerGeometricDetESModule.h.
TrackerGeometricDetESModule::TrackerGeometricDetESModule | ( | const edm::ParameterSet & | p | ) |
Definition at line 25 of file TrackerGeometricDetESModule.cc.
References edm::ESProducer::setWhatProduced().
: fromDDD_( p.getParameter<bool>( "fromDDD" )), layerNumberPXB_( p.exists( "layerNumberPXB" ) ? p.getParameter<unsigned int>( "layerNumberPXB" ) : 16U ),// 16 for current, 18 for SLHC totalBlade_( p.exists( "totalBlade" ) ? p.getParameter<unsigned int>( "totalBlade" ) : 24U ) // 24 for current, 56 for SLHC { setWhatProduced( this ); }
TrackerGeometricDetESModule::~TrackerGeometricDetESModule | ( | void | ) | [virtual] |
Definition at line 33 of file TrackerGeometricDetESModule.cc.
{}
void TrackerGeometricDetESModule::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Definition at line 36 of file TrackerGeometricDetESModule.cc.
References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addOptional(), funct::false, and funct::true.
{ edm::ParameterSetDescription descDB; descDB.add<bool>( "fromDDD", false ); descDB.addOptional<unsigned int>( "layerNumberPXB", 16U ); descDB.addOptional<unsigned int>( "totalBlade", 24U ); descriptions.add( "trackerNumberingGeometryDB", descDB ); edm::ParameterSetDescription descSLHCDB; descSLHCDB.add<bool>( "fromDDD", false ); descSLHCDB.addOptional<unsigned int>( "layerNumberPXB", 18U ); descSLHCDB.addOptional<unsigned int>( "totalBlade", 56U ); descriptions.add( "trackerNumberingSLHCGeometryDB", descSLHCDB ); edm::ParameterSetDescription desc; desc.add<bool>( "fromDDD", true ); desc.addOptional<unsigned int>( "layerNumberPXB", 16U ); desc.addOptional<unsigned int>( "totalBlade", 24U ); descriptions.add( "trackerNumberingGeometry", desc ); edm::ParameterSetDescription descSLHC; descSLHC.add<bool>( "fromDDD", true ); descSLHC.addOptional<unsigned int>( "layerNumberPXB", 18U ); descSLHC.addOptional<unsigned int>( "totalBlade", 56U ); descriptions.add( "trackerNumberingSLHCGeometry", descSLHC ); }
std::auto_ptr< GeometricDet > TrackerGeometricDetESModule::produce | ( | const IdealGeometryRecord & | iRecord | ) |
Definition at line 64 of file TrackerGeometricDetESModule.cc.
References CondDBCmsTrackerConstruction::construct(), DDDCmsTrackerContruction::construct(), fromDDD_, edm::eventsetup::EventSetupRecord::get(), layerNumberPXB_, and totalBlade_.
{ if( fromDDD_ ) { edm::ESTransientHandle<DDCompactView> cpv; iRecord.get( cpv ); DDDCmsTrackerContruction theDDDCmsTrackerContruction; return std::auto_ptr<GeometricDet> (const_cast<GeometricDet*>( theDDDCmsTrackerContruction.construct(&(*cpv), layerNumberPXB_, totalBlade_ ))); } else { edm::ESHandle<PGeometricDet> pgd; iRecord.get( pgd ); CondDBCmsTrackerConstruction cdbtc; return std::auto_ptr<GeometricDet> ( const_cast<GeometricDet*>( cdbtc.construct( *pgd ))); } }
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().