15 LogDebug(
"EcalRawToRecHit|Producer")<<
"ready to create rechits from lazy getter: "<<
lsourceTag_
16 <<
"\n using region ref from: "<<sourceTag_
17 <<
"\n splitting in two collections"
24 LogDebug(
"EcalRawToRecHit|Producer")<<
"ready to create rechits from lazy getter: "<<
lsourceTag_
25 <<
"\n using region ref from: "<<sourceTag_
26 <<
"\n not splitting the output collection.";
30 if (iConfig.
exists(
"cleaningConfig")){
32 if (!cleaning.
empty())
60 LogDebug(
"EcalRawToRecHit|Producer")<<
"lazy getter retreived from: "<<
lsourceTag_<<(lgetter.failedToGet()?
" not valid ":
"valid") ;
66 LogDebug(
"EcalRawToRecHit|Producer")<<
"ref getter retreived from: "<<
sourceTag_<<(rgetter.failedToGet()?
" not valid ":
"valid");
78 for (;iRegion!=iRegionEnd;++iRegion){
79 LogDebug(
"EcalRawToRecHit|Producer")<<
"looping over refgetter region: "<<iR;
81 lgetter->setEvent(iEvent);
82 std::vector<EcalRecHit>::const_iterator iRecHit=lgetter->begin_record()+iRegion->start();
83 std::vector<EcalRecHit>::const_iterator iRecHitEnd =lgetter->begin_record()+iRegion->finish();
84 for (;iRecHit!=iRecHitEnd;iRecHit++){
88 LogDebug(
"EcalRawToRecHit|Producer")<<
"subdetId is: "<<EcalNum;
89 if (EcalNum==1) EBrechits->push_back(*iRecHit);
90 else if (EcalNum==2) EErechits->push_back(*iRecHit);
92 edm::LogError(
"IncorrectRecHit")<<
" a subdetid is not recognized. recHit on :"<< iRecHit->id().rawId()
96 LogDebug(
"EcalRawToRecHit|Producer")<<
"looping over refgetter region: "<<iR++<<
" done";
115 LogDebug(
"EcalRawToRecHit|Producer")<<
"collections uploaded.";
125 for (;iRegion!=iRegionEnd;++iRegion){
126 LogDebug(
"EcalRawToRecHit|Producer")<<
"looping over refgetter region: "<<iR ;
128 lgetter->setEvent(iEvent);
129 std::vector<EcalRecHit>::const_iterator iRecHit=lgetter->begin_record()+iRegion->start();
130 std::vector<EcalRecHit>::const_iterator iRecHitEnd=lgetter->begin_record()+iRegion->finish();
131 for (;iRecHit!=iRecHitEnd;iRecHit++){
132 LogDebug(
"EcalRawToRecHit|Producer")<<
"dereferencing rechit ref.";
135 LogDebug(
"EcalRawToRecHit|Producer")<<
"subdetId is: "<<EcalNum;
136 rechits->push_back(*iRecHit);
138 LogDebug(
"EcalRawToRecHit|Producer")<<
"looping over refgetter region: "<<iR++<<
" done" ;
146 LogDebug(
"EcalRawToRecHit|Producer")<<rechits->size()<<
" rechits to be put." ;
149 LogDebug(
"EcalRawToRecHit|Producer")<<
"collections uploaded." ;
T getParameter(std::string const &) const
~EcalRawToRecHitProducer()
virtual void produce(edm::Event &, const edm::EventSetup &)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::string rechitCollection_
EcalRawToRecHitProducer(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
EcalCleaningAlgo * cleaningAlgo_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
boost::indirect_iterator< typename collection_type::const_iterator > const_iterator
std::string EBrechitCollection_
void setFlags(EcalRecHitCollection &rhs)
edm::InputTag lsourceTag_
std::string EErechitCollection_