29 ttMapToken_ = esConsumes<EcalTrigTowerConstituentsMap, IdealGeometryRecord>();
31 chStatusToken_ = esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
46 auto tpOut = std::make_unique<EcalTrigPrimDigiCollection>();
65 chit = chStatus->
find(
id);
67 if (chit != chStatus->
end()) {
68 code = (*chit).getStatusCode();
77 edm::LogError(
"EcalDetIdToBeRecoveredProducer") <<
"No channel status found for xtal " <<
id.rawId()
78 <<
"! something wrong with EcalChannelStatus in your DB? ";
90 chit = chStatus->
find(
id);
92 if (chit != chStatus->
end()) {
93 code = (*chit).getStatusCode();
102 edm::LogError(
"EcalDetIdToBeRecoveredProducer") <<
"No channel status found for xtal " <<
id.rawId()
103 <<
"! something wrong with EcalChannelStatus in your DB? ";
109 LogInfo(
"EcalTPSkimmer") <<
"total # of TP inserted: " << tpOut->size();
120 if (tpIt != tpIn->
end()) {
static EEDetId detIdFromDenseIndex(uint32_t din)
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > chStatusToken_
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< uint32_t > chStatusToSelectTP_
EcalTPSkimmer(const edm::ParameterSet &ps)
void produce(edm::Event &evt, const edm::EventSetup &es) override
std::vector< T >::const_iterator const_iterator
void push_back(T const &t)
std::set< EcalTrigTowerDetId > insertedTP_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
static EBDetId detIdFromDenseIndex(uint32_t di)
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > ttMapToken_
edm::ESHandle< EcalTrigTowerConstituentsMap > ttMap_
std::string tpOutputCollection_
#define DEFINE_FWK_MODULE(type)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const_iterator find(uint32_t rawId) const
const_iterator end() const
Log< level::Info, false > LogInfo
std::vector< Item >::const_iterator const_iterator
~EcalTPSkimmer() override
bool alreadyInserted(EcalTrigTowerDetId ttId)
void insertTP(EcalTrigTowerDetId ttId, edm::Handle< EcalTrigPrimDigiCollection > &in, EcalTrigPrimDigiCollection &out)
static bool validDenseIndex(uint32_t din)
iterator find(key_type k)
edm::EDGetTokenT< EcalTrigPrimDigiCollection > tpInputToken_
const_iterator end() const
static bool validDenseIndex(uint32_t din)