26 fedMaskVector_(
pset.existsAs<
std::
vector<uint32_t> >(
"fedMaskVector")
29 fecMaskVector_(
pset.existsAs<
std::
vector<uint32_t> >(
"fecMaskVector")
32 ringVector_(
pset.existsAs<
std::
vector<uint32_t> >(
"ringVector")
38 i2cChanVector_(
pset.existsAs<
std::
vector<uint32_t> >(
"i2cChanVector")
41 lldChanVector_(
pset.existsAs<
std::
vector<uint32_t> >(
"lldChanVector")
45 dataWithMaskCached_(
false) {
47 <<
" Constructing object...";
52 <<
" NULL pointer to DQMStore!";
68 dataWithMaskCached_(
false) {
70 <<
" Constructing object...";
77 <<
" Destructing object...";
85 ss <<
" [Histo::" << __func__ <<
"]" << std::endl
86 <<
" Histogram title : " <<
title_ << std::endl
87 <<
" MonitorElement* : 0x" << std::hex << std::setw(8) << std::setfill(
'0') <<
me_ << std::endl
88 <<
std::dec <<
" CollateME* : 0x" << std::hex << std::setw(8) << std::setfill(
'0') <<
cme_ << std::endl
98 <<
" Found no histograms!";
103 std::vector<std::string>::const_iterator istr =
contents.begin();
106 std::string source_dir = istr->substr(0, istr->find(
":"));
113 client_dir = client_dir.substr(0, client_dir.size() - 1);
118 std::vector<MonitorElement*> me_list =
bei->
getContents(source_dir);
119 std::vector<MonitorElement*>::iterator ime = me_list.begin();
120 for (; ime != me_list.end(); ime++) {
123 <<
" NULL pointer to MonitorElement!";
132 if (
pos != std::string::npos) {
134 if (!
value.empty()) {
136 <<
" Found string \"" <<
title.substr(
pos, std::string::npos) <<
"\" with value \"" 138 if (!(
bei->
get(client_dir +
"/" +
title.substr(
pos, std::string::npos)))) {
142 <<
" Booked string \"" <<
title.substr(
pos, std::string::npos)
143 <<
"\" in directory \"" << client_dir <<
"\"";
146 std::stringstream
ss;
165 <<
" Found no histograms!";
170 std::vector<std::string>::const_iterator istr =
contents.begin();
173 std::string source_dir = istr->substr(0, istr->find(
":"));
180 client_dir = client_dir.substr(0, client_dir.size() - 1);
185 std::vector<MonitorElement*> me_list =
bei->
getContents(source_dir);
187 if (me_list.empty()) {
189 <<
" No MonitorElements found in dir " << source_dir;
193 std::vector<MonitorElement*>::iterator ime = me_list.begin();
194 for (; ime != me_list.end(); ime++) {
197 <<
" NULL pointer to MonitorElement!";
206 if (
pos != std::string::npos) {
208 if (!
value.empty()) {
210 <<
" Found string \"" <<
title.substr(
pos, std::string::npos) <<
"\" with value \"" 216 <<
" Booked string \"" <<
title.substr(
pos, std::string::npos)
217 <<
"\" in directory \"" << client_dir <<
"\"";
228 <<
" Unable to extract RunType!";
238 <<
" Found no histograms!";
243 std::vector<std::string>::const_iterator istr =
contents.begin();
246 std::string source_dir = istr->substr(0, istr->find(
":"));
253 client_dir = client_dir.substr(0, client_dir.size() - 1);
257 std::vector<MonitorElement*> me_list =
bei->
getContents(source_dir);
258 std::vector<MonitorElement*>::iterator ime = me_list.begin();
259 for (; ime != me_list.end(); ime++) {
262 <<
" NULL pointer to MonitorElement!";
269 if (
pos == std::string::npos)
271 if (
pos == std::string::npos)
273 if (
pos != std::string::npos) {
274 int value = (*ime)->getIntValue();
277 <<
"[CommissioningHistograms::" << __func__ <<
"]" 278 <<
" Found \"" <<
title.substr(
pos, std::string::npos) <<
"\" with value \"" <<
value <<
"\"";
279 if (!(
bei->
get(client_dir +
"/" +
title.substr(
pos, std::string::npos)))) {
283 <<
"[CommissioningHistograms::" << __func__ <<
"]" 284 <<
" Booked \"" <<
title.substr(
pos, std::string::npos) <<
"\" in directory \"" << client_dir <<
"\"";
299 <<
" Extracting available histograms...";
304 <<
" NULL pointer to DQMStore!";
311 <<
" Empty contents vector!";
316 std::vector<std::string>::const_iterator idir;
324 std::string source_dir = idir->substr(0, idir->find(
":"));
357 client_dir = client_dir.substr(0, client_dir.size() - 1);
365 std::vector<MonitorElement*>::iterator ime = me_list.begin();
366 for (; ime != me_list.end(); ime++) {
378 std::stringstream
ss;
379 ss <<
"[CommissioningHistograms::" << __func__ <<
"]" 380 <<
" Unexpected granularity for histogram title: " << std::endl
381 <<
title <<
" found in path " << std::endl
385 channel =
title.channel();
421 HistosMap::iterator ihistos =
histos_.find(
key);
422 if (ihistos !=
histos_.end()) {
423 Histos::iterator ihis = ihistos->second.begin();
425 if ((*ime)->getName() == (*ihis)->title_) {
436 histo->title_ = (*ime)->getName();
440 histo->me_ =
bei_->
get(client_dir +
"/" + (*ime)->getName());
443 <<
" NULL pointer to MonitorElement!";
453 <<
" Found histograms for " <<
histos_.size()
454 <<
" structures in cached histogram map!";
461 <<
" (Derived) implementation to come...";
467 Analyses::iterator ianal =
data().begin();
468 Analyses::iterator janal =
data().end();
469 for (; ianal != janal; ++ianal) {
471 std::stringstream
ss;
472 ianal->second->print(
ss);
473 if (ianal->second->isValid()) {
485 std::stringstream
good;
486 std::stringstream bad;
488 Analyses::iterator ianal =
data().begin();
489 Analyses::iterator janal =
data().end();
490 for (; ianal != janal; ++ianal) {
492 if (ianal->second->isValid()) {
493 ianal->second->summary(
good);
495 ianal->second->summary(bad);
500 if (
good.str().empty()) {
501 good <<
"None found!";
504 <<
" Printing summary of good analyses:" 508 if (bad.str().empty()) {
512 <<
" Printing summary of bad analyses:" 521 <<
" Printing histogram map, which has " <<
histos_.size() <<
" entries...";
522 HistosMap::const_iterator ihistos =
histos_.begin();
523 for (; ihistos !=
histos_.end(); ihistos++) {
524 std::stringstream
ss;
525 ss <<
" Found " << ihistos->second.size() <<
" histogram(s) for key: " << std::endl
527 Histos::const_iterator ihisto = ihistos->second.begin();
528 for (; ihisto != ihistos->second.end(); ihisto++) {
532 ss <<
" NULL pointer to Histo object!";
543 <<
" Clearing histogram map...";
544 HistosMap::iterator ihistos =
histos_.begin();
545 for (; ihistos !=
histos_.end(); ihistos++) {
546 Histos::iterator ihisto = ihistos->second.begin();
547 for (; ihisto != ihistos->second.end(); ihisto++) {
552 ihistos->second.clear();
579 <<
" No analyses generated!";
613 std::stringstream
ss;
617 if (
ss.str().find(
".root") == std::string::npos) {
625 if (std::getenv(scratch.c_str()) !=
nullptr) {
626 dir = std::getenv(scratch.c_str());
646 <<
" Saving histograms to root file" 647 <<
" (This may take some time!)";
651 <<
" Saved histograms to root file \"" <<
ss.str() <<
"\"!";
660 const uint32_t&
xbins,
662 const float& xhigh) {
690 <<
"\" Unable to create summary plot!";
696 <<
" Created summary plot with name \"" <<
me->getName() <<
"\" in directory \"" 700 <<
" NULL pointer to MonitorElement!" 701 <<
" Unable to create summary plot!";
708 <<
" Unable to extract root object!" 709 <<
" Returning NULL pointer!";
725 Analyses::iterator ianal =
data_.begin();
726 Analyses::iterator janal =
data_.end();
727 for (; ianal != janal; ++ianal) {
731 bool maskThisAnal_ =
false;
734 maskThisAnal_ =
true;
744 maskThisAnal_ =
true;
747 if (
mask_ && !maskThisAnal_)
749 else if (!
mask_ && maskThisAnal_)
static std::string name(const sistrip::RunType &, const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory)
static const char runNumber_[]
Log< level::Info, true > LogVerbatim
auto const good
min quality of good
void save(std::string &filename, uint32_t run_number=0, std::string partitionName="")
void print(std::stringstream &ss) const override
std::vector< uint32_t > lldChanVector_
Analyses & data(bool getMaskedData=false)
const uint16_t & ccuAddr() const
Utility class that holds histogram title.
A container class for generic run and event-related info, information required by the commissioning a...
CommissioningHistograms()
static const uint32_t invalid32_
std::vector< uint32_t > fecMaskVector_
static const char dqmClientFileName_[]
const uint16_t & ccuChan() const
void setCurrentFolder(std::string const &fullpath) override
std::vector< uint32_t > ccuVector_
static const char mlDqmClient_[]
static const uint16_t FED_ADC_RANGE
virtual void printAnalyses()
std::string pwd() override
Log< level::Error, false > LogError
const uint16_t & lldChan() const
static const uint16_t valid_
virtual void printSummary()
uint32_t init(const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &top_level_dir, const sistrip::Granularity &, const std::map< uint32_t, T > &data)
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
static const char undefinedView_[]
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
U second(std::pair< T, U > const &p)
static std::string view(const sistrip::View &)
static std::string runType(const sistrip::RunType &)
void fill(TH1 &summary_histo)
std::vector< uint32_t > i2cChanVector_
std::vector< uint32_t > fedMaskVector_
void extractHistograms(const std::vector< std::string > &)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static sistrip::RunType runType(DQMStore *const, const std::vector< std::string > &)
static const char taskId_[]
const uint32_t & key() const
Base utility class that identifies a position within a logical structure of the strip tracker...
void print(std::stringstream &) const
static uint32_t runNumber(DQMStore *const, const std::vector< std::string > &)
Utility class that identifies a position within the strip tracker geometrical structure, down to the level of an APV25 chip.
int extract(std::vector< int > *output, const std::string &dati)
const uint16_t & fedId() const
virtual ~CommissioningHistograms()
static std::string presentation(const sistrip::Presentation &)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
TH1 * histogram(const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory, const uint32_t &xbins, const float &xlow=1. *sistrip::invalid_, const float &xhigh=1. *sistrip::invalid_)
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
static const uint16_t invalid_
virtual MonitorElement * get(std::string const &fullpath) const
const uint16_t & fecSlot() const
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
virtual void createSummaryHisto(const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &)
static void copyCustomInformation(DQMStore *const, const std::vector< std::string > &)
std::map< uint32_t, CommissioningAnalysis * > Analyses
DQMStore *const bei() const
Abstract base for derived classes that provide analysis of commissioning histograms.
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const uint16_t & fecRing() const
static const char collate_[]
void remove(std::string pattern="")
std::vector< uint32_t > ringVector_
virtual void histoAnalysis(bool debug)
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const