CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripRawToClusters.cc
Go to the documentation of this file.
12 
13 using namespace std;
14 
15 namespace sistrip {
16 
17 RawToClusters::RawToClusters( const edm::ParameterSet& conf ) :
18  productLabel_(conf.getParameter<edm::InputTag>("ProductLabel")),
19  cabling_(0),
20  cacheId_(0),
21  clusterizer_(StripClusterizerAlgorithmFactory::create(conf.getParameter<edm::ParameterSet>("Clusterizer"))),
22  rawAlgos_(SiStripRawProcessingFactory::create(conf.getParameter<edm::ParameterSet>("Algorithms"))),
23  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true)
24 {
25  if ( edm::isDebugEnabled() ) {
26  LogTrace("SiStripRawToCluster")
27  << "[RawToClusters::" << __func__ << "]"
28  << " Constructing object...";
29  }
30  produces<LazyGetter>();
31 
32 }
33 
35  if ( edm::isDebugEnabled() ) {
36  LogTrace("SiStripRawToCluster")
37  << "[RawToClusters::" << __func__ << "]"
38  << " Destructing object...";
39  }
40  }
41 
43  updateCabling( setup );
44  clusterizer_->initialize(setup);
45  rawAlgos_->initialize(setup);
46  }
47 
49 
50  // update cabling
51  updateCabling( setup );
52  clusterizer_->initialize( setup );
53  rawAlgos_->initialize( setup );
54 
55  // get raw data
57  event.getByLabel( productLabel_, buffers );
58 
59  // create lazy unpacker
60  boost::shared_ptr<LazyUnpacker> unpacker( new LazyUnpacker( *cabling_, *clusterizer_, *rawAlgos_, *buffers ) );
61 
62  // propagate the parameter doAPVEmulatorCheck_ to the unpacker.
63  unpacker->doAPVEmulatorCheck(doAPVEmulatorCheck_);
64 
65  // create lazy getter
66  std::auto_ptr<LazyGetter> collection( new LazyGetter( cabling_->getRegionCabling().size() * SiStripRegionCabling::ALLSUBDETS * SiStripRegionCabling::ALLLAYERS, unpacker ) );
67 
68  // add collection to the event
69  event.put( collection );
70 
71  }
72 
74 
75  uint32_t cache_id = setup.get<SiStripRegionCablingRcd>().cacheIdentifier();
76  if ( cacheId_ != cache_id ) {
78  setup.get<SiStripRegionCablingRcd>().get( c );
79  cabling_ = c.product();
80  cacheId_ = cache_id;
81  }
82  }
83 
84 }
bool isDebugEnabled()
const SiStripRegionCabling * cabling_
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
RawToClustersLazyUnpacker LazyUnpacker
void updateCabling(const edm::EventSetup &setup)
const Cabling & getRegionCabling() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
#define LogTrace(id)
tuple conf
Definition: dbtoconf.py:185
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::LazyGetter< SiStripCluster > LazyGetter
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
SurfaceDeformation * create(int type, const std::vector< double > &params)
Definition: Run.h:36
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_