CMS 3D CMS Logo

SiStripClusterizer.cc
Go to the documentation of this file.
7 
9  : inputTags(conf.getParameter<std::vector<edm::InputTag>>("DigiProducersList")),
11  conf.getParameter<edm::ParameterSet>("Clusterizer"))) {
12  produces<edmNew::DetSetVector<SiStripCluster>>();
14  inputTags, [this](edm::InputTag const& tag) { return consumes<edm::DetSetVector<SiStripDigi>>(tag); });
15 }
16 
18  auto output = std::make_unique<edmNew::DetSetVector<SiStripCluster>>();
19  output->reserve(10000, 4 * 10000);
20 
22  // edm::Handle< edmNew::DetSetVector<SiStripDigi> > inputNew;
23 
24  algorithm->initialize(es);
25 
26  for (auto const& token : inputTokens) {
27  if (findInput(token, inputOld, event))
28  algorithm->clusterize(*inputOld, *output);
29  // else if( findInput( tag, inputNew, event) ) algorithm->clusterize(*inputNew, *output);
30  else
31  edm::LogError("Input Not Found") << "[SiStripClusterizer::produce] "; // << tag;
32  }
33 
34  LogDebug("Output") << output->dataSize() << " clusters from " << output->size() << " modules";
35  output->shrink_to_fit();
36  event.put(std::move(output));
37 }
38 
39 template <class T>
41  e.getByToken(tag, handle);
42  return handle.isValid();
43 }
SiStripClusterizer(const edm::ParameterSet &conf)
def create(alignables, pedeDump, additionalData, outputFile, config)
Log< level::Error, false > LogError
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
bool findInput(const edm::EDGetTokenT< T > &, edm::Handle< T > &, const edm::Event &)
std::unique_ptr< StripClusterizerAlgorithm > algorithm
const std::vector< edm::InputTag > inputTags
inputTags
All input tags are specified in this pset for convenience.
void produce(edm::Event &, const edm::EventSetup &) override
HLT enums.
Definition: output.py:1
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1
#define LogDebug(id)