CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
CommissioningHistograms Class Reference

#include <CommissioningHistograms.h>

Inheritance diagram for CommissioningHistograms:
ApvTimingHistograms CalibrationHistograms CommissioningHistosUsingDb DaqScopeModeHistograms FastFedCablingHistograms FedCablingHistograms FedTimingHistograms NoiseHistograms OptoScanHistograms PedestalsHistograms PedsFullNoiseHistograms PedsOnlyHistograms SamplingHistograms VpspScanHistograms

Classes

class  Histo
 

Public Types

typedef std::map< uint32_t, CommissioningAnalysis * > Analyses
 
typedef Analyses::iterator Analysis
 
typedef dqm::harvesting::DQMStore DQMStore
 
typedef SummaryPlotFactory< CommissioningAnalysis * > Factory
 
typedef std::map< uint32_t, uint32_t > FedToFecMap
 
typedef std::vector< Histo * > Histos
 
typedef std::map< uint32_t, HistosHistosMap
 
typedef dqm::harvesting::MonitorElement MonitorElement
 

Public Member Functions

 CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &)
 
 CommissioningHistograms ()
 
virtual void configure (const edm::ParameterSet &, const edm::EventSetup &)
 
void createCollations (const std::vector< std::string > &)
 
virtual void createSummaryHisto (const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &)
 
void extractHistograms (const std::vector< std::string > &)
 
virtual void histoAnalysis (bool debug)
 
virtual void printAnalyses ()
 
virtual void printSummary ()
 
void remove (std::string pattern="")
 
void save (std::string &filename, uint32_t run_number=0, std::string partitionName="")
 
virtual ~CommissioningHistograms ()
 

Static Public Member Functions

static void copyCustomInformation (DQMStore *const, const std::vector< std::string > &)
 
static uint32_t runNumber (DQMStore *const, const std::vector< std::string > &)
 
static sistrip::RunType runType (DQMStore *const, const std::vector< std::string > &)
 

Protected Member Functions

DQMStore *const bei () const
 
void clearHistosMap ()
 
Analysesdata (bool getMaskedData=false)
 
Factory *const factory ()
 
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_)
 
const HistosMaphistos () const
 
const FedToFecMapmapping () const
 
void printHistosMap ()
 
const edm::ParameterSetpset () const
 
const sistrip::RunTypetask () const
 

Protected Attributes

std::unique_ptr< Factoryfactory_
 

Private Attributes

DQMStorebei_
 
std::vector< uint32_t > ccuVector_
 
Analyses data_
 
Analyses dataWithMask_
 
bool dataWithMaskCached_
 
std::vector< uint32_t > fecMaskVector_
 
std::vector< uint32_t > fedMaskVector_
 
HistosMap histos_
 
std::vector< uint32_t > i2cChanVector_
 
std::vector< uint32_t > lldChanVector_
 
FedToFecMap mapping_
 
bool mask_
 
edm::ParameterSet pset_
 
std::vector< uint32_t > ringVector_
 
sistrip::RunType task_
 

Detailed Description

Definition at line 23 of file CommissioningHistograms.h.

Member Typedef Documentation

◆ Analyses

Definition at line 56 of file CommissioningHistograms.h.

◆ Analysis

typedef Analyses::iterator CommissioningHistograms::Analysis

Definition at line 58 of file CommissioningHistograms.h.

◆ DQMStore

Definition at line 27 of file CommissioningHistograms.h.

◆ Factory

Definition at line 60 of file CommissioningHistograms.h.

◆ FedToFecMap

typedef std::map<uint32_t, uint32_t> CommissioningHistograms::FedToFecMap

Definition at line 66 of file CommissioningHistograms.h.

◆ Histos

typedef std::vector<Histo*> CommissioningHistograms::Histos

Definition at line 62 of file CommissioningHistograms.h.

◆ HistosMap

typedef std::map<uint32_t, Histos> CommissioningHistograms::HistosMap

Definition at line 64 of file CommissioningHistograms.h.

◆ MonitorElement

Definition at line 26 of file CommissioningHistograms.h.

Constructor & Destructor Documentation

◆ CommissioningHistograms() [1/2]

CommissioningHistograms::CommissioningHistograms ( const edm::ParameterSet pset,
DQMStore * const  bei,
const sistrip::RunType task 
)

Definition at line 16 of file CommissioningHistograms.cc.

References bei_, clearHistosMap(), LogTrace, and sistrip::mlDqmClient_.

