46 for (
int i = 0;
i < 18;
i++) {
67 name =
"DAQSummaryMap";
74 for (
int i = 0;
i < 18;
i++) {
92 for (
int itx = 0; itx < 40; itx++ ) {
93 for (
int ity = 0; ity < 20; ity++ ) {
98 if ( !iSetup.
find( edm::eventsetup::EventSetupRecordKey::makeKey<EcalDAQTowerStatusRcd>() ) ) {
99 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalDAQTowerStatus record not found";
106 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalDAQTowerStatus record not valid";
113 if( !pElecMapping.
isValid() ) {
114 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
119 std::vector<DetId> crystals;
120 std::vector<EcalScDetId> scs;
122 for(
unsigned i=0 ;
i<
sizeof(
DccId_)/
sizeof(
int) ;
i++){
126 if(!crystals.size())
continue;
130 for(
unsigned u=0 ; u<scs.size() ; u++){
132 uint16_t dbStatus = 0;
134 if ( daqStatusIt != daqStatus->
end() ) dbStatus = daqStatusIt->getStatusCode();
136 if ( dbStatus > 0 ) {
137 int jx = scs[u].ix() - 1 + (scs[u].zside()<0 ? 0 : 20);
138 int jy = scs[u].iy() - 1;
153 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
162 for (
int itx = 0; itx < 40; itx++ ) {
163 for (
int ity = 0; ity < 20; ity++ ) {
175 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
184 for (
int i = 0;
i < 18;
i++) {
205 for (
int i = 0;
i < 18;
i++) {
216 int nValidChannels[18];
219 nValidChannels[
ism] = 0;
221 float readySumTot = 0.;
222 int nValidChannelsTot = 0;
232 std::vector<DetId> crystals;
233 std::vector<EcalScDetId> scs;
235 for (
unsigned iDcc = 0; iDcc <
sizeof(
DccId_)/
sizeof(
int); iDcc++) {
239 if(!crystals.size())
continue;
243 for(
unsigned u=0 ; u<scs.size() ; u++){
245 int jx = scs[u].ix() - 1 + (scs[u].zside()<0 ? 0 : 20);
246 int jy = scs[u].iy() - 1;
252 for(std::vector<DetId>::const_iterator it=crystals.begin() ; it!=crystals.end() ; ++it){
254 if(
id.zside() == scs[u].zside() && (
id.ix()-1)/5+1 == scs[u].ix() && (
id.iy()-1)/5+1 == scs[u].iy() ) ncrystals++;
258 readySum[iDcc] += ncrystals;
259 readySumTot += ncrystals;
262 nValidChannels[iDcc] += ncrystals;
263 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)
virtual ~EEDaqInfoTask()
Destructor.
void beginJob(void)
BeginJob.
void setBinContent(int binx, double content)
set content of bin (1-D)
const_iterator end() const
Some "id" conversions.
static const int DccId_[18]
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
void beginLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
BeginLuminosityBlock.
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
MonitorElement * meEEDaqActive_[18]
static const int nTowerMax_
void removeElement(const std::string &name)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
EEDaqInfoTask(const edm::ParameterSet &ps)
Constructor.
std::vector< EcalScDetId > getEcalScDetId(int DCCid, int DCC_Channel, bool ignoreSingleCrystal=true) const
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
T const * product() const
void endLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
EndLuminosityBlock.
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * meEEDaqFraction_
std::vector< Item >::const_iterator const_iterator
void fillMonitorElements(int ready[40][20], const EcalElectronicsMapping *)
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)
MonitorElement * meEEDaqActiveMap_
void setCurrentFolder(const std::string &fullpath)
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.
void cleanup(void)
Cleanup.