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.

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

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  }
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:82
static const TGPicture * info(bool iBackgroundIsBlack)
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
#define get
static PluginManager * get()