CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GlobalTrackingGeometryESProducer Class Reference

#include <GlobalTrackingGeometryESProducer.h>

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

Public Member Functions

 GlobalTrackingGeometryESProducer (const edm::ParameterSet &p)
 Constructor. More...
 
std::unique_ptr< GlobalTrackingGeometryproduce (const GlobalTrackingGeometryRecord &record)
 Produce GlobalTrackingGeometry. More...
 
 ~GlobalTrackingGeometryESProducer () override
 Destructor. More...
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- 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 () noexcept(false)
 

Private Attributes

edm::ESGetToken< CSCGeometry, MuonGeometryRecordcscToken_
 
edm::ESGetToken< DTGeometry, MuonGeometryRecorddtToken_
 
edm::ESGetToken< GEMGeometry, MuonGeometryRecordgemToken_
 
edm::ESGetToken< ME0Geometry, MuonGeometryRecordme0Token_
 
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecordmtdToken_
 
edm::ESGetToken< RPCGeometry, MuonGeometryRecordrpcToken_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtrackerToken_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 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 30 of file GlobalTrackingGeometryESProducer.h.

Constructor & Destructor Documentation

GlobalTrackingGeometryESProducer::GlobalTrackingGeometryESProducer ( const edm::ParameterSet p)

Constructor.

Definition at line 22 of file GlobalTrackingGeometryESProducer.cc.

22  {
23  auto cc = setWhatProduced(this);
31 }
edm::ESGetToken< ME0Geometry, MuonGeometryRecord > me0Token_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerToken_
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcToken_
GlobalTrackingGeometryESProducer::~GlobalTrackingGeometryESProducer ( )
override

Destructor.

Definition at line 33 of file GlobalTrackingGeometryESProducer.cc.

33 {}

Member Function Documentation

std::unique_ptr< GlobalTrackingGeometry > GlobalTrackingGeometryESProducer::produce ( const GlobalTrackingGeometryRecord record)

Produce GlobalTrackingGeometry.

Definition at line 36 of file GlobalTrackingGeometryESProducer.cc.

References GlobalTrackingGeometryBuilder::build(), DEFINE_FWK_EVENTSETUP_MODULE, dt, mixOne_premix_on_sim_cfi::me0, omtf::DataWord64::rpc, and edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::tryToGetRecord().

36  {
37 
38  TrackerGeometry const* tk = nullptr;
39  MTDGeometry const* mtd = nullptr;
40  DTGeometry const* dt = nullptr;
41  CSCGeometry const* csc = nullptr;
42  RPCGeometry const* rpc = nullptr;
43  GEMGeometry const* gem = nullptr;
44  ME0Geometry const* me0 = nullptr;
45 
46  if( auto tkRecord = record.tryToGetRecord<TrackerDigiGeometryRecord>() ) {
47  if(auto tkH = tkRecord->getHandle(trackerToken_)) {
48  tk = tkH.product();
49  } else {
50  LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No Tracker geometry is available.";
51  }
52  } else {
53  LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No TrackerDigiGeometryRecord is available.";
54  }
55 
56  if( auto mtdRecord = record.tryToGetRecord<MTDDigiGeometryRecord>() ) {
57  if(auto mtdH = mtdRecord->getHandle(mtdToken_)) {
58  mtd = mtdH.product();
59  } else {
60  LogInfo("GeometryGlobalTrackingGeometryBuilder") << "No MTD geometry is available.";
61  }
62  } else {
63  LogInfo("GeometryGlobalTrackingGeometryBuilder") << "No MTDDigiGeometryRecord is available.";
64  }
65 
66  if( auto muonRecord = record.tryToGetRecord<MuonGeometryRecord>() ) {
67  if(auto dtH = muonRecord->getHandle(dtToken_)) {
68  dt = dtH.product();
69  } else {
70  LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No DT geometry is available.";
71  }
72 
73  if(auto cscH = muonRecord->getHandle(cscToken_)) {
74  csc = cscH.product();
75  } else {
76  LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No CSC geometry is available.";
77  }
78 
79  if(auto rpcH = muonRecord->getHandle(rpcToken_)) {
80  rpc = rpcH.product();
81  } else {
82  LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No RPC geometry is available.";
83  }
84 
85  if(auto gemH = muonRecord->getHandle(gemToken_)) {
86  gem = gemH.product();
87  } else {
88  LogInfo("GeometryGlobalTrackingGeometryBuilder") << "No GEM geometry is available.";
89  }
90 
91  if(auto me0H = muonRecord->getHandle(me0Token_)) {
92  me0 = me0H.product();
93  } else {
94  LogInfo("GeometryGlobalTrackingGeometryBuilder") << "No ME0 geometry is available.";
95  }
96 
97  } else {
98  LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No MuonGeometryRecord is available.";
99  }
100 
102  return std::unique_ptr<GlobalTrackingGeometry>(builder.build(tk, mtd, dt, csc, rpc, gem, me0));
103 }
edm::ESGetToken< ME0Geometry, MuonGeometryRecord > me0Token_
float dt
Definition: AMPTWrapper.h:126
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtToken_
Definition: AMC13Event.h:6
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerToken_
Definition: L1Track.h:19
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcToken_
GlobalTrackingGeometry * build(const TrackerGeometry *tk, const MTDGeometry *mtd, const DTGeometry *dt, const CSCGeometry *csc, const RPCGeometry *rpc, const GEMGeometry *gem, const ME0Geometry *me0)
Build the geometry.

Member Data Documentation

edm::ESGetToken<CSCGeometry, MuonGeometryRecord> GlobalTrackingGeometryESProducer::cscToken_
private

Definition at line 47 of file GlobalTrackingGeometryESProducer.h.

edm::ESGetToken<DTGeometry, MuonGeometryRecord> GlobalTrackingGeometryESProducer::dtToken_
private

Definition at line 46 of file GlobalTrackingGeometryESProducer.h.

edm::ESGetToken<GEMGeometry, MuonGeometryRecord> GlobalTrackingGeometryESProducer::gemToken_
private

Definition at line 49 of file GlobalTrackingGeometryESProducer.h.

edm::ESGetToken<ME0Geometry, MuonGeometryRecord> GlobalTrackingGeometryESProducer::me0Token_
private

Definition at line 50 of file GlobalTrackingGeometryESProducer.h.

edm::ESGetToken<MTDGeometry, MTDDigiGeometryRecord> GlobalTrackingGeometryESProducer::mtdToken_
private

Definition at line 45 of file GlobalTrackingGeometryESProducer.h.

edm::ESGetToken<RPCGeometry, MuonGeometryRecord> GlobalTrackingGeometryESProducer::rpcToken_
private

Definition at line 48 of file GlobalTrackingGeometryESProducer.h.

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> GlobalTrackingGeometryESProducer::trackerToken_
private

Definition at line 44 of file GlobalTrackingGeometryESProducer.h.