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 | Friends
EcalUnpackerWorker Class Reference

#include <EcalUnpackerWorker.h>

Inheritance diagram for EcalUnpackerWorker:
EcalUnpackerWorkerBase

Public Member Functions

 EcalUnpackerWorker (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
 
template<class DID >
void work (EcalDigiCollection::const_iterator &beginDigi, EcalDigiCollection::const_iterator &endDigi, std::auto_ptr< EcalUncalibratedRecHitCollection > &uncalibRecHits, std::auto_ptr< EcalRecHitCollection > &calibRechits) const
 
void write (edm::Event &e) const
 
 ~EcalUnpackerWorker ()
 
- Public Member Functions inherited from EcalUnpackerWorkerBase
 EcalUnpackerWorkerBase ()
 
virtual ~EcalUnpackerWorkerBase ()
 

Private Attributes

edm::ESHandle< EcalRegionCablingcabling
 
EcalRecHitWorkerBaseClassCalibWorker_
 
const edm::Eventevt
 
EcalElectronicsMappermyMap_
 
std::auto_ptr
< EcalRawDataCollection
productDccHeaders
 
std::auto_ptr< EBDigiCollectionproductDigisEB
 
std::auto_ptr< EEDigiCollectionproductDigisEE
 
std::auto_ptr< EBSrFlagCollectionproductEBSrFlags
 
std::auto_ptr< EESrFlagCollectionproductEESrFlags
 
std::auto_ptr
< EcalElectronicsIdCollection
productInvalidBlockLengths
 
std::auto_ptr< EBDetIdCollectionproductInvalidChIds
 
std::auto_ptr< EEDetIdCollectionproductInvalidEEChIds
 
std::auto_ptr< EEDetIdCollectionproductInvalidEEGains
 
std::auto_ptr< EEDetIdCollectionproductInvalidEEGainsSwitch
 
std::auto_ptr< EBDetIdCollectionproductInvalidGains
 
std::auto_ptr< EBDetIdCollectionproductInvalidGainsSwitch
 
std::auto_ptr
< EcalElectronicsIdCollection
productInvalidMemBlockSizes
 
std::auto_ptr
< EcalElectronicsIdCollection
productInvalidMemChIds
 
std::auto_ptr
< EcalElectronicsIdCollection
productInvalidMemGains
 
std::auto_ptr
< EcalElectronicsIdCollection
productInvalidMemTtIds
 
std::auto_ptr
< EcalElectronicsIdCollection
productInvalidTTIds
 
std::auto_ptr
< EcalElectronicsIdCollection
productInvalidZSXtalIds
 
std::auto_ptr
< EcalPnDiodeDigiCollection
productPnDiodeDigis
 
std::auto_ptr
< EcalPSInputDigiCollection
productPSs
 
std::auto_ptr
< EcalTrigPrimDigiCollection
productTps
 
EcalUncalibRecHitWorkerBaseClassUncalibWorker_
 
DCCDataUnpackerunpacker_
 

Friends

class EcalRawToRecHitByproductProducer
 

Additional Inherited Members

- Protected Attributes inherited from EcalUnpackerWorkerBase
const edm::Eventevt
 

Detailed Description

Definition at line 29 of file EcalUnpackerWorker.h.

Constructor & Destructor Documentation

EcalUnpackerWorker::EcalUnpackerWorker ( const edm::ParameterSet conf)

DCCDataUnpacker

Definition at line 18 of file EcalUnpackerWorker.cc.

References CalibWorker_, reco::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), EcalElectronicsMapper::makeMapFromVectors(), myMap_, productDccHeaders, productDigisEB, productDigisEE, productEBSrFlags, productEESrFlags, productInvalidBlockLengths, productInvalidChIds, productInvalidEEChIds, productInvalidEEGains, productInvalidEEGainsSwitch, productInvalidGains, productInvalidGainsSwitch, productInvalidMemBlockSizes, productInvalidMemChIds, productInvalidMemGains, productInvalidMemTtIds, productInvalidTTIds, productInvalidZSXtalIds, productPnDiodeDigis, productPSs, productTps, DCCDataUnpacker::setDccHeadersCollection(), DCCDataUnpacker::setEBDigisCollection(), DCCDataUnpacker::setEBSrFlagsCollection(), DCCDataUnpacker::setEcalPSsCollection(), DCCDataUnpacker::setEcalTpsCollection(), DCCDataUnpacker::setEEDigisCollection(), DCCDataUnpacker::setEESrFlagsCollection(), DCCDataUnpacker::setInvalidBlockLengthsCollection(), DCCDataUnpacker::setInvalidChIdsCollection(), DCCDataUnpacker::setInvalidEEChIdsCollection(), DCCDataUnpacker::setInvalidEEGainsCollection(), DCCDataUnpacker::setInvalidEEGainsSwitchCollection(), DCCDataUnpacker::setInvalidGainsCollection(), DCCDataUnpacker::setInvalidGainsSwitchCollection(), DCCDataUnpacker::setInvalidMemBlockSizesCollection(), DCCDataUnpacker::setInvalidMemChIdsCollection(), DCCDataUnpacker::setInvalidMemGainsCollection(), DCCDataUnpacker::setInvalidMemTtIdsCollection(), DCCDataUnpacker::setInvalidTTIdsCollection(), DCCDataUnpacker::setInvalidZSXtalIdsCollection(), DCCDataUnpacker::setPnDiodeDigisCollection(), DCCDataUnpacker::silentMode_, UncalibWorker_, and unpacker_.

