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  edm::LogInfo("EcalRawToRecHit")
56  <<"\n ECAL RawToDigi within RawToRecHit configuration:"
57  <<"\n Header unpacking is "<<DCCpset.getParameter<bool>("headerUnpacking")
58  <<"\n SRP Bl. unpacking is "<<DCCpset.getParameter<bool>("srpUnpacking")
59  <<"\n TCC Bl. unpacking is "<<DCCpset.getParameter<bool>("tccUnpacking")
60  <<"\n FE Bl. unpacking is "<<DCCpset.getParameter<bool>("feUnpacking")
61  <<"\n MEM Bl. unpacking is "<<DCCpset.getParameter<bool>("memUnpacking")
62  <<"\n sync check is "<<DCCpset.getParameter<bool>("syncCheck")
63  <<"\n feID check is "<<DCCpset.getParameter<bool>("feIdCheck")
64  <<"\n force keep FR data is "<<DCCpset.getParameter<bool>("forceKeepFRData")
65  <<"\n";
66 
88 
89  DCCDataUnpacker::silentMode_ = conf.getUntrackedParameter<bool> ("silentMode",true);
90 
91  edm::ParameterSet UncalibPSet = conf.getParameter<edm::ParameterSet>("UncalibRHAlgo");
92  std::string UncaliComponentName = UncalibPSet.getParameter<std::string>("Type");
93  UncalibWorker_ = EcalUncalibRecHitWorkerFactory::get()->create(UncaliComponentName, UncalibPSet);
94 
95  edm::ParameterSet CalibPSet = conf.getParameter<edm::ParameterSet>("CalibRHAlgo");
96  std::string CaliComponentName = CalibPSet.getParameter<std::string>("Type");
97  CalibWorker_ = EcalRecHitWorkerFactory::get()->create(CaliComponentName, CalibPSet);
98 
99 }
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 101 of file EcalUnpackerWorker.cc.

References CalibWorker_, myMap_, UncalibWorker_, and unpacker_.

101  {
102  //delete everything that is own by the EcalUnpackerWorker
103  delete myMap_;
104  delete unpacker_;
105  delete UncalibWorker_;
106  delete CalibWorker_;
107 
108 }
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 116 of file EcalUnpackerWorker.cc.

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

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

116  {
117  UncalibWorker_->set(es);
118  CalibWorker_->set(es);
119 }
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 110 of file EcalUnpackerWorker.cc.

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

110  {
111  iRecord.getRecord<EcalRegionCablingRecord>().get(cabling);
112  //the mapping is set as long as the mapping is valid.
114 }
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 125 of file EcalUnpackerWorker.cc.

References alignCSCRings::e, 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 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(), EcalRawToRecHitByproductProducer::produce(), 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().

125  {
127  evt=&e;
128 
129  const bool reserveMem =true;
130 
132  productDigisEB.reset(new EBDigiCollection);
133  productDigisEE.reset(new EEDigiCollection);
153 
154  if (reserveMem){
155  productDigisEB->reserve(1700);
156  productDigisEE->reserve(1700);
157  }
158 
159  }
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 162 of file EcalUnpackerWorker.cc.

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

