CMS 3D CMS Logo

SiStripClusterizer.cc
Go to the documentation of this file.
6 
8  : inputTags(conf.getParameter<std::vector<edm::InputTag>>("DigiProducersList")),
9  algorithm(StripClusterizerAlgorithmFactory::create(conf.getParameter<edm::ParameterSet>("Clusterizer"))) {
10  produces<edmNew::DetSetVector<SiStripCluster>>();
12  inputTags, [this](edm::InputTag const& tag) { return consumes<edm::DetSetVector<SiStripDigi>>(tag); });
13 }
14 
16  auto output = std::make_unique<edmNew::DetSetVector<SiStripCluster>>();
17  output->reserve(10000, 4 * 10000);
18 
20  // edm::Handle< edmNew::DetSetVector<SiStripDigi> > inputNew;
21 
22  algorithm->initialize(es);
23 
24  for (auto const& token : inputTokens) {
25  if (findInput(token, inputOld, event))
26  algorithm->clusterize(*inputOld, *output);
27  // else if( findInput( tag, inputNew, event) ) algorithm->clusterize(*inputNew, *output);
28  else
29  edm::LogError("Input Not Found") << "[SiStripClusterizer::produce] "; // << tag;
30  }
31 
32  LogDebug("Output") << output->dataSize() << " clusters from " << output->size() << " modules";
33  output->shrink_to_fit();
34  event.put(std::move(output));
35 }
36 
37 template <class T>
39  e.getByToken(tag, handle);
40  return handle.isValid();
41 }
#define LogDebug(id)
SiStripClusterizer(const edm::ParameterSet &conf)
def create(alignables, pedeDump, additionalData, outputFile, config)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool findInput(const edm::EDGetTokenT< T > &, edm::Handle< T > &, const edm::Event &)
std::unique_ptr< StripClusterizerAlgorithm > algorithm
const std::vector< edm::InputTag > inputTags
bool isValid() const
Definition: HandleBase.h:70
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
inputTags
All input tags are specified in this pset for convenience.
void produce(edm::Event &, const edm::EventSetup &) override
HLT enums.
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1