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/ServiceRegistry/interface/Service.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "SimG4Core/Watcher/interface/SimProducer.h"
#include "SimG4Core/Watcher/interface/SimWatcherFactory.h"
#include "SimG4Core/Geometry/interface/DDDWorld.h"
#include "SimG4Core/Geometry/interface/G4LogicalVolumeToDDLogicalPartMap.h"
#include "SimG4Core/Geometry/interface/SensitiveDetectorCatalog.h"
#include "SimG4Core/MagneticField/interface/FieldBuilder.h"
#include "SimG4Core/MagneticField/interface/CMSFieldManager.h"
#include "SimG4Core/MagneticField/interface/Field.h"
#include "SimG4Core/Notification/interface/SimTrackManager.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 "G4RunManagerKernel.hh"
#include "G4TransportationManager.hh"
#include <iostream>

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

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 33 of file GeometryProducer.cc.

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

Referenced by GeometryProducer::GeometryProducer().

36 {
37  using namespace std;
38  using namespace edm;
39  std::vector<ParameterSet> watchers;
40  try { watchers = iP.getParameter<vector<ParameterSet> >("Watchers"); }
41  catch(edm::Exception) {}
42 
43  for(std::vector<ParameterSet>::iterator itWatcher = watchers.begin();
44  itWatcher != watchers.end(); ++itWatcher)
45  {
46  std::unique_ptr<SimWatcherMakerBase>
47  maker(SimWatcherFactory::get()->create(itWatcher->getParameter<std::string> ("type")));
48  if(maker.get()==nullptr) {
49  throw cms::Exception("SimG4CoreGeometryProducer",
50  " createWatchers: Unable to find the requested Watcher");
51  }
52 
53  std::shared_ptr<SimWatcher> watcherTemp;
54  std::shared_ptr<SimProducer> producerTemp;
55  maker->make(*itWatcher,iReg,watcherTemp,producerTemp);
56  oWatchers.push_back(watcherTemp);
57  if(producerTemp) oProds.push_back(producerTemp);
58  }
59 }
T getParameter(std::string const &) const
def create(alignables, pedeDump, additionalData, outputFile, config)
HLT enums.
T get(const Candidate &c)
Definition: component.h:55
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< GeometryProducer > > s_filler__LINE__ ( "GeometryProducer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< GeometryProducer > > s_maker__LINE__ ( "GeometryProducer"  )
static