44 for (
int i = 0;
i < 18;
i++) {
65 name =
"DAQSummaryMap";
72 for (
int i = 0;
i < 18;
i++) {
90 for (
int itx = 0; itx < 40; itx++ ) {
91 for (
int ity = 0; ity < 20; ity++ ) {
96 if ( !iSetup.
find( edm::eventsetup::EventSetupRecordKey::makeKey<EcalDAQTowerStatusRcd>() ) ) {
97 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalDAQTowerStatus record not found";
104 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalDAQTowerStatus record not valid";
111 if( !pElecMapping.
isValid() ) {
112 edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
117 std::vector<DetId> crystals;
118 std::vector<EcalScDetId> scs;
120 for(
unsigned i=0 ;
i<
sizeof(
DccId_)/
sizeof(
int) ;
i++){
124 if(!crystals.size())
continue;
128 for(
unsigned u=0 ; u<scs.size() ; u++){
130 uint16_t dbStatus = 0;
132 if ( daqStatusIt != daqStatus->
end() ) dbStatus = daqStatusIt->getStatusCode();
134 if ( dbStatus > 0 ) {
135 int jx = scs[u].ix() - 1 + (scs[u].zside()<0 ? 0 : 20);
136 int jy = scs[u].iy() - 1;
151 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
160 for (
int itx = 0; itx < 40; itx++ ) {
161 for (
int ity = 0; ity < 20; ity++ ) {
173 if( ! map )
edm::LogWarning(
"EEDaqInfoTask") <<
"EcalElectronicsMapping not available";
182 for (
int i = 0;
i < 18;
i++) {
203 for (
int i = 0;
i < 18;
i++) {
214 int nValidChannels[18];
217 nValidChannels[
ism] = 0;
219 float readySumTot = 0.;
220 int nValidChannelsTot = 0;
230 std::vector<DetId> crystals;
231 std::vector<EcalScDetId> scs;
233 for (
unsigned iDcc = 0; iDcc <
sizeof(
DccId_)/
sizeof(
int); iDcc++) {
237 if(!crystals.size())
continue;
241 for(
unsigned u=0 ; u<scs.size() ; u++){
243 int jx = scs[u].ix() - 1 + (scs[u].zside()<0 ? 0 : 20);
244 int jy = scs[u].iy() - 1;
250 for(std::vector<DetId>::const_iterator it=crystals.begin() ; it!=crystals.end() ; ++it){
252 if(
id.zside() == scs[u].zside() && (
id.ix()-1)/5+1 == scs[u].ix() && (
id.iy()-1)/5+1 == scs[u].iy() ) ncrystals++;
256 readySum[iDcc] += ncrystals;
257 readySumTot += ncrystals;
260 nValidChannels[iDcc] += ncrystals;
261 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.