162  {
163 // MyWatcher watcher("Worker");
164  LogDebug("EcalRawToRecHit|Worker")<<"is going to work on index: "<<index
165  <<"for fed Id: "<<EcalRegionCabling::fedIndex(index);
166 //<<watcher.lap();
167 //std::cout<<watcher.lap() <<std::endl;
168  int fedIndex = EcalRegionCabling::fedIndex(index);
169 
170  const FEDRawData & fedData = rawdata.FEDData(fedIndex);
171 
172  //remember where the iterators were before unpacking
173  LogDebug("EcalRawToRecHit|Worker")
174  <<"size of digi collections before unpacking: "
175  <<(*unpacker_->ebDigisCollection())->size()
176  <<" "<<(*unpacker_->eeDigisCollection())->size();
177  // <<watcher.lap();
178 
181 
182  //###### get the digi #######
183  // unpack first
184  int smId =0;
185  int length = fedData.size();
186  if ( length >= EMPTYEVENTSIZE ){
187  if(myMap_->setActiveDCC(fedIndex)){
188  smId = myMap_->getActiveSM();
189  uint64_t * pData = (uint64_t *)(fedData.data());
190  LogDebug("EcalRawToRecHit|Worker")<<"calling the unpacker: "<<length<<" "<<smId<<" "<<fedIndex ;
191 // <<watcher.lap();
192  unpacker_->unpack( pData, static_cast<unsigned int>(length),smId,fedIndex);
193  LogDebug("EcalRawToRecHit|Worker")<<"unpacking done." ;
194 // <<watcher.lap();
195  }
196  else{
197  edm::LogInfo("EcalUnpackerWorker")<<"cannot set: "<<fedIndex<<" to be an active DCC.";
198  LogDebug("EcalRawToRecHit|Worker")<<"cannot set: "<<fedIndex<<" to be an active DCC.";
199  return std::auto_ptr< EcalRecHitCollection >(new EcalRecHitCollection);
200  }
201  }
202  else {
203  edm::LogInfo("EcalUnpackerWorker")<<"empty event on this FED: "<<fedIndex<<" length: "<<length;
204  LogDebug("EcalRawToRecHit|Worker")<<"empty event on this FED: "<<fedIndex<<" length: "<<length;
205  return std::auto_ptr< EcalRecHitCollection >(new EcalRecHitCollection);
206  }
207 
208  LogDebug("EcalRawToRecHit|Worker")
209  <<"size of digi collections after unpacking: "
210  <<(*unpacker_->ebDigisCollection())->size()
211  <<" "<<(*unpacker_->eeDigisCollection())->size() ;
212 // <<watcher.lap();
215 
216  //collection for the rechits: uncalib and final
217  std::auto_ptr< EcalRecHitCollection > ecalrechits( new EcalRecHitCollection );
218  std::auto_ptr< EcalUncalibratedRecHitCollection > uncalibRecHits( new EcalUncalibratedRecHitCollection );
219 
220  LogDebug("EcalRawToRecHit|Worker")<<"going to work on EE rechits from: "<<endDigiEE-beginDigiEE<<" digis."
221  <<"\ngoing to work on EB rechits from: "<<endDigiEB-beginDigiEB<<" digis." ;
222 // <<watcher.lap();
223  // EB
224  //make the uncalibrated rechits on the fly
225  if (beginDigiEB!=endDigiEB){
226  work<EBDetId>(beginDigiEB, endDigiEB, uncalibRecHits, ecalrechits);
227  }
228  LogDebug("EcalRawToRecHit|Worker")<<uncalibRecHits->size()<<" uncalibrated rechit created so far\n"
229  <<ecalrechits->size()<<" rechit created so far." ;
230 // <<watcher.lap();
231 
232  // EE
233  if (beginDigiEE!=endDigiEE){
234  work<EEDetId>(beginDigiEE, endDigiEE, uncalibRecHits, ecalrechits);
235  }
236  LogDebug("EcalRawToRecHit|Worker")<<uncalibRecHits->size()<<" uncalibrated rechit created eventually\n"
237  <<ecalrechits->size()<<" rechit created eventually" ;
238 // <<watcher.lap();
239 
240  return ecalrechits;
241 }
#define LogDebug(id)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void unpack(const uint64_t *buffer, size_t bufferSize, unsigned int smId, unsigned int fedId)
DCCDataUnpacker * unpacker_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
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, LogDebug, EcalUncalibRecHitWorkerBaseClass::run(), EcalRecHitWorkerBaseClass::run(), and UncalibWorker_.

90  {
91 // MyWatcher watcher("<Worker>");
92  LogDebug("EcalRawToRecHit|Worker")<<"ready to work on digis.";
93 //<<watcher.lap();
94 
95  EcalDigiCollection::const_iterator itdg = beginDigi;
96  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"iterator check." ;
97 
98  for(; itdg != endDigi; ++itdg)
99  {
100 
101  //get the uncalibrated rechit
102  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"ready to make Uncalib rechit." ;
103 //<<watcher.lap();
104  if (!UncalibWorker_->run(*evt, itdg, *uncalibRecHits)) continue;
105  EcalUncalibratedRecHit & EURH=uncalibRecHits->back();
106 
107  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"creating a rechit." ;
108 //<<watcher.lap();
109  if (!CalibWorker_->run(*evt, EURH, *calibRechits)) continue;
110  /*R*/ LogDebug("EcalRawToRecHit|Worker")<<"created." ;
111 //<<watcher.lap();
112 
113  }//loop over digis
114  }
#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 121 of file EcalUnpackerWorker.cc.

121  {
122  //write the collection in the event as requested.
123 }

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().