CMS 3D CMS Logo

Functions
GeometryProducer.cc File Reference
#include "FWCore/PluginManager/interface/PluginManager.h"
#include "SimG4Core/GeometryProducer/interface/GeometryProducer.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "SimG4Core/Geometry/interface/DDDWorld.h"
#include "SimG4Core/Geometry/interface/G4LogicalVolumeToDDLogicalPartMap.h"
#include "SimG4Core/Geometry/interface/SensitiveDetectorCatalog.h"
#include "SimG4Core/MagneticField/interface/CMSFieldManager.h"
#include "SimG4Core/MagneticField/interface/Field.h"
#include "SimG4Core/MagneticField/interface/FieldBuilder.h"
#include "SimG4Core/Notification/interface/SimTrackManager.h"
#include "SimG4Core/Watcher/interface/SimProducer.h"
#include "SimG4Core/Watcher/interface/SimWatcherFactory.h"
#include "SimG4Core/SensitiveDetector/interface/sensitiveDetectorMakers.h"
#include "SimG4Core/SensitiveDetector/interface/AttachSD.h"
#include "MagneticField/Engine/interface/MagneticField.h"
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "DetectorDescription/DDCMS/interface/DDCompactView.h"
#include "G4RunManagerKernel.hh"
#include "G4TransportationManager.hh"
#include <iostream>
#include <memory>

Go to the source code of this file.

Functions

static void createWatchers (const edm::ParameterSet &iP, SimActivityRegistry &iReg, std::vector< std::shared_ptr< SimWatcher >> &oWatchers, std::vector< std::shared_ptr< SimProducer >> &oProds)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< GeometryProducer > > s_filler__LINE__ ("GeometryProducer")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< GeometryProducer > > s_maker__LINE__ ("GeometryProducer")
 

Function Documentation

◆ createWatchers()

static void createWatchers ( const edm::ParameterSet iP,
SimActivityRegistry iReg,
std::vector< std::shared_ptr< SimWatcher >> &  oWatchers,
std::vector< std::shared_ptr< SimProducer >> &  oProds 
)
static

Definition at line 37 of file GeometryProducer.cc.

40  {
41  using namespace std;
42  using namespace edm;
43  std::vector<ParameterSet> watchers;
44  try {
45  watchers = iP.getParameter<vector<ParameterSet>>("Watchers");
46  } catch (edm::Exception const &) {
47  }
48 
49  for (std::vector<ParameterSet>::iterator itWatcher = watchers.begin(); itWatcher != watchers.end(); ++itWatcher) {
50  std::unique_ptr<SimWatcherMakerBase> maker(
51  SimWatcherFactory::get()->create(itWatcher->getParameter<std::string>("type")));
52  if (maker.get() == nullptr) {
53  throw cms::Exception("SimG4CoreGeometryProducer", " createWatchers: Unable to find the requested Watcher");
54  }
55 
56  std::shared_ptr<SimWatcher> watcherTemp;
57  std::shared_ptr<SimProducer> producerTemp;
58  maker->make(*itWatcher, iReg, watcherTemp, producerTemp);
59  oWatchers.push_back(watcherTemp);
60  if (producerTemp)
61  oProds.push_back(producerTemp);
62  }
63 }

References beamerCreator::create(), Exception, get, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by GeometryProducer::GeometryProducer(), and RunManagerMTWorker::initializeTLS().

◆ s_filler__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< GeometryProducer > > s_filler__LINE__ ( "GeometryProducer"  )
static

◆ s_maker__LINE__()

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< GeometryProducer > > s_maker__LINE__ ( "GeometryProducer"  )
static
edm
HLT enums.
Definition: AlignableModifier.h:19
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
edm::Exception
Definition: EDMException.h:77
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
std
Definition: JetResolutionObject.h:76
Exception
Definition: hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303