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 std::vector<EcalRecHit>::const_iterator iRecHit=lgetter->begin_record()+iRegion->start();
82 std::vector<EcalRecHit>::const_iterator iRecHitEnd =lgetter->begin_record()+iRegion->finish();
83 for (;iRecHit!=iRecHitEnd;iRecHit++){
87 LogDebug(
"EcalRawToRecHit|Producer")<<
"subdetId is: "<<EcalNum;
88 if (EcalNum==1) EBrechits->push_back(*iRecHit);
89 else if (EcalNum==2) EErechits->push_back(*iRecHit);
91 edm::LogError(
"IncorrectRecHit")<<
" a subdetid is not recognized. recHit on :"<< iRecHit->id().rawId()
95 LogDebug(
"EcalRawToRecHit|Producer")<<
"looping over refgetter region: "<<iR++<<
" done";
114 LogDebug(
"EcalRawToRecHit|Producer")<<
"collections uploaded.";
124 for (;iRegion!=iRegionEnd;++iRegion){
125 LogDebug(
"EcalRawToRecHit|Producer")<<
"looping over refgetter region: "<<iR ;
127 std::vector<EcalRecHit>::const_iterator iRecHit=lgetter->begin_record()+iRegion->start();
128 std::vector<EcalRecHit>::const_iterator iRecHitEnd=lgetter->begin_record()+iRegion->finish();
129 for (;iRecHit!=iRecHitEnd;iRecHit++){
130 LogDebug(
"EcalRawToRecHit|Producer")<<
"dereferencing rechit ref.";
133 LogDebug(
"EcalRawToRecHit|Producer")<<
"subdetId is: "<<EcalNum;
134 rechits->push_back(*iRecHit);
136 LogDebug(
"EcalRawToRecHit|Producer")<<
"looping over refgetter region: "<<iR++<<
" done" ;
144 LogDebug(
"EcalRawToRecHit|Producer")<<rechits->size()<<
" rechits to be put." ;
147 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_