19  : factory_(nullptr),
20  task_(task),
21  bei_(bei),
22  data_(),
23  histos_(),
24  pset_(pset),
25  mask_(pset.existsAs<bool>("vetoModules") ? pset.getParameter<bool>("vetoModules") : true),
26  fedMaskVector_(pset.existsAs<std::vector<uint32_t> >("fedMaskVector")
27  ? pset.getParameter<std::vector<uint32_t> >("fedMaskVector")
28  : std::vector<uint32_t>()),
29  fecMaskVector_(pset.existsAs<std::vector<uint32_t> >("fecMaskVector")
30  ? pset.getParameter<std::vector<uint32_t> >("fecMaskVector")
31  : std::vector<uint32_t>()),
32  ringVector_(pset.existsAs<std::vector<uint32_t> >("ringVector")
33  ? pset.getParameter<std::vector<uint32_t> >("ringVector")
34  : std::vector<uint32_t>()),
35  ccuVector_(pset.existsAs<std::vector<uint32_t> >("ccuVector")
36  ? pset.getParameter<std::vector<uint32_t> >("ccuVector")
37  : std::vector<uint32_t>()),
38  i2cChanVector_(pset.existsAs<std::vector<uint32_t> >("i2cChanVector")
39  ? pset.getParameter<std::vector<uint32_t> >("i2cChanVector")
40  : std::vector<uint32_t>()),
41  lldChanVector_(pset.existsAs<std::vector<uint32_t> >("lldChanVector")
42  ? pset.getParameter<std::vector<uint32_t> >("lldChanVector")
43  : std::vector<uint32_t>()),
44  dataWithMask_(),
45  dataWithMaskCached_(false) {
46  LogTrace(mlDqmClient_) << "[" << __PRETTY_FUNCTION__ << "]"
47  << " Constructing object...";
48 
49  // DQMStore
50  if (!bei_) {
51  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
52  << " NULL pointer to DQMStore!";
53  }
54 
56 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< uint32_t > lldChanVector_
std::vector< uint32_t > fecMaskVector_
std::vector< uint32_t > ccuVector_
static const char mlDqmClient_[]
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:172
Log< level::Error, false > LogError
#define LogTrace(id)
std::vector< uint32_t > i2cChanVector_
std::vector< uint32_t > fedMaskVector_
std::unique_ptr< Factory > factory_
const edm::ParameterSet & pset() const
DQMStore *const bei() const
const sistrip::RunType & task() const
std::vector< uint32_t > ringVector_

◆ CommissioningHistograms() [2/2]

CommissioningHistograms::CommissioningHistograms ( )

Definition at line 60 of file CommissioningHistograms.cc.

References LogTrace, and sistrip::mlDqmClient_.

61  : factory_(nullptr),
63  bei_(nullptr),
64  data_(),
65  histos_(),
66  mask_(true),
67  dataWithMask_(),
68  dataWithMaskCached_(false) {
69  LogTrace(mlDqmClient_) << "[" << __PRETTY_FUNCTION__ << "]"
70  << " Constructing object...";
71 }
static const char mlDqmClient_[]
#define LogTrace(id)
std::unique_ptr< Factory > factory_

◆ ~CommissioningHistograms()

CommissioningHistograms::~CommissioningHistograms ( )
virtual

Definition at line 75 of file CommissioningHistograms.cc.

References clearHistosMap(), LogTrace, and sistrip::mlDqmClient_.

75  {
76  LogTrace(mlDqmClient_) << "[" << __PRETTY_FUNCTION__ << "]"
77  << " Destructing object...";
79  //@@ do not delete BEI ptrs!
80 }
static const char mlDqmClient_[]
#define LogTrace(id)

Member Function Documentation

◆ bei()

CommissioningHistograms::DQMStore *const CommissioningHistograms::bei ( ) const
inlineprotected

◆ clearHistosMap()

void CommissioningHistograms::clearHistosMap ( )
protected

Definition at line 541 of file CommissioningHistograms.cc.

References histos_, LogTrace, and sistrip::mlDqmClient_.

Referenced by CommissioningHistograms(), and ~CommissioningHistograms().

541  {
542  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
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++) {
548  if (*ihisto) {
549  delete *ihisto;
550  }
551  }
552  ihistos->second.clear();
553  }
554  histos_.clear();
555 }
static const char mlDqmClient_[]
#define LogTrace(id)

◆ configure()

virtual void CommissioningHistograms::configure ( const edm::ParameterSet ,
const edm::EventSetup  
)
inlinevirtual

◆ copyCustomInformation()

void CommissioningHistograms::copyCustomInformation ( DQMStore * const  bei,
const std::vector< std::string > &  contents 
)
static

Extracts custom information from list of MonitorElements.

Definition at line 234 of file CommissioningHistograms.cc.

References bei(), dqm::implementation::IBooker::bookInt(), relmon_rootfiles_spy::contents, sistrip::dir_, HcalObjRepresent::Fill(), dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getContents(), MonitorElementData::INT, sistrip::mlDqmClient_, castor_dqm_sourceclient_file_cfg::path, dqm::implementation::DQMStore::setCurrentFolder(), pickleFileParser::slash, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by SiStripCommissioningOfflineClient::beginRun().

234  {
235  // Check if histograms present
236  if (contents.empty()) {
237  edm::LogWarning(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
238  << " Found no histograms!";
239  return;
240  }
241 
242  // Iterate through added contents
243  std::vector<std::string>::const_iterator istr = contents.begin();
244  while (istr != contents.end()) {
245  // Extract source directory path
246  std::string source_dir = istr->substr(0, istr->find(":"));
247 
248  // Generate corresponding client path (removing trailing "/")
249  SiStripFecKey path(source_dir);
250  std::string client_dir = path.path();
251  std::string slash = client_dir.substr(client_dir.size() - 1, 1);
252  if (slash == sistrip::dir_) {
253  client_dir = client_dir.substr(0, client_dir.size() - 1);
254  }
255 
256  // Iterate though MonitorElements from source directory
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++) {
260  if (!(*ime)) {
261  edm::LogWarning(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
262  << " NULL pointer to MonitorElement!";
263  continue;
264  }
265  // Search for calchan, isha or vfs
266  if ((*ime)->kind() == MonitorElement::Kind::INT) {
267  std::string title = (*ime)->getName();
268  std::string::size_type pos = title.find("calchan");
269  if (pos == std::string::npos)
270  pos = title.find("isha");
271  if (pos == std::string::npos)
272  pos = title.find("vfs");
273  if (pos != std::string::npos) {
274  int value = (*ime)->getIntValue();
275  if (value >= 0) {
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)))) {
280  bei->setCurrentFolder(client_dir);
281  bei->bookInt(title.substr(pos, std::string::npos))->Fill(value);
283  << "[CommissioningHistograms::" << __func__ << "]"
284  << " Booked \"" << title.substr(pos, std::string::npos) << "\" in directory \"" << client_dir << "\"";
285  }
286  }
287  }
288  }
289  }
290  istr++;
291  }
292 }
Log< level::Info, true > LogVerbatim
static const char dir_[]
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:647
static const char mlDqmClient_[]
uint16_t size_type
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: value.py:1
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
DQMStore *const bei() const
Log< level::Warning, false > LogWarning
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:625