18  {
20  edm::ParameterSet DCCpset = conf.getParameter<edm::ParameterSet>("DCCDataUnpacker");
21  edm::ParameterSet EEMpset = conf.getParameter<edm::ParameterSet>("ElectronicsMapper");
22 
23  unsigned int numbXtalTSamples_ = EEMpset.getParameter<unsigned int>("numbXtalTSamples");
24  unsigned int numbTriggerTSamples_ = EEMpset.getParameter<unsigned int>("numbTriggerTSamples");
25 
26  if( numbXtalTSamples_ <6 || numbXtalTSamples_>64 || (numbXtalTSamples_-2)%4 ){
27  edm::LogError("IncorrectConfiguration")<<"Unsuported number of xtal time samples : "<<numbXtalTSamples_
28  <<"\n Valid Number of xtal time samples are : 6,10,14,18,...,62";
29  }
30 
31  if( numbTriggerTSamples_ !=1 && numbTriggerTSamples_ !=4 && numbTriggerTSamples_ !=8 ){
32  edm::LogError("IncorrectConfiguration")<<"Unsuported number of trigger time samples : "<<numbTriggerTSamples_
33  <<"\n Valid number of trigger time samples are : 1, 4 or 8";
34  }
35 
36  myMap_ = new EcalElectronicsMapper(numbXtalTSamples_, numbTriggerTSamples_);
37  std::vector<int> oFl = DCCpset.getParameter<std::vector<int> >("orderedFedList");
38  std::vector<int> oDl = DCCpset.getParameter<std::vector<int> >("orderedDCCIdList");
39  bool readResult = myMap_->makeMapFromVectors(oFl,oDl);
40 
41  if(!readResult){
42  edm::LogError("IncorrectConfiguration")<<"\n unable to configure EcalElectronicsMapper from vectors.";
43  }
44 
46  DCCpset.getParameter<bool>("headerUnpacking"),
47  DCCpset.getParameter<bool>("srpUnpacking"),
48  DCCpset.getParameter<bool>("tccUnpacking"),
49  DCCpset.getParameter<bool>("feUnpacking"),
50  DCCpset.getParameter<bool>("memUnpacking"),
51  DCCpset.getParameter<bool>("syncCheck"),
52  DCCpset.getParameter<bool>("feIdCheck"),
53  DCCpset.getParameter<bool>("forceKeepFRData")
54  );
55 
77 
78  DCCDataUnpacker::silentMode_ = conf.getUntrackedParameter<bool> ("silentMode",true);
79 
80  edm::ParameterSet UncalibPSet = conf.getParameter<edm::ParameterSet>("UncalibRHAlgo");
81  std::string UncaliComponentName = UncalibPSet.getParameter<std::string>("Type");
82  UncalibWorker_ = EcalUncalibRecHitWorkerFactory::get()->create(UncaliComponentName, UncalibPSet);
83 
84  edm::ParameterSet CalibPSet = conf.getParameter<edm::ParameterSet>("CalibRHAlgo");
85  std::string CaliComponentName = CalibPSet.getParameter<std::string>("Type");
86  CalibWorker_ = EcalRecHitWorkerFactory::get()->create(CaliComponentName, CalibPSet);
87 
88 }
T getParameter(std::string const &) const
void setPnDiodeDigisCollection(std::auto_ptr< EcalPnDiodeDigiCollection > *x)
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< EEDetIdCollection > productInvalidEEGainsSwitch
EcalRecHitWorkerBaseClass * CalibWorker_
std::auto_ptr< EcalTrigPrimDigiCollection > productTps
std::auto_ptr< EcalPSInputDigiCollection > productPSs
std::auto_ptr< EcalElectronicsIdCollection > productInvalidBlockLengths
std::auto_ptr< EcalPnDiodeDigiCollection > productPnDiodeDigis
void setInvalidZSXtalIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
DCCDataUnpacker * unpacker_
void setInvalidMemBlockSizesCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::auto_ptr< EEDetIdCollection > productInvalidEEGains
EcalUncalibRecHitWorkerBaseClass * UncalibWorker_
void setDccHeadersCollection(std::auto_ptr< EcalRawDataCollection > *x)
void setEcalPSsCollection(std::auto_ptr< EcalPSInputDigiCollection > *x)
std::auto_ptr< EBSrFlagCollection > productEBSrFlags
void setInvalidEEGainsSwitchCollection(std::auto_ptr< EEDetIdCollection > *x)
void setEEDigisCollection(std::auto_ptr< EEDigiCollection > *x)
std::auto_ptr< EESrFlagCollection > productEESrFlags
std::auto_ptr< EBDetIdCollection > productInvalidChIds
static bool silentMode_
std::auto_ptr< EEDigiCollection > productDigisEE
void setInvalidMemTtIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemTtIds
void setEBSrFlagsCollection(std::auto_ptr< EBSrFlagCollection > *x)
void setEBDigisCollection(std::auto_ptr< EBDigiCollection > *x)
bool makeMapFromVectors(std::vector< int > &, std::vector< int > &)
void setInvalidMemGainsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidGainsCollection(std::auto_ptr< EBDetIdCollection > *x)
void setInvalidEEChIdsCollection(std::auto_ptr< EEDetIdCollection > *x)
void setInvalidTTIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::auto_ptr< EBDetIdCollection > productInvalidGainsSwitch
std::auto_ptr< EBDigiCollection > productDigisEB
std::auto_ptr< EBDetIdCollection > productInvalidGains
void setInvalidGainsSwitchCollection(std::auto_ptr< EBDetIdCollection > *x)
void setEESrFlagsCollection(std::auto_ptr< EESrFlagCollection > *x)
EcalElectronicsMapper * myMap_
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemBlockSizes
std::auto_ptr< EEDetIdCollection > productInvalidEEChIds
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemGains
std::auto_ptr< EcalElectronicsIdCollection > productInvalidTTIds
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemChIds
void setEcalTpsCollection(std::auto_ptr< EcalTrigPrimDigiCollection > *x)
void setInvalidMemChIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidBlockLengthsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidEEGainsCollection(std::auto_ptr< EEDetIdCollection > *x)
std::auto_ptr< EcalElectronicsIdCollection > productInvalidZSXtalIds
std::auto_ptr< EcalRawDataCollection > productDccHeaders
T get(const Candidate &c)
Definition: component.h:56
void setInvalidChIdsCollection(std::auto_ptr< EBDetIdCollection > *x)
EcalUnpackerWorker::~EcalUnpackerWorker ( )

