CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ESUnpackerWorker Class Reference

#include <ESUnpackerWorker.h>

Inheritance diagram for ESUnpackerWorker:
EcalUnpackerWorkerBase

Public Member Functions

 ESUnpackerWorker (const edm::ParameterSet &conf)
 
unsigned int maxElementIndex () const
 
void set (const edm::EventSetup &es) const
 
void setHandles (const EcalUnpackerWorkerRecord &iRecord)
 
void update (const edm::Event &e) const
 
std::auto_ptr
< EcalRecHitCollection
work (const uint32_t &i, const FEDRawDataCollection &) const
 
void write (edm::Event &e) const
 
 ~ESUnpackerWorker ()
 
- Public Member Functions inherited from EcalUnpackerWorkerBase
 EcalUnpackerWorkerBase ()
 
virtual void setEvent (edm::Event const &e) const
 
virtual ~EcalUnpackerWorkerBase ()
 

Private Attributes

ESUnpackerESUnpacker_
 
ESRecHitWorkerBaseClassRHWorker_
 

Detailed Description

Definition at line 24 of file ESUnpackerWorker.h.

Constructor & Destructor Documentation

ESUnpackerWorker::ESUnpackerWorker ( const edm::ParameterSet conf)

Definition at line 6 of file ESUnpackerWorker.cc.

References ESUnpacker_, reco::get(), edm::ParameterSet::getParameter(), RHWorker_, and AlCaHLTBitMon_QueryRunRegistry::string.

6  {
7 
8  edm::ParameterSet DCCpset = conf.getParameter<edm::ParameterSet>("DCCDataUnpacker");
9  ESUnpacker_ = new ESUnpacker(DCCpset);
10 
12  std::string componentType = RH.getParameter<std::string>("Type");
13  RHWorker_ = ESRecHitWorkerFactory::get()->create(componentType, RH);
14 
15 }
T getParameter(std::string const &) const
ESUnpacker * ESUnpacker_
ESRecHitWorkerBaseClass * RHWorker_
T get(const Candidate &c)
Definition: component.h:55
ESUnpackerWorker::~ESUnpackerWorker ( )

Definition at line 17 of file ESUnpackerWorker.cc.

References ESUnpacker_, and RHWorker_.

17  {
18  delete ESUnpacker_;
19  delete RHWorker_;
20 }
ESUnpacker * ESUnpacker_
ESRecHitWorkerBaseClass * RHWorker_

Member Function Documentation

unsigned int ESUnpackerWorker::maxElementIndex ( ) const
inlinevirtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 42 of file ESUnpackerWorker.h.

References EcalRegionCabling::maxESElementIndex().

static uint32_t maxESElementIndex()
void ESUnpackerWorker::set ( const edm::EventSetup es) const
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 26 of file ESUnpackerWorker.cc.

References RHWorker_, and ESRecHitWorkerBaseClass::set().

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

26  {
27  RHWorker_->set(es);
28 }
virtual void set(const edm::EventSetup &es)=0
ESRecHitWorkerBaseClass * RHWorker_
void ESUnpackerWorker::setHandles ( const EcalUnpackerWorkerRecord iRecord)
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 22 of file ESUnpackerWorker.cc.

22  {
23 
24 }
void ESUnpackerWorker::update ( const edm::Event e) const
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 34 of file ESUnpackerWorker.cc.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

34  {
35 }
std::auto_ptr< EcalRecHitCollection > ESUnpackerWorker::work ( const uint32_t &  i,
const FEDRawDataCollection rawdata 
) const
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 38 of file ESUnpackerWorker.cc.

References edm::DataFrameContainer::begin(), edm::DataFrameContainer::end(), EcalRegionCabling::esFedIndex(), ESUnpacker_, FEDRawDataCollection::FEDData(), getHLTprescales::index, ESUnpacker::interpretRawData(), LogDebug, RHWorker_, ESRecHitWorkerBaseClass::run(), and edm::DataFrameContainer::size().

38  {
39 // MyWatcher watcher("Worker");
40  LogDebug("ESRawToRecHit|Worker")<<"is going to work on index: "<<index ;
41 // <<watcher.lap();
42 
43  int fedIndex = EcalRegionCabling::esFedIndex(index);
44 
45 
46  const FEDRawData & fedData = rawdata.FEDData(fedIndex);
47 
48  //###### get the digi #######
49  ESRawDataCollection productDCC;
50  ESLocalRawDataCollection productKCHIP;
51  ESDigiCollection productdigis;
52 
53  ESUnpacker_->interpretRawData(fedIndex, fedData, productDCC, productKCHIP, productdigis);
54 
55  LogDebug("ESRawToRecHit|Worker")<<"unpacked "<<productdigis.size()<<" digis" ;
56 // <<watcher.lap();
57 
58 
59  //then make rechits
60  ESDigiCollection::const_iterator beginDigiES = productdigis.begin();
61  ESDigiCollection::const_iterator endDigiES = productdigis.end();
62 
63  std::auto_ptr< EcalRecHitCollection > ecalrechits( new EcalRecHitCollection );
64 
65  ecalrechits->reserve(productdigis.size());
66 
67  ESDigiCollection::const_iterator esIt=beginDigiES;
68  for (;esIt!=endDigiES;++esIt){
69  RHWorker_->run( esIt, *ecalrechits );
70  }
71 
72  LogDebug("ESRawToRecHit|Worker")<<" made : "<<ecalrechits->size()<<" es rechits" ;
73 // <<watcher.lap();
74 
75  return ecalrechits;
76 }
#define LogDebug(id)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator begin() const
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
ESUnpacker * ESUnpacker_
void interpretRawData(int fedId, const FEDRawData &rawData, ESRawDataCollection &dccs, ESLocalRawDataCollection &kchips, ESDigiCollection &digis)
Definition: ESUnpacker.cc:53
const_iterator end() const
static int esFedIndex(const uint32_t index)
virtual bool run(const ESDigiCollection::const_iterator &digi, ESRecHitCollection &result)=0
ESRecHitWorkerBaseClass * RHWorker_
void ESUnpackerWorker::write ( edm::Event e) const
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 30 of file ESUnpackerWorker.cc.

Referenced by pkg.AbstractPkg::generate().

30  {
31 
32 }

Member Data Documentation

ESUnpacker* ESUnpackerWorker::ESUnpacker_
private

Definition at line 46 of file ESUnpackerWorker.h.

Referenced by ESUnpackerWorker(), work(), and ~ESUnpackerWorker().

ESRecHitWorkerBaseClass* ESUnpackerWorker::RHWorker_
private

Definition at line 47 of file ESUnpackerWorker.h.

Referenced by ESUnpackerWorker(), set(), work(), and ~ESUnpackerWorker().