13 MESet(_fullpath, _data, _readOnly),
14 logicalDimensions_(_logicalDimensions),
16 cache_(std::make_pair(-1, std::vector<int>(0)))
19 throw cms::Exception(
"InvalidCall") <<
"Need axis specifications" << std::endl;
40 for(
unsigned iME(0); iME < meNames.size(); iME++){
57 xaxis = presetAxes[0];
58 if(isMap) yaxis = presetAxes[1];
89 for(
int i(0);
i < xaxis.
nbins + 1;
i++)
111 float*
edges[] = {
new float[xaxis.
nbins + 1],
new float[yaxis.
nbins + 1]};
112 for(
int iSpec(0); iSpec < 2; iSpec++){
113 if(specs[iSpec]->edges){
114 for(
int i(0);
i < specs[iSpec]->
nbins + 1;
i++)
115 edges[iSpec][
i] = specs[iSpec]->edges[
i];
119 double low(specs[iSpec]->low), high(specs[iSpec]->high);
120 for(
int i(0);
i < nbins + 1;
i++)
121 edges[iSpec][
i] = low + (high - low) / nbins *
i;
125 for(
int iSpec(0); iSpec < 2; iSpec++)
126 delete [] edges[iSpec];
139 throw cms::Exception(
"InvalidCall") <<
"Variable bin size for 2D profile not implemented" << std::endl;
140 me =
dqmStore_->
bookProfile2D(meNames[iME], meNames[iME], xaxis.
nbins, xaxis.
low, xaxis.
high, yaxis.
nbins, yaxis.
low, yaxis.
high, zaxis.
low, zaxis.
high,
"");
149 throw cms::Exception(
"InvalidCall") <<
"ME could not be booked" << std::endl;
155 me->
getTH1()->SetMarkerStyle(actualObject + 2);
161 for(
int iBin(1); iBin <= me->
getNbinsX(); iBin++)
165 for(
int iBin(1); iBin <= me->
getNbinsX() / 2; iBin++){
166 unsigned dccid((iBin + 2) % 9 + 1);
169 for(
int iBin(1); iBin <= me->
getNbinsX() / 2; iBin++){
170 unsigned dccid((iBin + 2) % 9 + 46);
175 for(
int iBin(1); iBin <= me->
getNbinsX(); iBin++){
176 unsigned dccid((iBin + 2) % 9 + 1);
181 for(
int iBin(1); iBin <= me->
getNbinsX(); iBin++){
182 unsigned dccid((iBin + 2) % 9 + 46);
205 if(meNames.size() == 0)
return false;
207 for(
unsigned iME(0); iME < meNames.size(); iME++){
209 if(me)
mes_.push_back(me);
225 throw cms::Exception(
"InvalidCall") <<
"ME array index overflow" << std::endl;
245 throw cms::Exception(
"InvalidCall") <<
"MESet type incompatible" << std::endl;
256 for(std::vector<int>::iterator binItr(bins.begin()); binItr != bins.end(); ++binItr)
266 for(std::vector<int>::iterator binItr(bins.begin()); binItr != bins.end(); ++binItr)
276 for(std::vector<int>::iterator binItr(bins.begin()); binItr != bins.end(); ++binItr)
286 for(std::vector<int>::iterator binItr(bins.begin()); binItr != bins.end(); ++binItr)
295 if(
cache_.second.size() == 0)
return 0.;
305 if(
cache_.second.size() == 0)
return 0.;
315 if(
cache_.second.size() == 0)
return 0.;
325 if(
cache_.second.size() == 0)
return 0.;
335 if(
cache_.second.size() == 0)
return 0.;
345 if(
cache_.second.size() == 0)
return 0.;
381 for(
unsigned iME(0); iME < nME; iME++) {
387 throw cms::Exception(
"InvalidCall") <<
"Undefined object & bin type";
393 for(std::vector<int>::const_iterator binItr(binMap->begin()); binItr != binMap->end(); ++binItr){
401 std::vector<std::string>
427 std::vector<std::string>
names(0);
429 for(
unsigned iME(0); iME < nME; iME++) {
442 switch(actualObject){
445 name += spacer +
"EB";
break;
448 name += spacer +
"EE";
break;
450 name += spacer +
"EE-";
break;
452 name += spacer +
"EE+";
break;
457 iObj =
dccId(iME) - 1;
463 names.push_back(name);
481 throw cms::Exception(
"InvalidCall") <<
"ME array index overflow" << std::endl;
493 for(
unsigned iBin(0); iBin <
cache_.second.size(); iBin++)
const unsigned logicalDimensions_
void fill(DetId const &, double _wx=1., double _wy=1., double _w=1.)
std::string channelName(uint32_t, BinningType _btype=kDCC) const
BinService::ObjectType otype
static const HistoName names[]
virtual void reset(double _content=0., double _err=0., double _entries=0.)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
virtual void clear() const
std::vector< std::string > generateNames() const
BinService::AxisSpecs * yaxis
const std::vector< int > * getBinMap(ObjectType &, BinningType &) const
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
double getBinEntries(DetId const &, int _bin=0) const
MonitorElement::Kind kind
virtual void fill_(double)
std::vector< AxisSpecs > getBinning(ObjectType, BinningType, bool _isMap=true, unsigned _objOffset=0) const
unsigned dccId(const DetId &)
MonitorElement * bookFloat(const char *name)
Book float.
ObjectType objectFromOffset(ObjectType, unsigned) const
BinService::AxisSpecs * xaxis
std::vector< MonitorElement * > mes_
MESetEcal(std::string const &, MEData const &, int logicalDimensions_, bool _readOnly=false)
static DQMStore * dqmStore_
const T & max(const T &a, const T &b)
double getBinContent(DetId const &, int _bin=0) const
unsigned findOffset(ObjectType, const DetId &) const
BinService::BinningType btype
virtual void setBinEntries_(unsigned, int, double)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
virtual void setBinContent_(unsigned, int, double, double)
unsigned int offset(bool)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::pair< unsigned, std::vector< int > > cache_
void reset(double _content=0., double _err=0., double _entries=0.)
virtual void fill_(unsigned, int, double)
virtual double getBinContent_(unsigned, int) const
double getBinError(DetId const &, int _bin=0) const
virtual double getBinError_(unsigned, int) const
static BinService const * binService_
BinService::AxisSpecs * zaxis
void setBinContent(DetId const &, double, double _err=0.)
std::pair< unsigned, std::vector< int > > findBins(ObjectType, BinningType, const DetId &) const
void setBinEntries(DetId const &, double)
int getNbinsX(void) const
get # of bins in X-axis
virtual double getBinEntries_(unsigned, int) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual void resetAll(double _content=0., double _err=0., double _entries=0.)
void name(std::map< std::string, std::string > const &) const
void setCurrentFolder(const std::string &fullpath)
int smOffsetBins(ObjectType, BinningType, unsigned) const
virtual void find_(uint32_t) const
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")