Definition at line 90 of file EcalUnpackerWorker.cc.

References CalibWorker_, myMap_, UncalibWorker_, and unpacker_.

90  {
91  //delete everything that is own by the EcalUnpackerWorker
92  delete myMap_;
93  delete unpacker_;
94  delete UncalibWorker_;
95  delete CalibWorker_;
96 
97 }
EcalRecHitWorkerBaseClass * CalibWorker_
DCCDataUnpacker * unpacker_
EcalUncalibRecHitWorkerBaseClass * UncalibWorker_
EcalElectronicsMapper * myMap_

Member Function Documentation

unsigned int EcalUnpackerWorker::maxElementIndex ( ) const
inlinevirtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 47 of file EcalUnpackerWorker.h.

References EcalRegionCabling::maxElementIndex().

static uint32_t maxElementIndex()
void EcalUnpackerWorker::set ( const edm::EventSetup es) const
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 105 of file EcalUnpackerWorker.cc.

References CalibWorker_, EcalUncalibRecHitWorkerBaseClass::set(), EcalRecHitWorkerBaseClass::set(), and UncalibWorker_.

105  {
106  UncalibWorker_->set(es);
107  CalibWorker_->set(es);
108 }
EcalRecHitWorkerBaseClass * CalibWorker_
virtual void set(const edm::EventSetup &es)=0
EcalUncalibRecHitWorkerBaseClass * UncalibWorker_
virtual void set(const edm::EventSetup &es)=0
void EcalUnpackerWorker::setHandles ( const EcalUnpackerWorkerRecord iRecord)
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 99 of file EcalUnpackerWorker.cc.

