CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/SimG4Core/GeometryProducer/src/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(), and edm::ParameterSet::getParameter().

Referenced by GeometryProducer::GeometryProducer().

{
    using namespace std;
    using namespace edm;
    vector<ParameterSet> watchers;
    try { watchers = iP.getParameter<vector<ParameterSet> >("Watchers"); } 
    catch(edm::Exception) {}
  
    for(vector<ParameterSet>::iterator itWatcher = watchers.begin();
        itWatcher != watchers.end(); ++itWatcher) 
    {
        std::auto_ptr<SimWatcherMakerBase> 
            maker(SimWatcherFactory::get()->create(itWatcher->getParameter<std::string> ("type")));
        if(maker.get()==0) { throw SimG4Exception("Unable to find the requested Watcher"); }
    
        boost::shared_ptr<SimWatcher> watcherTemp;
        boost::shared_ptr<SimProducer> producerTemp;
        maker->make(*itWatcher,iReg,watcherTemp,producerTemp);
        oWatchers.push_back(watcherTemp);
        if(producerTemp) oProds.push_back(producerTemp);
  }
}
DEFINE_FWK_MODULE ( GeometryProducer  )