CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 "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/Field.h"
#include "SimG4Core/Notification/interface/SimG4Exception.h"
#include "SimG4Core/Application/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< boost::shared_ptr< SimWatcher > > &oWatchers, std::vector< boost::shared_ptr< SimProducer > > &oProds)
 
 DEFINE_FWK_MODULE (GeometryProducer)
 

Function Documentation

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

Definition at line 32 of file GeometryProducer.cc.

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

Referenced by GeometryProducer::GeometryProducer().

35 {
36  using namespace std;
37  using namespace edm;
38  vector<ParameterSet> watchers;
39  try { watchers = iP.getParameter<vector<ParameterSet> >("Watchers"); }
40  catch(edm::Exception) {}
41 
42  for(vector<ParameterSet>::iterator itWatcher = watchers.begin();
43  itWatcher != watchers.end(); ++itWatcher)
44  {
45  std::auto_ptr<SimWatcherMakerBase>
46  maker(SimWatcherFactory::get()->create(itWatcher->getParameter<std::string> ("type")));
47  if(maker.get()==0) { throw SimG4Exception("Unable to find the requested Watcher"); }
48 
49  boost::shared_ptr<SimWatcher> watcherTemp;
50  boost::shared_ptr<SimProducer> producerTemp;
51  maker->make(*itWatcher,iReg,watcherTemp,producerTemp);
52  oWatchers.push_back(watcherTemp);
53  if(producerTemp) oProds.push_back(producerTemp);
54  }
55 }
T getParameter(std::string const &) const
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
Definition: plugins.cc:73
std::auto_ptr< T > make(ParameterSet const &iPS, ActivityRegistry &iAR) const
Definition: ServiceMaker.h:49
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:55
DEFINE_FWK_MODULE ( GeometryProducer  )