References cabling, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), myMap_, and EcalElectronicsMapper::setEcalElectronicsMapping().

99  {
100  iRecord.getRecord<EcalRegionCablingRecord>().get(cabling);
101  //the mapping is set as long as the mapping is valid.
103 }
void setEcalElectronicsMapping(const EcalElectronicsMapping *)
EcalElectronicsMapper * myMap_
edm::ESHandle< EcalRegionCabling > cabling
void EcalUnpackerWorker::update ( const edm::Event e) const
virtual

keep the event

DCCDataUnpacker

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 114 of file EcalUnpackerWorker.cc.

References evt, productDccHeaders, productDigisEB, productDigisEE, productEBSrFlags, productEESrFlags, productInvalidBlockLengths, productInvalidChIds, productInvalidEEChIds, productInvalidEEGains, productInvalidEEGainsSwitch, productInvalidGains, productInvalidGainsSwitch, productInvalidMemBlockSizes, productInvalidMemChIds, productInvalidMemGains, productInvalidMemTtIds, productInvalidTTIds, productInvalidZSXtalIds, productPnDiodeDigis, productPSs, and productTps.

Referenced by python.Vispa.Gui.VispaWidget.VispaWidget::autosize(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), EcalRawToRecHitByproductProducer::produce(), python.Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), python.Vispa.Gui.FindDialog.FindDialog::reset(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), python.Vispa.Gui.VispaWidget.VispaWidget::setTitle(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and python.Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

114  {
116  evt=&e;
117 
118  const bool reserveMem =false;
119 
121  productDigisEB.reset(new EBDigiCollection);
122  productDigisEE.reset(new EEDigiCollection);
142 
143  if (reserveMem){
144  productDigisEB->reserve(1700);
145  productDigisEE->reserve(1700);
146  }
147 
148  }
std::auto_ptr< EEDetIdCollection > productInvalidEEGainsSwitch
std::auto_ptr< EcalTrigPrimDigiCollection > productTps
std::auto_ptr< EcalPSInputDigiCollection > productPSs
std::auto_ptr< EcalElectronicsIdCollection > productInvalidBlockLengths
std::auto_ptr< EcalPnDiodeDigiCollection > productPnDiodeDigis
std::auto_ptr< EEDetIdCollection > productInvalidEEGains
std::auto_ptr< EBSrFlagCollection > productEBSrFlags
std::auto_ptr< EESrFlagCollection > productEESrFlags
std::auto_ptr< EBDetIdCollection > productInvalidChIds
std::auto_ptr< EEDigiCollection > productDigisEE
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemTtIds
std::auto_ptr< EBDetIdCollection > productInvalidGainsSwitch
std::auto_ptr< EBDigiCollection > productDigisEB
std::auto_ptr< EBDetIdCollection > productInvalidGains
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemBlockSizes
std::auto_ptr< EEDetIdCollection > productInvalidEEChIds
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemGains
std::auto_ptr< EcalElectronicsIdCollection > productInvalidTTIds
const edm::Event * evt
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemChIds
std::auto_ptr< EcalElectronicsIdCollection > productInvalidZSXtalIds
std::auto_ptr< EcalRawDataCollection > productDccHeaders
std::auto_ptr< EcalRecHitCollection > EcalUnpackerWorker::work ( const uint32_t &  i,
const FEDRawDataCollection rawdata 
) const
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 151 of file EcalUnpackerWorker.cc.

References FEDRawData::data(), DCCDataUnpacker::ebDigisCollection(), DCCDataUnpacker::eeDigisCollection(), EMPTYEVENTSIZE, end, FEDRawDataCollection::FEDData(), EcalRegionCabling::fedIndex(), EcalElectronicsMapper::getActiveSM(), MyWatcher::lap(), LogDebug, myMap_, EcalElectronicsMapper::setActiveDCC(), FEDRawData::size(), findQualityFiles::size, DCCDataUnpacker::unpack(), and unpacker_.

151  {
152  MyWatcher watcher("Worker");
153  LogDebug("EcalRawToRecHit|Worker")<<"is going to work on index: "<<index
154  <<"for fed Id: "<<EcalRegionCabling::fedIndex(index)<<watcher.lap();
155 
156  int fedIndex = EcalRegionCabling::fedIndex(index);
157 
158  const FEDRawData & fedData = rawdata.FEDData(fedIndex);
159 
160  //remember where the iterators were before unpacking
161  /*R*/ LogDebug("EcalRawToRecHit|Worker")
162  <<"size of digi collections before unpacking: "
163  <<(*unpacker_->ebDigisCollection())->size()
164  <<" "<<(*unpacker_->eeDigisCollection())->size()
165  <<watcher.lap();
166 
169 
170  //###### get the digi #######
171  // unpack first
172  int smId =0;
173  int length = fedData.size();
174  if ( length >= EMPTYEVENTSIZE ){
175  if(myMap_->setActiveDCC(fedIndex)){
176  smId = myMap_->getActiveSM();
177  uint64_t * pData = (uint64_t *)(fedData.data());
178  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"calling the unpacker: "<<length<<" "<<smId<<" "<<fedIndex
179  <<watcher.lap();
180  unpacker_->unpack( pData, static_cast<unsigned int>(length),smId,fedIndex);
181  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"unpacking done."
182  <<watcher.lap();
183  }
184  else{
185  edm::LogInfo("EcalUnpackerWorker")<<"cannot set: "<<fedIndex<<" to be an active DCC.";
186  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"cannot set: "<<fedIndex<<" to be an active DCC.";
187  return std::auto_ptr< EcalRecHitCollection >(new EcalRecHitCollection);
188  }
189  }
190  else {
191  edm::LogInfo("EcalUnpackerWorker")<<"empty event on this FED: "<<fedIndex<<" length: "<<length;
192  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"empty event on this FED: "<<fedIndex<<" length: "<<length;
193  return std::auto_ptr< EcalRecHitCollection >(new EcalRecHitCollection);
194  }
195 
196  /*R*/ LogDebug("EcalRawToRecHit|Worker")
197  <<"size of digi collections after unpacking: "
198  <<(*unpacker_->ebDigisCollection())->size()
199  <<" "<<(*unpacker_->eeDigisCollection())->size()
200  <<watcher.lap();
203 
204  //collection for the rechits: uncalib and final
205  std::auto_ptr< EcalRecHitCollection > ecalrechits( new EcalRecHitCollection );
206  std::auto_ptr< EcalUncalibratedRecHitCollection > uncalibRecHits( new EcalUncalibratedRecHitCollection );
207 
208  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"going to work on EE rechits from: "<<endDigiEE-beginDigiEE<<" digis."
209  <<"\ngoing to work on EB rechits from: "<<endDigiEB-beginDigiEB<<" digis."
210  <<watcher.lap();
211  // EB
212  //make the uncalibrated rechits on the fly
213  if (beginDigiEB!=endDigiEB){
214  work<EBDetId>(beginDigiEB, endDigiEB, uncalibRecHits, ecalrechits);
215  }
216  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<uncalibRecHits->size()<<" uncalibrated rechit created so far\n"
217  <<ecalrechits->size()<<" rechit created so far."
218  <<watcher.lap();
219 
220  // EE
221  if (beginDigiEE!=endDigiEE){
222  work<EEDetId>(beginDigiEE, endDigiEE, uncalibRecHits, ecalrechits);
223  }
224  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<uncalibRecHits->size()<<" uncalibrated rechit created eventually\n"
225  <<ecalrechits->size()<<" rechit created eventually"
226  <<watcher.lap();
227 
228  return ecalrechits;
229 }
#define LogDebug(id)
void unpack(uint64_t *buffer, unsigned int bufferSize, unsigned int smId, unsigned int fedId)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
DCCDataUnpacker * unpacker_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
static int fedIndex(const uint32_t index)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
bool setActiveDCC(unsigned int dccId)
#define end
Definition: vmac.h:38
unsigned long long uint64_t
Definition: Time.h:15
EcalElectronicsMapper * myMap_
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
std::auto_ptr< EEDigiCollection > * eeDigisCollection()
std::auto_ptr< EBDigiCollection > * ebDigisCollection()
tuple size
Write out results.
edm::SortedCollection< EcalRecHit > EcalRecHitCollection
template<class DID >
void EcalUnpackerWorker::work ( EcalDigiCollection::const_iterator beginDigi,
EcalDigiCollection::const_iterator endDigi,
std::auto_ptr< EcalUncalibratedRecHitCollection > &  uncalibRecHits,
std::auto_ptr< EcalRecHitCollection > &  calibRechits 
) const
inline

Definition at line 87 of file EcalUnpackerWorker.h.

References CalibWorker_, evt, MyWatcher::lap(), LogDebug, EcalUncalibRecHitWorkerBaseClass::run(), EcalRecHitWorkerBaseClass::run(), and UncalibWorker_.

90  {
91  MyWatcher watcher("<Worker>");
92  LogDebug("EcalRawToRecHit|Worker")<<"ready to work on digis."<<watcher.lap();
93 
94  EcalDigiCollection::const_iterator itdg = beginDigi;
95  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"iterator check." ;
96 
97  for(; itdg != endDigi; ++itdg)
98  {
99 
100  //get the uncalibrated rechit
101  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"ready to make Uncalib rechit."<<watcher.lap();
102  if (!UncalibWorker_->run(*evt, itdg, *uncalibRecHits)) continue;
103  EcalUncalibratedRecHit & EURH=uncalibRecHits->back();
104 
105  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"creating a rechit."<<watcher.lap();
106  if (!CalibWorker_->run(*evt, EURH, *calibRechits)) continue;
107  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"created."<<watcher.lap();
108 
109  }//loop over digis
110  }
#define LogDebug(id)
EcalRecHitWorkerBaseClass * CalibWorker_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
EcalUncalibRecHitWorkerBaseClass * UncalibWorker_
virtual bool run(const edm::Event &evt, const EcalUncalibratedRecHit &uncalibRH, EcalRecHitCollection &result)=0
virtual bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result)=0
const edm::Event * evt
void EcalUnpackerWorker::write ( edm::Event e) const
virtual

