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 {
24  if ( edm::isDebugEnabled() ) {
25  LogTrace("SiStripRawToCluster")
26  << "[RawToClusters::" << __func__ << "]"
27  << " Constructing object...";
28  }
29  produces<LazyGetter>();
30 }
31 
33  if ( edm::isDebugEnabled() ) {
34  LogTrace("SiStripRawToCluster")
35  << "[RawToClusters::" << __func__ << "]"
36  << " Destructing object...";
37  }
38  }
39 
41  updateCabling( setup );
42  clusterizer_->initialize(setup);
43  rawAlgos_->initialize(setup);
44  }
45 
47 
48  // update cabling
49  updateCabling( setup );
50  clusterizer_->initialize( setup );
51  rawAlgos_->initialize( setup );
52 
53  // get raw data
55  event.getByLabel( productLabel_, buffers );
56 
57  // create lazy unpacker
58  boost::shared_ptr<LazyUnpacker> unpacker( new LazyUnpacker( *cabling_, *clusterizer_, *rawAlgos_, *buffers ) );
59 
60  // create lazy getter
61  std::auto_ptr<LazyGetter> collection( new LazyGetter( cabling_->getRegionCabling().size() * SiStripRegionCabling::ALLSUBDETS * SiStripRegionCabling::ALLLAYERS, unpacker ) );
62 
63  // add collection to the event
64  event.put( collection );
65 
66  }
67 
69 
70  uint32_t cache_id = setup.get<SiStripRegionCablingRcd>().cacheIdentifier();
71  if ( cacheId_ != cache_id ) {
73  setup.get<SiStripRegionCablingRcd>().get( c );
74  cabling_ = c.product();
75  cacheId_ = cache_id;
76  }
77  }
78 
79 }
bool isDebugEnabled()
const SiStripRegionCabling * cabling_
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
virtual void beginRun(edm::Run &, const edm::EventSetup &)
RawToClustersLazyUnpacker LazyUnpacker
virtual void produce(edm::Event &, const edm::EventSetup &)
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
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:32
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_