CMS 3D CMS Logo

Functions
sim Namespace Reference

Functions

std::pair< std::vector< SensitiveTkDetector * >, std::vector< SensitiveCaloDetector * > > attachSD (const std::unordered_map< std::string, std::unique_ptr< SensitiveDetectorMakerBase >> &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *, SimActivityRegistry &reg)
 
std::unordered_map< std::string, std::unique_ptr< SensitiveDetectorMakerBase > > sensitiveDetectorMakers (edm::ParameterSet const &, edm::ConsumesCollector, std::vector< std::string > const &chosenMakers)
 

Function Documentation

◆ attachSD()

std::pair<std::vector<SensitiveTkDetector *>, std::vector<SensitiveCaloDetector *> > sim::attachSD ( const std::unordered_map< std::string, std::unique_ptr< SensitiveDetectorMakerBase >> &  ,
const edm::EventSetup ,
const SensitiveDetectorCatalog ,
edm::ParameterSet const &  ,
const SimTrackManager ,
SimActivityRegistry reg 
)

◆ sensitiveDetectorMakers()

std::unordered_map<std::string, std::unique_ptr<SensitiveDetectorMakerBase> > sim::sensitiveDetectorMakers ( edm::ParameterSet const &  pset,
edm::ConsumesCollector  cc,
std::vector< std::string > const &  chosenMakers 
)

Definition at line 22 of file sensitiveDetectorMakers.cc.

23  {
24  std::unordered_map<std::string, std::unique_ptr<SensitiveDetectorMakerBase>> retValue;
25  if (chosenMakers.empty()) {
26  //load all
27  auto const& categoriesToInfo = edmplugin::PluginManager::get()->categoryToInfos();
28  auto infosItr = categoriesToInfo.find(SensitiveDetectorPluginFactory::get()->category());
29  if (infosItr == categoriesToInfo.end()) {
30  throw cms::Exception("MissingPlugins")
31  << "When trying to load all SensitiveDetectorMakerBase, no plugins found";
32  } else {
33  for (auto const& info : infosItr->second) {
34  retValue[info.name_] = SensitiveDetectorPluginFactory::get()->create(info.name_, pset, cc);
35  }
36  }
37  } else {
38  for (auto const& name : chosenMakers) {
39  retValue[name] = SensitiveDetectorPluginFactory::get()->create(name, pset, cc);
40  }
41  }
42  return retValue;
43  }

References taus_updatedMVAIds_cff::category, edmplugin::PluginManager::categoryToInfos(), Exception, edmplugin::PluginManager::get(), get, info(), Skims_PA_cff::name, and muonDTDigis_cfi::pset.

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

taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:31
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
edmplugin::PluginManager::get
static PluginManager * get()
Definition: PluginManager.cc:306
edmplugin::PluginManager::categoryToInfos
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:82
get
#define get
cc
Exception
Definition: hltDiff.cc:245
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27