CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CompositeTSG.cc
Go to the documentation of this file.
2 
6 
8  theCategory = "CompositeTSG";
9 
10  //configure the individual components of the TSG
11  std::vector<std::string> PSetNames = par.getParameter<std::vector<std::string> >("PSetNames");
12 
13  for (std::vector<std::string>::iterator nIt = PSetNames.begin(); nIt != PSetNames.end(); nIt++) {
15  if (TSGpset.empty()) {
16  theNames.push_back((*nIt) + ":" + "NULL");
17  theTSGs.emplace_back(nullptr);
18  } else {
19  std::string SeedGenName = TSGpset.getParameter<std::string>("ComponentName");
20  theNames.push_back((*nIt) + ":" + SeedGenName);
21  theTSGs.emplace_back(TrackerSeedGeneratorFactory::get()->create(SeedGenName, TSGpset, IC));
22  }
23  }
24 }
25 
26 CompositeTSG::~CompositeTSG() = default;
27 
28 void CompositeTSG::init(const MuonServiceProxy* service) {
29  theProxyService = service;
30  for (unsigned int iTSG = 0; iTSG != theTSGs.size(); iTSG++) {
31  if (theTSGs[iTSG])
32  theTSGs[iTSG]->init(service);
33  }
34 }
35 
37  theEvent = &event;
38  for (unsigned int iTSG = 0; iTSG != theTSGs.size(); iTSG++) {
39  if (theTSGs[iTSG])
40  theTSGs[iTSG]->setEvent(event);
41  }
42 }
bool empty() const
Definition: ParameterSet.h:201
~CompositeTSG() override
CompositeTSG(const edm::ParameterSet &pset, edm::ConsumesCollector &IC)
Definition: CompositeTSG.cc:7
const edm::Event * theEvent
void init(const MuonServiceProxy *service) override
initialized the TSGs
Definition: CompositeTSG.cc:28
std::string theCategory
Definition: CompositeTSG.h:41
void setEvent(const edm::Event &event) override
set the event to the TSGs
Definition: CompositeTSG.cc:36
const MuonServiceProxy * theProxyService
Definition: CompositeTSG.h:43
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< std::string > theNames
Definition: CompositeTSG.h:40
std::vector< std::unique_ptr< TrackerSeedGenerator > > theTSGs
Definition: CompositeTSG.h:39
#define get