◆ createCollations()

void CommissioningHistograms::createCollations ( const std::vector< std::string > &  )

◆ createSummaryHisto()

void CommissioningHistograms::createSummaryHisto ( const sistrip::Monitorable mon,
const sistrip::Presentation pres,
const std::string &  top_level_dir,
const sistrip::Granularity gran 
)
virtual

Reimplemented in FedCablingHistograms, and FedTimingHistograms.

Definition at line 559 of file CommissioningHistograms.cc.

References data(), DeadROC_duringRun::dir, relativeConstraints::empty, factory(), sistrip::FED_ADC_RANGE, SummaryPlotFactory< T >::fill(), sistrip::HISTO_1D, histoAnalysis(), histogram(), SummaryPlotFactory< T >::init(), LogTrace, sistrip::mlDqmClient_, LaserDQM_cfi::mon, edmLumisInFiles::summary, sistrip::UNKNOWN_VIEW, SiStripEnumsAndStrings::view(), and fw3dlego::xbins.

Referenced by SiStripCommissioningOfflineClient::beginRun().

562  {
563  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]";
564 
565  // Check view
567  if (view == sistrip::UNKNOWN_VIEW) {
568  return;
569  }
570 
571  // Analyze histograms
572  if (data().empty()) {
573  histoAnalysis(false);
574  }
575 
576  // Check
577  if (data().empty()) {
578  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
579  << " No analyses generated!";
580  return;
581  }
582 
583  // Extract data to be histogrammed
584  uint32_t xbins = factory()->init(mon, pres, view, dir, gran, data());
585 
586  // Only create histograms if entries are found!
587  if (!xbins) {
588  return;
589  }
590 
591  // Create summary histogram (if it doesn't already exist)
592  TH1* summary = nullptr;
593  if (pres != sistrip::HISTO_1D) {
594  summary = histogram(mon, pres, view, dir, xbins);
595  } else {
597  }
598 
599  // Fill histogram with data
600  factory()->fill(*summary);
601 }
const double xbins[]
Analyses & data(bool getMaskedData=false)
static const char mlDqmClient_[]
static const uint16_t FED_ADC_RANGE
Log< level::Error, false > LogError
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)
#define LogTrace(id)
static std::string view(const sistrip::View &)
void fill(TH1 &summary_histo)
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_)
virtual void histoAnalysis(bool debug)

◆ data()

CommissioningHistograms::Analyses & CommissioningHistograms::data ( bool  getMaskedData = false)
protected

Definition at line 718 of file CommissioningHistograms.cc.

References conversion_template_cfg::anal, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), ccuVector_, data_, dataWithMask_, dataWithMaskCached_, fecMaskVector_, SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), SiStripFedKey::fedId(), fedMaskVector_, mps_fire::i, i2cChanVector_, SiStripFecKey::lldChan(), lldChanVector_, mask_, and ringVector_.

Referenced by FastFedCablingHistosUsingDb::addDcuDetIds(), CommissioningHistosUsingDb::addDcuDetIds(), FineDelayHistosUsingDb::computeDelays(), FastFedCablingHistosUsingDb::connections(), CommissioningHistosUsingDb::createAnalyses(), createSummaryHisto(), DaqScopeModeHistograms::histoAnalysis(), PedestalsHistograms::histoAnalysis(), CalibrationHistograms::histoAnalysis(), PedsFullNoiseHistograms::histoAnalysis(), FastFedCablingHistograms::histoAnalysis(), PedsOnlyHistograms::histoAnalysis(), NoiseHistograms::histoAnalysis(), VpspScanHistograms::histoAnalysis(), ApvTimingHistograms::histoAnalysis(), OptoScanHistograms::histoAnalysis(), SamplingHistograms::histoAnalysis(), OptoScanHistograms::printAnalyses(), PedestalsHistograms::printAnalyses(), FastFedCablingHistograms::printAnalyses(), DaqScopeModeHistograms::printAnalyses(), PedsFullNoiseHistograms::printAnalyses(), PedsOnlyHistograms::printAnalyses(), VpspScanHistograms::printAnalyses(), NoiseHistograms::printAnalyses(), CalibrationHistograms::printAnalyses(), printAnalyses(), FastFedCablingHistograms::printSummary(), printSummary(), CalibrationHistograms::save(), DaqScopeModeHistosUsingDb::update(), PedsOnlyHistosUsingDb::update(), PedsFullNoiseHistosUsingDb::update(), OptoScanHistosUsingDb::update(), VpspScanHistosUsingDb::update(), PedestalsHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), NoiseHistosUsingDb::update(), FastFedCablingHistosUsingDb::update(), LatencyHistosUsingDb::update(), and CalibrationHistosUsingDb::update().