Reimplemented from EcalUnpackerWorkerBase.

Definition at line 110 of file EcalUnpackerWorker.cc.

110  {
111  //write the collection in the event as requested.
112 }

Friends And Related Function Documentation

friend class EcalRawToRecHitByproductProducer
friend

Definition at line 59 of file EcalUnpackerWorker.h.

Member Data Documentation

edm::ESHandle<EcalRegionCabling> EcalUnpackerWorker::cabling
mutableprivate

Definition at line 80 of file EcalUnpackerWorker.h.

Referenced by setHandles().

EcalRecHitWorkerBaseClass* EcalUnpackerWorker::CalibWorker_
private

Definition at line 83 of file EcalUnpackerWorker.h.

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

const edm::Event* EcalUnpackerWorker::evt
mutableprivate

Definition at line 51 of file EcalUnpackerWorker.h.

Referenced by update(), and work().

EcalElectronicsMapper* EcalUnpackerWorker::myMap_
private

Definition at line 55 of file EcalUnpackerWorker.h.

Referenced by EcalUnpackerWorker(), setHandles(), work(), and ~EcalUnpackerWorker().

std::auto_ptr<EcalRawDataCollection> EcalUnpackerWorker::productDccHeaders
mutableprivate
std::auto_ptr<EBDigiCollection> EcalUnpackerWorker::productDigisEB
mutableprivate
std::auto_ptr<EEDigiCollection> EcalUnpackerWorker::productDigisEE
mutableprivate
std::auto_ptr<EBSrFlagCollection> EcalUnpackerWorker::productEBSrFlags
mutableprivate
std::auto_ptr<EESrFlagCollection> EcalUnpackerWorker::productEESrFlags
mutableprivate
std::auto_ptr<EcalElectronicsIdCollection> EcalUnpackerWorker::productInvalidBlockLengths
mutableprivate
std::auto_ptr< EBDetIdCollection> EcalUnpackerWorker::productInvalidChIds
mutableprivate
std::auto_ptr<EEDetIdCollection> EcalUnpackerWorker::productInvalidEEChIds
mutableprivate
std::auto_ptr< EEDetIdCollection> EcalUnpackerWorker::productInvalidEEGains
mutableprivate
std::auto_ptr<EEDetIdCollection> EcalUnpackerWorker::productInvalidEEGainsSwitch
mutableprivate
std::auto_ptr< EBDetIdCollection> EcalUnpackerWorker::productInvalidGains
mutableprivate
std::auto_ptr< EBDetIdCollection> EcalUnpackerWorker::productInvalidGainsSwitch
mutableprivate
std::auto_ptr<EcalElectronicsIdCollection> EcalUnpackerWorker::productInvalidMemBlockSizes
mutableprivate
std::auto_ptr<EcalElectronicsIdCollection> EcalUnpackerWorker::productInvalidMemChIds
mutableprivate
std::auto_ptr<EcalElectronicsIdCollection> EcalUnpackerWorker::productInvalidMemGains
mutableprivate
std::auto_ptr<EcalElectronicsIdCollection> EcalUnpackerWorker::productInvalidMemTtIds
mutableprivate
std::auto_ptr<EcalElectronicsIdCollection> EcalUnpackerWorker::productInvalidTTIds
mutableprivate
std::auto_ptr<EcalElectronicsIdCollection> EcalUnpackerWorker::productInvalidZSXtalIds
mutableprivate
std::auto_ptr<EcalPnDiodeDigiCollection> EcalUnpackerWorker::productPnDiodeDigis
mutableprivate
std::auto_ptr<EcalPSInputDigiCollection> EcalUnpackerWorker::productPSs
mutableprivate
std::auto_ptr<EcalTrigPrimDigiCollection> EcalUnpackerWorker::productTps
mutableprivate
EcalUncalibRecHitWorkerBaseClass* EcalUnpackerWorker::UncalibWorker_
private

Definition at line 82 of file EcalUnpackerWorker.h.

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

DCCDataUnpacker* EcalUnpackerWorker::unpacker_
private

Definition at line 53 of file EcalUnpackerWorker.h.

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