CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
RunManager.cc File Reference
#include "SimG4Core/Application/interface/RunManager.h"
#include "SimG4Core/Application/interface/PrimaryTransformer.h"
#include "SimG4Core/Application/interface/RunAction.h"
#include "SimG4Core/Application/interface/EventAction.h"
#include "SimG4Core/Application/interface/StackingAction.h"
#include "SimG4Core/Application/interface/TrackingAction.h"
#include "SimG4Core/Application/interface/SteppingAction.h"
#include "SimG4Core/Application/interface/G4SimEvent.h"
#include "SimG4Core/Geometry/interface/DDDWorld.h"
#include "SimG4Core/Geometry/interface/G4LogicalVolumeToDDLogicalPartMap.h"
#include "SimG4Core/Geometry/interface/SensitiveDetectorCatalog.h"
#include "SimG4Core/SensitiveDetector/interface/AttachSD.h"
#include "SimG4Core/Generators/interface/Generator.h"
#include "SimG4Core/Physics/interface/PhysicsListFactory.h"
#include "SimG4Core/Watcher/interface/SimWatcherFactory.h"
#include "SimG4Core/MagneticField/interface/FieldBuilder.h"
#include "SimG4Core/MagneticField/interface/Field.h"
#include "MagneticField/Engine/interface/MagneticField.h"
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
#include "SimG4Core/Notification/interface/SimG4Exception.h"
#include "SimG4Core/Notification/interface/BeginOfJob.h"
#include "SimG4Core/Notification/interface/CurrentG4Track.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
#include "SimDataFormats/Forward/interface/LHCTransportLinkContainer.h"
#include "HepPDT/defs.h"
#include "HepPDT/TableBuilder.hh"
#include "HepPDT/ParticleDataTable.hh"
#include "SimGeneral/HepPDTRecord/interface/PDTRecord.h"
#include "G4StateManager.hh"
#include "G4ApplicationState.hh"
#include "G4RunManagerKernel.hh"
#include "G4UImanager.hh"
#include "G4EventManager.hh"
#include "G4Run.hh"
#include "G4Event.hh"
#include "G4TransportationManager.hh"
#include "G4ParticleTable.hh"
#include <iostream>
#include <sstream>
#include <fstream>
#include <memory>
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "SimG4Core/Application/interface/ExceptionHandler.h"

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)
 

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 66 of file RunManager.cc.

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

Referenced by RunManager::RunManager().

71 {
72  using namespace std;
73  using namespace edm;
74  vector<ParameterSet> watchers;
75  try {
76  watchers = iP.getParameter<vector<ParameterSet> >("Watchers");
77  } catch( edm::Exception) {
78  }
79 
80  for(vector<ParameterSet>::iterator itWatcher = watchers.begin();
81  itWatcher != watchers.end();
82  ++itWatcher) {
83  std::auto_ptr<SimWatcherMakerBase> maker(
85  (itWatcher->getParameter<std::string> ("type")) );
86  if(maker.get()==0) {
87  throw SimG4Exception("Unable to find the requested Watcher");
88  }
89 
90  boost::shared_ptr<SimWatcher> watcherTemp;
91  boost::shared_ptr<SimProducer> producerTemp;
92  maker->make(*itWatcher,iReg,watcherTemp,producerTemp);
93  oWatchers.push_back(watcherTemp);
94  if(producerTemp) {
95  oProds.push_back(producerTemp);
96  }
97  }
98 }
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:56