718  {
719  if (!getMaskedData)
720  return data_;
721  else {
723  return dataWithMask_;
724  else {
725  Analyses::iterator ianal = data_.begin();
726  Analyses::iterator janal = data_.end();
727  for (; ianal != janal; ++ianal) {
728  CommissioningAnalysis* anal = ianal->second;
729  SiStripFedKey fedkey = anal->fedKey();
730  SiStripFecKey feckey = anal->fecKey();
731  bool maskThisAnal_ = false;
732  for (std::size_t i = 0; i < fedMaskVector_.size(); i++) {
733  if (fedkey.fedId() == fedMaskVector_[i])
734  maskThisAnal_ = true;
735  }
736  for (std::size_t i = 0; i < fecMaskVector_.size(); i++) {
737  if (fecMaskVector_.size() != ringVector_.size() || fecMaskVector_.size() != ccuVector_.size() ||
738  fecMaskVector_.size() != i2cChanVector_.size() || fecMaskVector_.size() != lldChanVector_.size()) {
739  continue;
740  }
741  if (feckey.fecSlot() == fecMaskVector_[i] && feckey.fecRing() == ringVector_[i] &&
742  feckey.ccuAddr() == ccuVector_[i] && feckey.ccuChan() == i2cChanVector_[i] &&
743  feckey.lldChan() == lldChanVector_[i]) {
744  maskThisAnal_ = true;
745  }
746  }
747  if (mask_ && !maskThisAnal_)
748  dataWithMask_[ianal->first] = ianal->second;
749  else if (!mask_ && maskThisAnal_)
750  dataWithMask_[ianal->first] = ianal->second;
751  }
752  dataWithMaskCached_ = true;
753  return dataWithMask_;
754  }
755  }
756 }
std::vector< uint32_t > lldChanVector_
const uint16_t & ccuAddr() const
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
std::vector< uint32_t > fecMaskVector_
const uint16_t & ccuChan() const
std::vector< uint32_t > ccuVector_
const uint16_t & lldChan() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
std::vector< uint32_t > i2cChanVector_
std::vector< uint32_t > fedMaskVector_
const uint16_t & fedId() const
const uint16_t & fecSlot() const
Abstract base for derived classes that provide analysis of commissioning histograms.
const uint16_t & fecRing() const
std::vector< uint32_t > ringVector_

◆ extractHistograms()

void CommissioningHistograms::extractHistograms ( const std::vector< std::string > &  contents)

Definition at line 297 of file CommissioningHistograms.cc.

References sistrip::APV, bei_, sistrip::collate_, relmon_rootfiles_spy::contents, sistrip::CONTROL_VIEW, sistrip::DETECTOR_VIEW, sistrip::dir_, dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getContents(), timingPdfMaker::histo, histos_, sistrip::invalid32_, sistrip::invalid_, SiStripKey::key(), submitPVResolutionJobs::key, SiStripFecKey::lldChan(), LogTrace, mapping_, sistrip::mlDqmClient_, castor_dqm_sourceclient_file_cfg::path, sistrip::READOUT_VIEW, edm::second(), pickleFileParser::slash, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, runGCPTkAlMap::title, sistrip::UNDEFINED_GRAN, sistrip::undefinedView_, sistrip::UNKNOWN_GRAN, and SiStripEnumsAndStrings::view().

Referenced by SiStripCommissioningOfflineClient::beginRun().

297  {
298  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
299  << " Extracting available histograms...";
300 
301  // Check pointer
302  if (!bei_) {
303  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
304  << " NULL pointer to DQMStore!";
305  return;
306  }
307 
308  // Check list of histograms
309  if (contents.empty()) {
310  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
311  << " Empty contents vector!";
312  return;
313  }
314 
315  // Iterate through list of histograms
316  std::vector<std::string>::const_iterator idir;
317  for (idir = contents.begin(); idir != contents.end(); idir++) {
318  // Ignore "DQM source" directories if looking in client file
319  if (idir->find(sistrip::collate_) == std::string::npos) {
320  continue;
321  }
322 
323  // Extract source directory path
324  std::string source_dir = idir->substr(0, idir->find(":"));
325 
326  // Extract view and create key
329  if (view == sistrip::CONTROL_VIEW) {
330  path = SiStripFecKey(source_dir);
331  } else if (view == sistrip::READOUT_VIEW) {
332  path = SiStripFedKey(source_dir);
333  } else if (view == sistrip::DETECTOR_VIEW) {
334  path = SiStripDetKey(source_dir);
335  } else {
336  path = SiStripKey();
337  }
338 
339  // Check path is valid
340  if (path.granularity() == sistrip::UNKNOWN_GRAN || path.granularity() == sistrip::UNDEFINED_GRAN) {
341  continue;
342  }
343 
344  // Generate corresponding client path (removing trailing "/")
346  if (view == sistrip::CONTROL_VIEW) {
347  client_dir = SiStripFecKey(path.key()).path();
348  } else if (view == sistrip::READOUT_VIEW) {
349  client_dir = SiStripFedKey(path.key()).path();
350  } else if (view == sistrip::DETECTOR_VIEW) {
351  client_dir = SiStripDetKey(path.key()).path();
352  } else {
353  client_dir = SiStripKey(path.key()).path();
354  }
355  std::string slash = client_dir.substr(client_dir.size() - 1, 1);
356  if (slash == sistrip::dir_) {
357  client_dir = client_dir.substr(0, client_dir.size() - 1);
358  }
359  client_dir = std::string(sistrip::collate_) + sistrip::dir_ + client_dir;
360 
361  // Retrieve MonitorElements from source directory
362  std::vector<MonitorElement*> me_list = bei_->getContents(source_dir);
363 
364  // Iterate though MonitorElements and create CMEs
365  std::vector<MonitorElement*>::iterator ime = me_list.begin();
366  for (; ime != me_list.end(); ime++) {
367  // Retrieve histogram title
368  SiStripHistoTitle title((*ime)->getName());
369 
370  // Check histogram type
371  //if ( title.histoType() != sistrip::EXPERT_HISTO ) { continue; }
372 
373  // Check granularity
374  uint16_t channel = sistrip::invalid_;
375  if (title.granularity() == sistrip::APV) {
376  channel = SiStripFecKey::lldChan(title.channel());
377  } else if (title.granularity() == sistrip::UNKNOWN_GRAN || title.granularity() == sistrip::UNDEFINED_GRAN) {
378  std::stringstream ss;
379  ss << "[CommissioningHistograms::" << __func__ << "]"
380  << " Unexpected granularity for histogram title: " << std::endl
381  << title << " found in path " << std::endl
382  << path;
383  edm::LogError(mlDqmClient_) << ss.str();
384  } else {
385  channel = title.channel();
386  }
387 
388  // Build key
389  uint32_t key = sistrip::invalid32_;
390 
391  if (view == sistrip::CONTROL_VIEW) {
392  // for all runs except cabling
393  SiStripFecKey temp(path.key());
394  key = SiStripFecKey(temp.fecCrate(), temp.fecSlot(), temp.fecRing(), temp.ccuAddr(), temp.ccuChan(), channel)
395  .key();
396  mapping_[title.keyValue()] = key;
397 
398  } else if (view == sistrip::READOUT_VIEW) {
399  // for cabling run
400  key = SiStripFedKey(path.key()).key();
406  channel)
407  .key(); // just record lld channel
408  mapping_[title.keyValue()] = temp;
409 
410  } else if (view == sistrip::DETECTOR_VIEW) {
411  SiStripDetKey temp(path.key());
412  key = SiStripDetKey(temp.partition()).key();
413  mapping_[title.keyValue()] = key;
414 
415  } else {
416  key = SiStripKey(path.key()).key();
417  }
418 
419  // Find CME in histos map
420  Histo* histo = nullptr;
421  HistosMap::iterator ihistos = histos_.find(key);
422  if (ihistos != histos_.end()) {
423  Histos::iterator ihis = ihistos->second.begin();
424  while (!histo && ihis < ihistos->second.end()) {
425  if ((*ime)->getName() == (*ihis)->title_) {
426  histo = *ihis;
427  }
428  ihis++;
429  }
430  }
431 
432  // Create CollateME if it doesn't exist
433  if (!histo) {
434  histos_[key].push_back(new Histo());
435  histo = histos_[key].back();
436  histo->title_ = (*ime)->getName();
437 
438  // If histogram present in client directory, add to map
439  if (source_dir.find(sistrip::collate_) != std::string::npos) {
440  histo->me_ = bei_->get(client_dir + "/" + (*ime)->getName());
441  if (!histo->me_) {
442  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
443  << " NULL pointer to MonitorElement!";
444  }
445  }
446  }
447  }
448  }
449 
450  //printHistosMap();
451 
452  edm::LogVerbatim(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
453  << " Found histograms for " << histos_.size()
454  << " structures in cached histogram map!";
455 }
Log< level::Info, true > LogVerbatim
static const char dir_[]
Utility class that holds histogram title.
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
static const uint32_t invalid32_
Definition: Constants.h:15
static const char mlDqmClient_[]
Log< level::Error, false > LogError
const uint16_t & lldChan() const
#define LogTrace(id)
static const char undefinedView_[]
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
U second(std::pair< T, U > const &p)
static std::string view(const sistrip::View &)
const uint32_t & key() const
Definition: SiStripKey.h:120
Base utility class that identifies a position within a logical structure of the strip tracker...
Definition: SiStripKey.h:23
key
prepare the HTCondor submission files and eventually submit them
Utility class that identifies a position within the strip tracker geometrical structure, down to the level of an APV25 chip.
Definition: SiStripDetKey.h:28
static const uint16_t invalid_
Definition: Constants.h:16
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
static const char collate_[]
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:625

