41 for (
int i = 0;
i < 18;
i++) {
62 name =
"DCSSummaryMap";
69 for (
int i = 0;
i < 18;
i++) {
87 for (
int itx = 0; itx < 40; itx++ ) {
88 for (
int ity = 0; ity < 20; ity++ ) {
93 if ( !iSetup.
find( edm::eventsetup::EventSetupRecordKey::makeKey<EcalDCSTowerStatusRcd>() ) ) {
94 edm::LogWarning(
"EEDcsInfoTask") <<
"EcalDCSTowerStatus record not found";
101 edm::LogWarning(
"EEDcsInfoTask") <<
"EcalDCSTowerStatus record not valid";
108 if( !pElecMapping.
isValid() ) {
109 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
114 std::vector<DetId> crystals;
115 std::vector<EcalScDetId> scs;
117 for(
unsigned i=0 ;
i<
sizeof(
DccId_)/
sizeof(
int) ;
i++){
121 if(!crystals.size())
continue;
125 for(
unsigned u=0 ; u<scs.size() ; u++){
127 uint16_t dbStatus = 0;
129 if ( dcsStatusIt != dcsStatus->
end() ) dbStatus = dcsStatusIt->getStatusCode();
131 if ( dbStatus > 0 ) {
132 int jx = scs[u].ix() - 1 + (scs[u].zside()<0 ? 0 : 20);
133 int jy = scs[u].iy() - 1;
170 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
179 for (
int itx = 0; itx < 40; itx++ ) {
180 for (
int ity = 0; ity < 20; ity++ ) {
192 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
201 for (
int i = 0;
i < 18;
i++) {
222 for (
int i = 0;
i < 18;
i++) {
233 int nValidChannels[18];
236 nValidChannels[
ism] = 0;
238 float readySumTot = 0.;
239 int nValidChannelsTot = 0;
249 std::vector<DetId> crystals;
250 std::vector<EcalScDetId> scs;
252 for (
unsigned iDcc = 0; iDcc <
sizeof(
DccId_)/
sizeof(
int); iDcc++) {
256 if(!crystals.size())
continue;
260 for(
unsigned u=0 ; u<scs.size() ; u++){
262 int jx = scs[u].ix() - 1 + (scs[u].zside()<0 ? 0 : 20);
263 int jy = scs[u].iy() - 1;
269 for(std::vector<DetId>::const_iterator it=crystals.begin() ; it!=crystals.end() ; ++it){
271 if(
id.zside() == scs[u].zside() && (
id.ix()-1)/5+1 == scs[u].ix() && (
id.iy()-1)/5+1 == scs[u].iy() ) ncrystals++;
275 readySum[iDcc] += ncrystals;
276 readySumTot += ncrystals;
279 nValidChannels[iDcc] += ncrystals;
280 nValidChannelsTot += ncrystals;
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
static std::string sEE(const unsigned ism)
static const int nTowerMax_
void setBinContent(int binx, double content)
set content of bin (1-D)
const_iterator end() const
Some "id" conversions.
void beginLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
BeginLuminosityBlock.
void cleanup(void)
Cleanup.
EEDcsInfoTask(const edm::ParameterSet &ps)
Constructor.
const_iterator find(uint32_t rawId) const
MonitorElement * bookFloat(const char *name)
Book float.
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
int getNbinsY(void) const
get # of bins in Y-axis
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
MonitorElement * meEEDcsActiveMap_
void beginJob(void)
BeginJob.
void removeElement(const std::string &name)
static const int DccId_[18]
MonitorElement * meEEDcsFraction_
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
virtual ~EEDcsInfoTask()
Destructor.
void endLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
EndLuminosityBlock.
T const * product() const
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
int getNbinsX(void) const
get # of bins in X-axis
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * meEEDcsActive_[18]
std::vector< Item >::const_iterator const_iterator
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
int ism(int ieta, int iphi)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
void setCurrentFolder(const std::string &fullpath)
void fillMonitorElements(int ready[40][20], const EcalElectronicsMapping *)
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.