43 for (
int i = 0;
i < 18;
i++) {
64 name =
"DCSSummaryMap";
71 for (
int i = 0;
i < 18;
i++) {
89 for (
int itx = 0; itx < 40; itx++ ) {
90 for (
int ity = 0; ity < 20; ity++ ) {
95 if ( !iSetup.
find( edm::eventsetup::EventSetupRecordKey::makeKey<EcalDCSTowerStatusRcd>() ) ) {
96 edm::LogWarning(
"EEDcsInfoTask") <<
"EcalDCSTowerStatus record not found";
103 edm::LogWarning(
"EEDcsInfoTask") <<
"EcalDCSTowerStatus record not valid";
110 if( !pElecMapping.
isValid() ) {
111 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
116 std::vector<DetId> crystals;
117 std::vector<EcalScDetId> scs;
119 for(
unsigned i=0 ;
i<
sizeof(
DccId_)/
sizeof(
int) ;
i++){
123 if(!crystals.size())
continue;
127 for(
unsigned u=0 ; u<scs.size() ; u++){
129 uint16_t dbStatus = 0;
131 if ( dcsStatusIt != dcsStatus->
end() ) dbStatus = dcsStatusIt->getStatusCode();
133 if ( dbStatus > 0 ) {
134 int jx = scs[u].ix() - 1 + (scs[u].zside()<0 ? 0 : 20);
135 int jy = scs[u].iy() - 1;
172 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
181 for (
int itx = 0; itx < 40; itx++ ) {
182 for (
int ity = 0; ity < 20; ity++ ) {
194 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
203 for (
int i = 0;
i < 18;
i++) {
224 for (
int i = 0;
i < 18;
i++) {
235 int nValidChannels[18];
238 nValidChannels[
ism] = 0;
240 float readySumTot = 0.;
241 int nValidChannelsTot = 0;
251 std::vector<DetId> crystals;
252 std::vector<EcalScDetId> scs;
254 for (
unsigned iDcc = 0; iDcc <
sizeof(
DccId_)/
sizeof(
int); iDcc++) {
258 if(!crystals.size())
continue;
262 for(
unsigned u=0 ; u<scs.size() ; u++){
264 int jx = scs[u].ix() - 1 + (scs[u].zside()<0 ? 0 : 20);
265 int jy = scs[u].iy() - 1;
271 for(std::vector<DetId>::const_iterator it=crystals.begin() ; it!=crystals.end() ; ++it){
273 if(
id.zside() == scs[u].zside() && (
id.ix()-1)/5+1 == scs[u].ix() && (
id.iy()-1)/5+1 == scs[u].iy() ) ncrystals++;
277 readySum[iDcc] += ncrystals;
278 readySumTot += ncrystals;
281 nValidChannels[iDcc] += ncrystals;
282 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.