◆ factory()

CommissioningHistograms::Factory *const CommissioningHistograms::factory ( )
inlineprotected

Definition at line 160 of file CommissioningHistograms.h.

References factory_.

Referenced by createSummaryHisto().

160 { return factory_.get(); }
std::unique_ptr< Factory > factory_

◆ histoAnalysis()

void CommissioningHistograms::histoAnalysis ( bool  debug)
virtual

Reimplemented in FedCablingHistograms, FedTimingHistograms, SamplingHistograms, ApvTimingHistograms, CalibrationHistograms, DaqScopeModeHistograms, FastFedCablingHistograms, NoiseHistograms, OptoScanHistograms, PedestalsHistograms, PedsFullNoiseHistograms, PedsOnlyHistograms, and VpspScanHistograms.

Definition at line 459 of file CommissioningHistograms.cc.

References LogTrace, and sistrip::mlDqmClient_.

Referenced by SiStripCommissioningOfflineClient::beginRun(), and createSummaryHisto().

459  {
460  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
461  << " (Derived) implementation to come...";
462 }
static const char mlDqmClient_[]
#define LogTrace(id)

◆ histogram()

TH1 * CommissioningHistograms::histogram ( const sistrip::Monitorable mon,
const sistrip::Presentation pres,
const sistrip::View view,
const std::string &  directory,
const uint32_t &  xbins,
const float &  xlow = 1. * sistrip::invalid_,
const float &  xhigh = 1. * sistrip::invalid_ 
)
protected

Definition at line 656 of file CommissioningHistograms.cc.

References bei_, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile(), sistrip::collate_, sistrip::dir_, createBeamHaloJobs::directory, extract(), sistrip::FED_ADC_RANGE, dqm::implementation::IGetter::get(), LaserClient_cfi::high, sistrip::HISTO_1D, sistrip::HISTO_2D_SCATTER, sistrip::HISTO_2D_SUM, LogTrace, hlt_dqm_clientPB-live_cfg::me, sistrip::mlDqmClient_, LaserDQM_cfi::mon, Skims_PA_cff::name, SummaryGenerator::name(), SiStripEnumsAndStrings::presentation(), sistrip::PROFILE_1D, alignCSCRings::pwd, dqm::implementation::DQMStore::pwd(), dqm::implementation::DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, edmLumisInFiles::summary, task_, sistrip::valid_, and fw3dlego::xbins.

Referenced by FedTimingHistograms::createSummaryHisto(), FedCablingHistograms::createSummaryHisto(), and createSummaryHisto().

