CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DreamSensitiveDetectorBuilder Class Reference
Inheritance diagram for DreamSensitiveDetectorBuilder:
SensitiveDetectorMakerBase

Public Member Functions

void beginRun (const edm::EventSetup &es) final
 
 DreamSensitiveDetectorBuilder (edm::ParameterSet const &p, edm::ConsumesCollector cc)
 
std::unique_ptr< SensitiveDetectormake (const std::string &iname, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry &reg) const final
 
- Public Member Functions inherited from SensitiveDetectorMakerBase
virtual std::unique_ptr< SensitiveDetectormake (const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry &reg) const
 
const SensitiveDetectorMakerBaseoperator= (const SensitiveDetectorMakerBase &)=delete
 
 SensitiveDetectorMakerBase ()=default
 
 SensitiveDetectorMakerBase (const SensitiveDetectorMakerBase &)=delete
 
virtual ~SensitiveDetectorMakerBase ()
 

Private Attributes

const cms::DDCompactViewcpvDD4hep_
 
const DDCompactViewcpvDDD_
 
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecordcpvTokenDD4hep_
 
edm::ESGetToken< DDCompactView, IdealGeometryRecordcpvTokenDDD_
 
bool fromDD4hep_
 

Detailed Description

Definition at line 20 of file DreamSensitiveDetectorBuilder.cc.

Constructor & Destructor Documentation

◆ DreamSensitiveDetectorBuilder()

DreamSensitiveDetectorBuilder::DreamSensitiveDetectorBuilder ( edm::ParameterSet const &  p,
edm::ConsumesCollector  cc 
)
inlineexplicit

Definition at line 22 of file DreamSensitiveDetectorBuilder.cc.

References edm::BeginRun, cpvTokenDD4hep_, cpvTokenDDD_, edm::ConsumesCollector::esConsumes(), fromDD4hep_, and AlCaHLTBitMon_ParallelJobs::p.

22  {
23  fromDD4hep_ = p.getParameter<bool>("g4GeometryDD4hepSource");
24  if (fromDD4hep_)
26  else
28  edm::LogVerbatim("EcalSim") << "DreamSensitiveDetectorBuilder called with dd4hep flag " << fromDD4hep_;
29  }
Log< level::Info, true > LogVerbatim
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_

Member Function Documentation

◆ beginRun()

void DreamSensitiveDetectorBuilder::beginRun ( const edm::EventSetup es)
inlinefinalvirtual

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 31 of file DreamSensitiveDetectorBuilder.cc.

References cpvDD4hep_, cpvDDD_, cpvTokenDD4hep_, cpvTokenDDD_, and fromDD4hep_.

31  {
32  if (fromDD4hep_) {
34  } else {
36  }
37  }
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_

◆ make()

std::unique_ptr<SensitiveDetector> DreamSensitiveDetectorBuilder::make ( const std::string &  iname,
const SensitiveDetectorCatalog clg,
const edm::ParameterSet p,
const SimTrackManager man,
SimActivityRegistry reg 
) const
inlinefinalvirtual

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 39 of file DreamSensitiveDetectorBuilder.cc.

References cpvDD4hep_, cpvDDD_, SimActivityRegistryEnroller::enroll(), and AlCaHLTBitMon_ParallelJobs::p.

43  {
44  auto sd = std::make_unique<DreamSD>(iname, cpvDDD_, cpvDD4hep_, clg, p, man);
46  return sd;
47  }
static void enroll(SimActivityRegistry &iReg, T *iObj)

Member Data Documentation

◆ cpvDD4hep_

const cms::DDCompactView* DreamSensitiveDetectorBuilder::cpvDD4hep_
private

Definition at line 54 of file DreamSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ cpvDDD_

const DDCompactView* DreamSensitiveDetectorBuilder::cpvDDD_
private

Definition at line 53 of file DreamSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ cpvTokenDD4hep_

edm::ESGetToken<cms::DDCompactView, IdealGeometryRecord> DreamSensitiveDetectorBuilder::cpvTokenDD4hep_
private

Definition at line 52 of file DreamSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and DreamSensitiveDetectorBuilder().

◆ cpvTokenDDD_

edm::ESGetToken<DDCompactView, IdealGeometryRecord> DreamSensitiveDetectorBuilder::cpvTokenDDD_
private

Definition at line 51 of file DreamSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and DreamSensitiveDetectorBuilder().

◆ fromDD4hep_

bool DreamSensitiveDetectorBuilder::fromDD4hep_
private

Definition at line 50 of file DreamSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and DreamSensitiveDetectorBuilder().