CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
EcalNextToDeadChannelESProducer Class Reference
Inheritance diagram for EcalNextToDeadChannelESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef boost::shared_ptr
< EcalNextToDeadChannel
ReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

 EcalNextToDeadChannelESProducer (const edm::ParameterSet &iConfig)
 
ReturnType produce (const EcalNextToDeadChannelRcd &iRecord)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Member Functions

void findNextToDeadChannelsCallback (const EcalChannelStatusRcd &chs)
 

Private Attributes

ReturnType returnRcd_
 
int statusThreshold_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

ESProducer to fill the EcalNextToDeadChannel record starting from EcalChannelStatus information

Author
Stefano Argiro
Version
Id:
EcalNextToDeadChannelESProducer.cc,v 1.1 2011/05/19 14:38:28 argiro Exp
Date
18 May 2011

Definition at line 25 of file EcalNextToDeadChannelESProducer.cc.

Member Typedef Documentation

Definition at line 30 of file EcalNextToDeadChannelESProducer.cc.

Constructor & Destructor Documentation

EcalNextToDeadChannelESProducer::EcalNextToDeadChannelESProducer ( const edm::ParameterSet iConfig)

Definition at line 46 of file EcalNextToDeadChannelESProducer.cc.

References edm::eventsetup::dependsOn(), findNextToDeadChannelsCallback(), edm::ParameterSet::getParameter(), returnRcd_, edm::ESProducer::setWhatProduced(), and statusThreshold_.

46  {
47  //the following line is needed to tell the framework what
48  // data is being produced
49  setWhatProduced(this,
51 
52  statusThreshold_= iConfig.getParameter<int>("channelStatusThresholdForDead");
53 
55 }
T getParameter(std::string const &) const
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
boost::shared_ptr< EcalNextToDeadChannel > ReturnType
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void findNextToDeadChannelsCallback(const EcalChannelStatusRcd &chs)

Member Function Documentation

void EcalNextToDeadChannelESProducer::findNextToDeadChannelsCallback ( const EcalChannelStatusRcd chs)
private

Definition at line 68 of file EcalNextToDeadChannelESProducer.cc.

References cond::rpcobgas::detid, edm::eventsetup::EventSetupRecord::get(), h, EcalTools::isNextToDeadFromNeighbours(), EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, returnRcd_, EcalCondObjectContainer< T >::setValue(), statusThreshold_, EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by EcalNextToDeadChannelESProducer().

68  {
69 
70 
71 
73 
74  // Find channels next to dead ones and fill corresponding record
75 
77  chs.get (h);
78 
79  for(int ieta=-EBDetId::MAX_IETA; ieta<=EBDetId::MAX_IETA; ++ieta) {
80  if(ieta==0) continue;
81  for(int iphi=EBDetId::MIN_IPHI; iphi<=EBDetId::MAX_IPHI; ++iphi) {
82  if (EBDetId::validDetId(ieta,iphi)) {
83 
84  EBDetId detid(ieta,iphi);
85 
87  *h,
89 
90 
91  rcd->setValue(detid,1);
92  };
93  }
94  } // for phi
95  } // for eta
96 
97  // endcap
98 
99  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
100  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
101 
102  if (EEDetId::validDetId(iX,iY,1)) {
103  EEDetId detid(iX,iY,1);
104 
106  *h,
108  rcd->setValue(detid,1);
109  };
110 
111  }
112 
113  if (EEDetId::validDetId(iX,iY,-1)) {
114  EEDetId detid(iX,iY,-1);
115 
117  *h,
119 
120  rcd->setValue(detid,1);
121  };
122  }
123  } // for iy
124  } // for ix
125 
126  returnRcd_.reset(rcd);
127 }
static const int MIN_IPHI
Definition: EBDetId.h:143
EcalCondObjectContainer< uint8_t > EcalNextToDeadChannel
static const int IX_MIN
Definition: EEDetId.h:295
static const int IY_MIN
Definition: EEDetId.h:299
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:125
void setValue(const uint32_t id, const Item &item)
void get(HolderT &iHolder) const
static const int IX_MAX
Definition: EEDetId.h:303
static bool isNextToDeadFromNeighbours(const DetId &id, const EcalChannelStatus &chs, int chStatusThreshold)
same as isNextToDead, but will use information from the neighbour
Definition: EcalTools.cc:72
static const int MAX_IPHI
Definition: EBDetId.h:145
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:249
static const int MAX_IETA
Definition: EBDetId.h:144
static const int IY_MAX
Definition: EEDetId.h:307
EcalNextToDeadChannelESProducer::ReturnType EcalNextToDeadChannelESProducer::produce ( const EcalNextToDeadChannelRcd iRecord)

Definition at line 60 of file EcalNextToDeadChannelESProducer.cc.

References returnRcd_.

60  {
61 
62  return returnRcd_ ;
63 }

Member Data Documentation

ReturnType EcalNextToDeadChannelESProducer::returnRcd_
private
int EcalNextToDeadChannelESProducer::statusThreshold_
private