662  {
663  // Remember pwd
664  std::string pwd = bei_->pwd();
666 
667  // Construct histogram name
669 
670  MonitorElement* me = bei_->get(bei_->pwd() + "/" + name);
671 
672  // Create summary plot
673  float high = static_cast<float>(xbins);
674  if (pres == sistrip::HISTO_1D) {
675  if (xlow < 1. * sistrip::valid_ && xhigh < 1. * sistrip::valid_) {
676  me = bei_->book1D(name, name, xbins, xlow, xhigh);
677  } else {
678  me = bei_->book1D(name, name, xbins, 0., high);
679  }
680  } else if (pres == sistrip::HISTO_2D_SUM) {
681  me = bei_->book1D(name, name, xbins, 0., high);
682  } else if (pres == sistrip::HISTO_2D_SCATTER) {
684  } else if (pres == sistrip::PROFILE_1D) {
686  } else {
687  me = nullptr;
688  edm::LogWarning(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
689  << " Unexpected presentation \"" << SiStripEnumsAndStrings::presentation(pres)
690  << "\" Unable to create summary plot!";
691  }
692 
693  // Check pointer
694  if (me) {
695  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
696  << " Created summary plot with name \"" << me->getName() << "\" in directory \""
697  << bei_->pwd() << "\"!";
698  } else {
699  edm::LogWarning(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
700  << " NULL pointer to MonitorElement!"
701  << " Unable to create summary plot!";
702  }
703 
704  // Extract root object
706  if (!summary) {
707  edm::LogWarning(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
708  << " Unable to extract root object!"
709  << " Returning NULL pointer!";
710  }
711 
712  // Return to pwd
714 
715  return summary;
716 }
static std::string name(const sistrip::RunType &, const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory)
const double xbins[]
static const char dir_[]
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:647
static const char mlDqmClient_[]
static const uint16_t FED_ADC_RANGE
std::string pwd() override
Definition: DQMStore.h:645
static const uint16_t valid_
Definition: Constants.h:17
#define LogTrace(id)
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())
Definition: DQMStore.h:399
int extract(std::vector< int > *output, const std::string &dati)
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())
Definition: DQMStore.h:212
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
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())
Definition: DQMStore.h:98
static const char collate_[]

◆ histos()

const CommissioningHistograms::HistosMap & CommissioningHistograms::histos ( ) const
inlineprotected

◆ mapping()

const CommissioningHistograms::FedToFecMap & CommissioningHistograms::mapping ( ) const
inlineprotected

Definition at line 162 of file CommissioningHistograms.h.

References mapping_.

Referenced by FastFedCablingHistograms::histoAnalysis().

162 { return mapping_; }

◆ printAnalyses()

void CommissioningHistograms::printAnalyses ( )
virtual

Reimplemented in FedCablingHistograms, CalibrationHistograms, DaqScopeModeHistograms, FastFedCablingHistograms, NoiseHistograms, OptoScanHistograms, PedestalsHistograms, PedsFullNoiseHistograms, PedsOnlyHistograms, and VpspScanHistograms.

Definition at line 466 of file CommissioningHistograms.cc.

References data(), LogTrace, sistrip::mlDqmClient_, and contentValuesCheck::ss.

Referenced by SiStripCommissioningOfflineClient::beginRun().

466  {
467  Analyses::iterator ianal = data().begin();
468  Analyses::iterator janal = data().end();
469  for (; ianal != janal; ++ianal) {
470  if (ianal->second) {
471  std::stringstream ss;
472  ianal->second->print(ss);
473  if (ianal->second->isValid()) {
474  LogTrace(mlDqmClient_) << ss.str();
475  } else {
476  edm::LogWarning(mlDqmClient_) << ss.str();
477  }
478  }
479  }
480 }
Analyses & data(bool getMaskedData=false)
static const char mlDqmClient_[]
#define LogTrace(id)
Log< level::Warning, false > LogWarning

◆ printHistosMap()

void CommissioningHistograms::printHistosMap ( )
protected

Definition at line 519 of file CommissioningHistograms.cc.

References histos_, LogTrace, sistrip::mlDqmClient_, SiStripFedKey::print(), and contentValuesCheck::ss.

519  {
520  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
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
526  << SiStripFedKey(ihistos->first) << std::endl;
527  Histos::const_iterator ihisto = ihistos->second.begin();
528  for (; ihisto != ihistos->second.end(); ihisto++) {
529  if (*ihisto) {
530  (*ihisto)->print(ss);
531  } else {
532  ss << " NULL pointer to Histo object!";
533  }
534  }
535  LogTrace(mlDqmClient_) << ss.str();
536  }
537 }
void print(std::stringstream &ss) const override
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
static const char mlDqmClient_[]
#define LogTrace(id)

◆ printSummary()

void CommissioningHistograms::printSummary ( )
virtual

Reimplemented in FastFedCablingHistograms.

Definition at line 484 of file CommissioningHistograms.cc.

References data(), caHitNtupletGeneratorKernels::good, LogTrace, and sistrip::mlDqmClient_.

Referenced by SiStripCommissioningOfflineClient::beginRun().

484  {
485  std::stringstream good;
486  std::stringstream bad;
487 
488  Analyses::iterator ianal = data().begin();
489  Analyses::iterator janal = data().end();
490  for (; ianal != janal; ++ianal) {
491  if (ianal->second) {
492  if (ianal->second->isValid()) {
493  ianal->second->summary(good);
494  } else {
495  ianal->second->summary(bad);
496  }
497  }
498  }
499 
500  if (good.str().empty()) {
501  good << "None found!";
502  }
503  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
504  << " Printing summary of good analyses:"
505  << "\n"
506  << good.str();
507 
508  if (bad.str().empty()) {
509  return;
510  } //@@ bad << "None found!"; }
511  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
512  << " Printing summary of bad analyses:"
513  << "\n"
514  << bad.str();
515 }
Analyses & data(bool getMaskedData=false)
static const char mlDqmClient_[]
#define LogTrace(id)

◆ pset()

const edm::ParameterSet & CommissioningHistograms::pset ( ) const
inlineprotected

◆ remove()

void CommissioningHistograms::remove ( std::string  pattern = "")

Definition at line 605 of file CommissioningHistograms.cc.

Referenced by SiStripCommissioningOfflineClient::beginRun().

605  {
606  // TODO: remove no longer supported in DQMStore.
607 }

◆ runNumber()

uint32_t CommissioningHistograms::runNumber ( DQMStore * const  bei,
const std::vector< std::string > &  contents 
)
static

Definition at line 94 of file CommissioningHistograms.cc.

References bei(), dqm::implementation::IBooker::bookString(), sistrip::collate_, relmon_rootfiles_spy::contents, TauDecayModes::dec, sistrip::dir_, dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getContents(), LogTrace, sistrip::mlDqmClient_, castor_dqm_sourceclient_file_cfg::path, writedatasetfile::run, sistrip::runNumber_, dqm::implementation::DQMStore::setCurrentFolder(), pickleFileParser::slash, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, and relativeConstraints::value.

Referenced by SiStripCommissioningOfflineClient::beginRun().

94  {
95  // Check if histograms present
96  if (contents.empty()) {
97  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
98  << " Found no histograms!";
99  return 0;
100  }
101 
102  // Iterate through added contents
103  std::vector<std::string>::const_iterator istr = contents.begin();
104  while (istr != contents.end()) {
105  // Extract source directory path
106  std::string source_dir = istr->substr(0, istr->find(":"));
107 
108  // Generate corresponding client path (removing trailing "/")
109  SiStripFecKey path(source_dir);
110  std::string client_dir = path.path();
111  std::string slash = client_dir.substr(client_dir.size() - 1, 1);
112  if (slash == sistrip::dir_) {
113  client_dir = client_dir.substr(0, client_dir.size() - 1);
114  }
115  client_dir = std::string(sistrip::collate_) + sistrip::dir_ + client_dir;
116 
117  // Iterate though MonitorElements from source directory
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++) {
121  if (!(*ime)) {
122  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
123  << " NULL pointer to MonitorElement!";
124  continue;
125  }
126 
127  // Search for run type in string
128  std::string title = (*ime)->getName();
130 
131  // Extract run number from string
132  if (pos != std::string::npos) {
133  std::string value = title.substr(pos + sizeof(sistrip::runNumber_), std::string::npos);
134  if (!value.empty()) {
135  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
136  << " Found string \"" << title.substr(pos, std::string::npos) << "\" with value \""
137  << value << "\"";
138  if (!(bei->get(client_dir + "/" + title.substr(pos, std::string::npos)))) {
139  bei->setCurrentFolder(client_dir);
140  bei->bookString(title.substr(pos, std::string::npos), value);
141  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
142  << " Booked string \"" << title.substr(pos, std::string::npos)
143  << "\" in directory \"" << client_dir << "\"";
144  }
145  uint32_t run;
146  std::stringstream ss;
147  ss << value;
148  ss >> std::dec >> run;
149  return run;
150  }
151  }
152  }
153 
154  istr++;
155  }
156  return 0;
157 }
static const char runNumber_[]
static const char dir_[]
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:647
static const char mlDqmClient_[]
Log< level::Error, false > LogError
uint16_t size_type
#define LogTrace(id)
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
Definition: value.py:1
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
DQMStore *const bei() const
static const char collate_[]
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:625

◆ runType()

sistrip::RunType CommissioningHistograms::runType ( DQMStore * const  bei,
const std::vector< std::string > &  contents 
)
static

Extract run type string from "added contents".

Definition at line 161 of file CommissioningHistograms.cc.

References bei(), dqm::implementation::IBooker::bookString(), sistrip::collate_, relmon_rootfiles_spy::contents, sistrip::dir_, dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getContents(), LogTrace, sistrip::mlDqmClient_, castor_dqm_sourceclient_file_cfg::path, SiStripEnumsAndStrings::runType(), dqm::implementation::DQMStore::setCurrentFolder(), pickleFileParser::slash, AlCaHLTBitMon_QueryRunRegistry::string, sistrip::taskId_, runGCPTkAlMap::title, sistrip::UNKNOWN_RUN_TYPE, and relativeConstraints::value.

Referenced by SiStripCommissioningOfflineClient::beginRun().

161  {
162  // Check if histograms present
163  if (contents.empty()) {
164  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
165  << " Found no histograms!";
167  }
168 
169  // Iterate through added contents
170  std::vector<std::string>::const_iterator istr = contents.begin();
171  while (istr != contents.end()) {
172  // Extract source directory path
173  std::string source_dir = istr->substr(0, istr->find(":"));
174 
175  // Generate corresponding client path (removing trailing "/")
176  SiStripFecKey path(source_dir);
177  std::string client_dir = path.path();
178  std::string slash = client_dir.substr(client_dir.size() - 1, 1);
179  if (slash == sistrip::dir_) {
180  client_dir = client_dir.substr(0, client_dir.size() - 1);
181  }
182  client_dir = std::string(sistrip::collate_) + sistrip::dir_ + client_dir;
183 
184  // Iterate though MonitorElements from source directory
185  std::vector<MonitorElement*> me_list = bei->getContents(source_dir);
186 
187  if (me_list.empty()) {
188  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
189  << " No MonitorElements found in dir " << source_dir;
191  }
192 
193  std::vector<MonitorElement*>::iterator ime = me_list.begin();
194  for (; ime != me_list.end(); ime++) {
195  if (!(*ime)) {
196  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
197  << " NULL pointer to MonitorElement!";
198  continue;
199  }
200 
201  // Search for run type in string
202  std::string title = (*ime)->getName();
204 
205  // Extract commissioning task from string
206  if (pos != std::string::npos) {
207  std::string value = title.substr(pos + sizeof(sistrip::taskId_), std::string::npos);
208  if (!value.empty()) {
209  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
210  << " Found string \"" << title.substr(pos, std::string::npos) << "\" with value \""
211  << value << "\"";
212  if (!(bei->get(client_dir + sistrip::dir_ + title.substr(pos, std::string::npos)))) {
213  bei->setCurrentFolder(client_dir);
214  bei->bookString(title.substr(pos, std::string::npos), value);
215  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
216  << " Booked string \"" << title.substr(pos, std::string::npos)
217  << "\" in directory \"" << client_dir << "\"";
218  }
220  }
221  }
222  }
223 
224  istr++;
225  }
226 
227  edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
228  << " Unable to extract RunType!";
230 }
static const char dir_[]
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:647
static const char mlDqmClient_[]
Log< level::Error, false > LogError
uint16_t size_type
#define LogTrace(id)
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
static std::string runType(const sistrip::RunType &)
static const char taskId_[]
Definition: value.py:1
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
DQMStore *const bei() const
static const char collate_[]
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:625

◆ save()

void CommissioningHistograms::save ( std::string &  filename,
uint32_t  run_number = 0,
std::string  partitionName = "" 
)

Definition at line 611 of file CommissioningHistograms.cc.

References bei_, sistrip::collate_, DeadROC_duringRun::dir, sistrip::dqmClientFileName_, LogTrace, sistrip::mlDqmClient_, FrameHeaderEvents_cfi::partitionName, castor_dqm_sourceclient_file_cfg::path, contentValuesCheck::run_number, dqm::implementation::DQMStore::save(), contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripCommissioningOfflineClient::beginRun().

611  {
612  // Construct path and filename
613  std::stringstream ss;
614 
615  if (!path.empty()) {
616  ss << path;
617  if (ss.str().find(".root") == std::string::npos) {
618  ss << ".root";
619  }
620 
621  } else {
622  // Retrieve SCRATCH directory
623  std::string scratch = "SCRATCH";
624  std::string dir = "";
625  if (std::getenv(scratch.c_str()) != nullptr) {
626  dir = std::getenv(scratch.c_str());
627  }
628 
629  // Add directory path
630  if (!dir.empty()) {
631  ss << dir << "/";
632  } else {
633  ss << "/tmp/";
634  }
635 
636  // Add filename with run number and ".root" extension
637  if (partitionName.empty())
638  ss << sistrip::dqmClientFileName_ << "_" << std::setfill('0') << std::setw(8) << run_number << ".root";
639  else
640  ss << sistrip::dqmClientFileName_ << "_" << partitionName << "_" << std::setfill('0') << std::setw(8)
641  << run_number << ".root";
642  }
643 
644  // Save file with appropriate filename
645  LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
646  << " Saving histograms to root file"
647  << " (This may take some time!)";
648  path = ss.str();
650  edm::LogVerbatim(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]"
651  << " Saved histograms to root file \"" << ss.str() << "\"!";
652 }
Log< level::Info, true > LogVerbatim
static const char dqmClientFileName_[]
static const char mlDqmClient_[]
#define LogTrace(id)
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:824
static const char collate_[]

◆ task()

const sistrip::RunType & CommissioningHistograms::task ( ) const
inlineprotected

Member Data Documentation

◆ bei_

DQMStore* CommissioningHistograms::bei_
private

◆ ccuVector_

std::vector<uint32_t> CommissioningHistograms::ccuVector_
private

Definition at line 148 of file CommissioningHistograms.h.

Referenced by data().

◆ data_

Analyses CommissioningHistograms::data_
private

Definition at line 136 of file CommissioningHistograms.h.

Referenced by data().

◆ dataWithMask_

Analyses CommissioningHistograms::dataWithMask_
private

Definition at line 152 of file CommissioningHistograms.h.

Referenced by data().

◆ dataWithMaskCached_

bool CommissioningHistograms::dataWithMaskCached_
private

Definition at line 153 of file CommissioningHistograms.h.

Referenced by data().

◆ factory_

std::unique_ptr<Factory> CommissioningHistograms::factory_
protected

◆ fecMaskVector_

std::vector<uint32_t> CommissioningHistograms::fecMaskVector_
private

Definition at line 146 of file CommissioningHistograms.h.

Referenced by data().

◆ fedMaskVector_

std::vector<uint32_t> CommissioningHistograms::fedMaskVector_
private

Definition at line 145 of file CommissioningHistograms.h.

Referenced by data().

◆ histos_

HistosMap CommissioningHistograms::histos_
private

◆ i2cChanVector_

std::vector<uint32_t> CommissioningHistograms::i2cChanVector_
private

Definition at line 149 of file CommissioningHistograms.h.

Referenced by data().

◆ lldChanVector_

std::vector<uint32_t> CommissioningHistograms::lldChanVector_
private

Definition at line 150 of file CommissioningHistograms.h.

Referenced by data().

◆ mapping_

FedToFecMap CommissioningHistograms::mapping_
private

Definition at line 140 of file CommissioningHistograms.h.

Referenced by extractHistograms(), and mapping().

◆ mask_

bool CommissioningHistograms::mask_
private

Definition at line 144 of file CommissioningHistograms.h.

Referenced by data().

◆ pset_

edm::ParameterSet CommissioningHistograms::pset_
private

Definition at line 142 of file CommissioningHistograms.h.

Referenced by pset().

◆ ringVector_

std::vector<uint32_t> CommissioningHistograms::ringVector_
private

Definition at line 147 of file CommissioningHistograms.h.

Referenced by data().

◆ task_

sistrip::RunType CommissioningHistograms::task_
private

Definition at line 132 of file CommissioningHistograms.h.

Referenced by histogram(), and task().