CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
SiStripCommissioningOfflineClient Class Reference

Class which reads a root file containing "commissioning histograms", analyzes the histograms to extract "monitorables", and creates summary histograms. More...

#include <SiStripCommissioningOfflineClient.h>

Inheritance diagram for SiStripCommissioningOfflineClient:
edm::EDAnalyzer edm::EDConsumerBase SiStripCommissioningOfflineDbClient

Public Types

typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void endJob () override
 
 SiStripCommissioningOfflineClient (const edm::ParameterSet &)
 
 ~SiStripCommissioningOfflineClient () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Types

typedef std::vector< TH1 * > Histos
 
typedef std::map< uint32_t, HistosHistosMap
 

Protected Member Functions

virtual void createHistos (const edm::ParameterSet &, const edm::EventSetup &)
 
virtual void setInputFiles (std::vector< std::string > &, const std::string, const std::string, uint32_t, bool)
 
virtual void uploadToConfigDb ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Protected Attributes

bool analyzeHistos_
 
DQMStorebei_
 
bool clientHistos_
 
bool collateHistos_
 
bool createSummaryPlots_
 
CommissioningHistogramshistos_
 
std::vector< std::string > inputFiles_
 
HistosMap map_
 
std::string outputFileName_
 
edm::ParameterSet parameters_
 
std::string partitionName_
 
std::vector< SummaryPlotplots_
 
uint32_t runNumber_
 
sistrip::RunType runType_
 
bool uploadToDb_
 
std::string xmlFile_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Detailed Description

Class which reads a root file containing "commissioning histograms", analyzes the histograms to extract "monitorables", and creates summary histograms.

Author
M.Wingham, R.Bainbridge

Definition at line 29 of file SiStripCommissioningOfflineClient.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 32 of file SiStripCommissioningOfflineClient.h.

◆ Histos

typedef std::vector<TH1*> SiStripCommissioningOfflineClient::Histos
protected

Definition at line 87 of file SiStripCommissioningOfflineClient.h.

◆ HistosMap

typedef std::map<uint32_t, Histos> SiStripCommissioningOfflineClient::HistosMap
protected

Definition at line 90 of file SiStripCommissioningOfflineClient.h.

◆ MonitorElement

Definition at line 31 of file SiStripCommissioningOfflineClient.h.

Constructor & Destructor Documentation

◆ SiStripCommissioningOfflineClient()

SiStripCommissioningOfflineClient::SiStripCommissioningOfflineClient ( const edm::ParameterSet pset)

Definition at line 36 of file SiStripCommissioningOfflineClient.cc.

38  histos_(nullptr),
39  //inputFiles_( pset.getUntrackedParameter< std::vector<std::string> >( "InputRootFiles", std::vector<std::string>() ) ),
40  outputFileName_(pset.getUntrackedParameter<std::string>("OutputRootFile", "")),
41  collateHistos_(!pset.getUntrackedParameter<bool>("UseClientFile", false)),
42  analyzeHistos_(pset.getUntrackedParameter<bool>("AnalyzeHistos", true)),
43  xmlFile_((pset.getUntrackedParameter<edm::FileInPath>("SummaryXmlFile", edm::FileInPath())).fullPath()),
44  createSummaryPlots_(false),
45  clientHistos_(false),
46  uploadToDb_(false),
48  runNumber_(0),
49  partitionName_(pset.existsAs<std::string>("PartitionName") ? pset.getParameter<std::string>("PartitionName")
50  : ""),
51  map_(),
52  plots_(),
53  parameters_(pset) {
54  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
55  << " Constructing object...";
57  pset.getUntrackedParameter<std::string>("FilePath"),
58  pset.existsAs<std::string>("PartitionName") ? pset.getParameter<std::string>("PartitionName") : "",
59  pset.getUntrackedParameter<uint32_t>("RunNumber"),
61 }

References collateHistos_, inputFiles_, LogTrace, sistrip::mlDqmClient_, muonDTDigis_cfi::pset, setInputFiles(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~SiStripCommissioningOfflineClient()

SiStripCommissioningOfflineClient::~SiStripCommissioningOfflineClient ( )
override

Definition at line 65 of file SiStripCommissioningOfflineClient.cc.

65  {
66  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
67  << " Destructing object...";
68 }

References LogTrace, and sistrip::mlDqmClient_.

Member Function Documentation

◆ analyze()

void SiStripCommissioningOfflineClient::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 344 of file SiStripCommissioningOfflineClient.cc.

344  {
345  if (!(event.id().event() % 10)) {
346  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
347  << " Empty event loop! User can kill job...";
348  }
349 }

References LogTrace, and sistrip::mlDqmClient_.

◆ beginRun()

void SiStripCommissioningOfflineClient::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 72 of file SiStripCommissioningOfflineClient.cc.

72  {
73  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
74  << " Analyzing root file(s)...";
75 
76  // Check for null pointer
77  if (!bei_) {
78  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
79  << " NULL pointer to DQMStore!"
80  << " Aborting...";
81  return;
82  }
83 
84  // Check if .root file can be opened
85  std::vector<std::string>::const_iterator ifile = inputFiles_.begin();
86  for (; ifile != inputFiles_.end(); ifile++) {
87  std::ifstream root_file;
88  root_file.open(ifile->c_str());
89  if (!root_file.is_open()) {
90  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
91  << " The input root file \"" << *ifile << "\" could not be opened!"
92  << " Please check the path and filename!";
93  } else {
94  root_file.close();
96  if (found != std::string::npos && clientHistos_) {
97  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
98  << " The input root files appear to be a mixture"
99  << " of \"Source\" and \"Client\" files!"
100  << " Aborting...";
101  return;
102  }
103  if (found != std::string::npos && inputFiles_.size() != 1) {
104  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
105  << " There appear to be multiple input \"Client\" root files!"
106  << " Aborting...";
107  return;
108  }
109  if (found != std::string::npos) {
110  clientHistos_ = true;
111  }
112  }
113  }
114  if (clientHistos_ && inputFiles_.size() == 1) {
115  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
116  << " Collated histograms found in input root file \"" << inputFiles_[0] << "\"";
117  }
118 
119  // Check if .xml file can be opened
120  if (!xmlFile_.empty()) {
121  std::ifstream xml_file;
122  xml_file.open(xmlFile_.c_str());
123  if (!xml_file.is_open()) {
124  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
125  << " The SummaryPlot XML file \"" << xmlFile_ << "\" could not be opened!"
126  << " Please check the path and filename!"
127  << " Aborting...";
128  return;
129  } else {
130  createSummaryPlots_ = true;
131  xml_file.close();
132  }
133  }
134 
135  // Open root file(s) and create ME's
136  if (inputFiles_.empty()) {
137  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
138  << " No input root files specified!";
139  return;
140  }
141 
142  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
143  << " Opening root files. This may take some time!...";
144  std::vector<std::string>::const_iterator jfile = inputFiles_.begin();
145  for (; jfile != inputFiles_.end(); jfile++) {
146  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
147  << " Opening root file \"" << *jfile << "\"... (This may take some time.)";
148  if (clientHistos_) {
149  bei_->open(*jfile, false, sistrip::collate_, "");
150  } else {
151  bei_->open(*jfile, false, "SiStrip", sistrip::collate_);
152  }
153  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
154  << " Opened root file \"" << *jfile << "\"!";
155  }
156  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
157  << " Opened " << inputFiles_.size() << " root files!";
158 
159  // Retrieve list of histograms
160  auto allmes = bei_->getAllContents("");
161  std::vector<std::string> contents;
162 
163  // If using client file, remove "source" histograms from list
164  if (clientHistos_) {
165  std::set<std::string> temp;
166  for (auto me : allmes) {
167  const auto& name = me->getPathname();
168  if (name.find(sistrip::collate_) != std::string::npos) {
169  temp.insert(name);
170  }
171  }
172  contents.clear();
173  for (auto s : temp) {
174  // the old code expects a ":", but does not really need the ME names
175  contents.push_back(s + ":");
176  }
177  }
178 
179  // Some debug
180  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
181  << " Found " << contents.size() << " directories containing MonitorElements";
182 
183  // Some more debug
184  if (false) {
185  std::stringstream ss;
186  ss << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
187  << " Directories found: " << std::endl;
188  std::vector<std::string>::iterator istr = contents.begin();
189  for (; istr != contents.end(); istr++) {
190  ss << " " << *istr << std::endl;
191  }
192  LogTrace(mlDqmClient_) << ss.str();
193  }
194 
195  // Extract run type from contents
197 
198  // Extract run number from contents
200 
201  // Copy custom information to the collated structure
203 
204  // Check runType
206  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
207  << " Unknown commissioning runType: " << SiStripEnumsAndStrings::runType(runType_)
208  << " and run number is " << runNumber_;
209  return;
210  } else {
211  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
212  << " Run type is " << SiStripEnumsAndStrings::runType(runType_)
213  << " and run number is " << runNumber_;
214  }
215 
216  // Open and parse "summary plot" xml file
217  if (createSummaryPlots_) {
218  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
219  << " Parsing summary plot XML file...";
220  SummaryPlotXmlParser xml_file;
221  xml_file.parseXML(xmlFile_);
222  plots_ = xml_file.summaryPlots(runType_);
223  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
224  << " Parsed summary plot XML file and found " << plots_.size() << " plots defined!";
225  } else {
226  edm::LogWarning(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
227  << " Null string for SummaryPlotXmlFile!"
228  << " No summary plots will be created!";
229  }
230 
231  // Some debug
232  std::stringstream ss;
233  ss << "[SiStripCommissioningOfflineClient::" << __func__ << "]" << std::endl << " Input root files : ";
234  if (inputFiles_.empty()) {
235  ss << "(none)";
236  } else {
237  std::vector<std::string>::const_iterator ifile = inputFiles_.begin();
238  for (; ifile != inputFiles_.end(); ifile++) {
239  if (ifile != inputFiles_.begin()) {
240  ss << std::setw(25) << std::setfill(' ') << ": ";
241  }
242  ss << "\"" << *ifile << "\"" << std::endl;
243  }
244  }
245  ss << " Run type : \"" << SiStripEnumsAndStrings::runType(runType_) << "\"" << std::endl
246  << " Run number : " << runNumber_ << std::endl
247  << " Summary plot XML file : ";
248  if (xmlFile_.empty()) {
249  ss << "(none)";
250  } else {
251  ss << "\"" << xmlFile_ << "\"";
252  }
253  edm::LogVerbatim(mlDqmClient_) << ss.str();
254 
255  // Virtual method that creates CommissioningHistogram object
256  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
257  << " Creating CommissioningHistogram object...";
259  if (histos_) {
260  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
261  << " Created CommissioningHistogram object!";
262  } else {
263  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
264  << " NULL pointer to CommissioningHistogram object!"
265  << " Aborting...";
266  return;
267  }
268 
269  // Perform collation
270  if (histos_) {
272  }
273 
274  // Perform analysis
275  if (analyzeHistos_) {
276  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
277  << " Analyzing histograms...";
278  if (histos_) {
279  histos_->histoAnalysis(true);
280  }
281  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
282  << " Analyzed histograms!";
283  } else {
284  edm::LogWarning(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
285  << " No histogram analysis performed!";
286  }
287 
288  // Create summary plots
289  if (createSummaryPlots_) {
290  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
291  << " Generating summary plots...";
292  std::vector<SummaryPlot>::const_iterator iplot = plots_.begin();
293  for (; iplot != plots_.end(); iplot++) {
294  if (histos_) {
295  histos_->createSummaryHisto(iplot->monitorable(), iplot->presentation(), iplot->level(), iplot->granularity());
296  }
297  }
298  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
299  << " Generated summary plots!";
300  } else {
301  edm::LogWarning(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
302  << " No summary plots generated!";
303  }
304 
305  // Save client root file
306  if (histos_) {
307  bool save = parameters_.getUntrackedParameter<bool>("SaveClientFile", true);
308  if (save) {
312  else
314  } else {
315  CalibrationHistograms* histo = dynamic_cast<CalibrationHistograms*>(histos_);
317  }
318  } else {
319  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
320  << " Client file not saved!";
321  }
322  }
323 
324  // Virtual method to trigger the database upload
326 
327  // Print analyses
328  if (histos_) {
331  }
332 
333  // Remove all ME/CME objects
334  if (histos_) {
335  histos_->remove();
336  }
337 
338  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
339  << " Finished analyzing root file(s)...";
340 }

References analyzeHistos_, bei_, sistrip::CALIBRATION_SCAN, sistrip::CALIBRATION_SCAN_DECO, clientHistos_, sistrip::collate_, relmon_rootfiles_spy::contents, CommissioningHistograms::copyCustomInformation(), createHistos(), CommissioningHistograms::createSummaryHisto(), createSummaryPlots_, sistrip::DAQ_SCOPE_MODE, sistrip::dqmClientFileName_, CommissioningHistograms::extractHistograms(), newFWLiteAna::found, dqm::implementation::IGetter::getAllContents(), edm::ParameterSet::getUntrackedParameter(), timingPdfMaker::histo, CommissioningHistograms::histoAnalysis(), histos_, compare_using_db::ifile, inputFiles_, looper::jfile, LogTrace, hlt_dqm_clientPB-live_cfg::me, sistrip::mlDqmClient_, Skims_PA_cff::name, dqm::implementation::DQMStore::open(), outputFileName_, parameters_, SummaryPlotXmlParser::parseXML(), partitionName_, plots_, CommissioningHistograms::printAnalyses(), CommissioningHistograms::printSummary(), CommissioningHistograms::remove(), CommissioningHistograms::runNumber(), runNumber_, SiStripEnumsAndStrings::runType(), CommissioningHistograms::runType(), runType_, alignCSCRings::s, CommissioningHistograms::save(), cuy::save, singleTopDQM_cfi::setup, contentValuesCheck::ss, SummaryPlotXmlParser::summaryPlots(), groupFilesInBlocks::temp, sistrip::UNKNOWN_RUN_TYPE, uploadToConfigDb(), and xmlFile_.

◆ createHistos()

void SiStripCommissioningOfflineClient::createHistos ( const edm::ParameterSet pset,
const edm::EventSetup setup 
)
protectedvirtual

Reimplemented in SiStripCommissioningOfflineDbClient.

Definition at line 357 of file SiStripCommissioningOfflineClient.cc.

357  {
358  // Check pointer
359  if (histos_) {
360  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
361  << " CommissioningHistogram object already exists!"
362  << " Aborting...";
363  return;
364  }
365 
366  // Check pointer to BEI
367  if (!bei_) {
368  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
369  << " NULL pointer to DQMStore!";
370  return;
371  }
372 
373  // Create "commissioning histograms" object
376  } else if (runType_ == sistrip::FED_CABLING) {
378  } else if (runType_ == sistrip::APV_TIMING) {
380  } else if (runType_ == sistrip::OPTO_SCAN) {
382  } else if (runType_ == sistrip::VPSP_SCAN) {
384  } else if (runType_ == sistrip::PEDESTALS) {
386  } else if (runType_ == sistrip::PEDS_FULL_NOISE) {
388  } else if (runType_ == sistrip::PEDS_ONLY) {
390  } else if (runType_ == sistrip::NOISE) {
397  } else if (runType_ == sistrip::DAQ_SCOPE_MODE) {
399  } else if (runType_ == sistrip::UNDEFINED_RUN_TYPE) {
400  histos_ = nullptr;
401  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
402  << " Undefined run type!";
403  return;
404  } else if (runType_ == sistrip::UNKNOWN_RUN_TYPE) {
405  histos_ = nullptr;
406  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
407  << " Unknown run type!";
408  return;
409  }
411 }

References sistrip::APV_LATENCY, sistrip::APV_TIMING, bei_, sistrip::CALIBRATION, sistrip::CALIBRATION_DECO, sistrip::CALIBRATION_SCAN, sistrip::CALIBRATION_SCAN_DECO, CommissioningHistograms::configure(), sistrip::DAQ_SCOPE_MODE, sistrip::FAST_CABLING, sistrip::FED_CABLING, sistrip::FINE_DELAY, histos_, sistrip::mlDqmClient_, sistrip::NOISE, sistrip::OPTO_SCAN, sistrip::PEDESTALS, sistrip::PEDS_FULL_NOISE, sistrip::PEDS_ONLY, muonDTDigis_cfi::pset, runType_, singleTopDQM_cfi::setup, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, and sistrip::VPSP_SCAN.

Referenced by beginRun().

◆ endJob()

void SiStripCommissioningOfflineClient::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 353 of file SiStripCommissioningOfflineClient.cc.

353 {}

◆ setInputFiles()

void SiStripCommissioningOfflineClient::setInputFiles ( std::vector< std::string > &  files,
const std::string  path,
const std::string  partitionName,
uint32_t  run_number,
bool  collate_histos 
)
protectedvirtual

Definition at line 415 of file SiStripCommissioningOfflineClient.cc.

419  {
420  std::string runStr;
421  std::stringstream ss;
422  ss << std::setfill('0') << std::setw(8) << run_number;
423  runStr = ss.str();
424 
425  std::string nameStr = "";
426  if (!collate_histos) {
427  nameStr = "SiStripCommissioningClient_";
428  } else {
429  nameStr = "SiStripCommissioningSource_";
430  }
431 
432  LogTrace("TEST") << " runStr " << runStr;
433 
434  // Open directory
435  DIR* dp;
436  struct dirent* dirp;
437  if ((dp = opendir(path.c_str())) == nullptr) {
438  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
439  << " Error locating directory \"" << path << "\". No such directory!";
440  return;
441  }
442 
443  // Find compatible files
444  while ((dirp = readdir(dp)) != nullptr) {
445  std::string fileName(dirp->d_name);
446  bool goodName = (fileName.find(nameStr) != std::string::npos);
447  bool goodRun = (fileName.find(runStr) != std::string::npos);
448  bool rootFile = (fileName.find(".root") != std::string::npos);
449  bool goodPartition = true;
450  if (not partitionName.empty()) {
451  goodPartition = (fileName.find(partitionName) != std::string::npos);
452  }
453 
454  //bool rootFile = ( fileName.rfind(".root",5) == fileName.size()-5 );
455  if (goodName && goodRun && rootFile && goodPartition) {
457  entry += "/";
458  entry += fileName;
459  files.push_back(entry);
460  }
461  }
462  closedir(dp);
463 
464  // Some debug
465  if (!collate_histos && files.size() > 1) {
466  std::stringstream ss;
467  ss << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
468  << " Found more than one client file!";
469  std::vector<std::string>::const_iterator ifile = files.begin();
470  std::vector<std::string>::const_iterator jfile = files.end();
471  for (; ifile != jfile; ++ifile) {
472  ss << std::endl << *ifile;
473  }
474  edm::LogError(mlDqmClient_) << ss.str();
475  } else if (files.empty()) {
476  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineClient::" << __func__ << "]"
477  << " No input files found!";
478  }
479 }

References dqmPostProcessing_online::DIR, Calorimetry_cff::dp, mps_splice::entry, MillePedeFileConverter_cfg::fileName, MainPageGenerator::files, compare_using_db::ifile, looper::jfile, LogTrace, sistrip::mlDqmClient_, FrameHeaderEvents_cfi::partitionName, castor_dqm_sourceclient_file_cfg::path, indexGen::rootFile, contentValuesCheck::run_number, contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripCommissioningOfflineClient().

◆ uploadToConfigDb()

virtual void SiStripCommissioningOfflineClient::uploadToConfigDb ( )
inlineprotectedvirtual

Reimplemented in SiStripCommissioningOfflineDbClient.

Definition at line 43 of file SiStripCommissioningOfflineClient.h.

43 { ; }

Referenced by beginRun().

Member Data Documentation

◆ analyzeHistos_

bool SiStripCommissioningOfflineClient::analyzeHistos_
protected

Definition at line 63 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun().

◆ bei_

DQMStore* SiStripCommissioningOfflineClient::bei_
protected

◆ clientHistos_

bool SiStripCommissioningOfflineClient::clientHistos_
protected

Definition at line 72 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun().

◆ collateHistos_

bool SiStripCommissioningOfflineClient::collateHistos_
protected

◆ createSummaryPlots_

bool SiStripCommissioningOfflineClient::createSummaryPlots_
protected

Flag.

Definition at line 69 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun().

◆ histos_

CommissioningHistograms* SiStripCommissioningOfflineClient::histos_
protected

◆ inputFiles_

std::vector<std::string> SiStripCommissioningOfflineClient::inputFiles_
protected

Input .root file.

Definition at line 54 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun(), and SiStripCommissioningOfflineClient().

◆ map_

HistosMap SiStripCommissioningOfflineClient::map_
protected

Map containing commissioning histograms.

Definition at line 93 of file SiStripCommissioningOfflineClient.h.

◆ outputFileName_

std::string SiStripCommissioningOfflineClient::outputFileName_
protected

Output .root file.

Definition at line 57 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun().

◆ parameters_

edm::ParameterSet SiStripCommissioningOfflineClient::parameters_
protected

◆ partitionName_

std::string SiStripCommissioningOfflineClient::partitionName_
protected

Partition Name

Definition at line 84 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun().

◆ plots_

std::vector<SummaryPlot> SiStripCommissioningOfflineClient::plots_
protected

SummaryPlot objects.

Definition at line 96 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun().

◆ runNumber_

uint32_t SiStripCommissioningOfflineClient::runNumber_
protected

Run number.

Definition at line 81 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun().

◆ runType_

sistrip::RunType SiStripCommissioningOfflineClient::runType_
protected

Commissioning runType.

Definition at line 78 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun(), SiStripCommissioningOfflineDbClient::createHistos(), and createHistos().

◆ uploadToDb_

bool SiStripCommissioningOfflineClient::uploadToDb_
protected

Definition at line 75 of file SiStripCommissioningOfflineClient.h.

◆ xmlFile_

std::string SiStripCommissioningOfflineClient::xmlFile_
protected

Input .xml file.

Definition at line 66 of file SiStripCommissioningOfflineClient.h.

Referenced by beginRun().

sistrip::CALIBRATION_SCAN
Definition: ConstantsForRunType.h:87
SiStripEnumsAndStrings::runType
static std::string runType(const sistrip::RunType &)
Definition: SiStripEnumsAndStrings.cc:39
NoiseHistograms
Definition: NoiseHistograms.h:7
dqmPostProcessing_online.DIR
DIR
Definition: dqmPostProcessing_online.py:10
sistrip::DAQ_SCOPE_MODE
Definition: ConstantsForRunType.h:83
CommissioningHistograms::createSummaryHisto
virtual void createSummaryHisto(const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &)
Definition: CommissioningHistograms.cc:559
sistrip::CALIBRATION
Definition: ConstantsForRunType.h:73
sistrip::PEDS_FULL_NOISE
Definition: ConstantsForRunType.h:92
sistrip::VPSP_SCAN
Definition: ConstantsForRunType.h:82
sistrip::FAST_CABLING
Definition: ConstantsForRunType.h:89
PedestalsHistograms
Definition: PedestalsHistograms.h:7
ApvTimingHistograms
Definition: ApvTimingHistograms.h:7
sistrip::APV_TIMING
Definition: ConstantsForRunType.h:75
CalibrationHistograms
Definition: CalibrationHistograms.h:7
SiStripCommissioningOfflineClient::runType_
sistrip::RunType runType_
Definition: SiStripCommissioningOfflineClient.h:78
mps_splice.entry
entry
Definition: mps_splice.py:68
CommissioningHistograms::remove
void remove(std::string pattern="")
Definition: CommissioningHistograms.cc:605
CommissioningHistograms::extractHistograms
void extractHistograms(const std::vector< std::string > &)
Definition: CommissioningHistograms.cc:297
sistrip::OPTO_SCAN
Definition: ConstantsForRunType.h:74
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
VpspScanHistograms
Definition: VpspScanHistograms.h:7
contentValuesCheck.run_number
run_number
Definition: contentValuesCheck.py:38
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
sistrip::dqmClientFileName_
static const char dqmClientFileName_[]
Definition: ConstantsForDqm.h:26
SiStripCommissioningOfflineClient::uploadToDb_
bool uploadToDb_
Definition: SiStripCommissioningOfflineClient.h:75
dqm::implementation::IGetter::getAllContents
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
Definition: DQMStore.cc:609
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
sistrip::mlDqmClient_
static const char mlDqmClient_[]
Definition: ConstantsForLogger.h:19
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
SiStripCommissioningOfflineClient::analyzeHistos_
bool analyzeHistos_
Definition: SiStripCommissioningOfflineClient.h:63
SiStripCommissioningOfflineClient::inputFiles_
std::vector< std::string > inputFiles_
Definition: SiStripCommissioningOfflineClient.h:54
Utilities.operator
operator
Definition: Utilities.py:24
SamplingHistograms
Definition: SamplingHistograms.h:9
SiStripCommissioningOfflineClient::histos_
CommissioningHistograms * histos_
Definition: SiStripCommissioningOfflineClient.h:51
sistrip::FINE_DELAY
Definition: ConstantsForRunType.h:85
relmon_rootfiles_spy.contents
contents
Definition: relmon_rootfiles_spy.py:129
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
edm::FileInPath
Definition: FileInPath.h:64
SiStripCommissioningOfflineClient::outputFileName_
std::string outputFileName_
Definition: SiStripCommissioningOfflineClient.h:57
alignCSCRings.s
s
Definition: alignCSCRings.py:92
looper.jfile
jfile
Definition: looper.py:282
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
sistrip::FED_CABLING
Definition: ConstantsForRunType.h:81
SiStripCommissioningOfflineClient::setInputFiles
virtual void setInputFiles(std::vector< std::string > &, const std::string, const std::string, uint32_t, bool)
Definition: SiStripCommissioningOfflineClient.cc:415
MainPageGenerator.files
files
Definition: MainPageGenerator.py:256
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:157
SiStripCommissioningOfflineClient::createHistos
virtual void createHistos(const edm::ParameterSet &, const edm::EventSetup &)
Definition: SiStripCommissioningOfflineClient.cc:357
CommissioningHistograms::runNumber
static uint32_t runNumber(DQMStore *const, const std::vector< std::string > &)
Definition: CommissioningHistograms.cc:94
indexGen.rootFile
rootFile
Definition: indexGen.py:92
compare_using_db.ifile
ifile
Definition: compare_using_db.py:251
SiStripCommissioningOfflineClient::createSummaryPlots_
bool createSummaryPlots_
Definition: SiStripCommissioningOfflineClient.h:69
FastFedCablingHistograms
Definition: FastFedCablingHistograms.h:7
CommissioningHistograms::configure
virtual void configure(const edm::ParameterSet &, const edm::EventSetup &)
Definition: CommissioningHistograms.h:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripCommissioningOfflineClient::partitionName_
std::string partitionName_
Definition: SiStripCommissioningOfflineClient.h:84
edm::LogWarning
Definition: MessageLogger.h:141
DaqScopeModeHistograms
Definition: DaqScopeModeHistograms.h:7
sistrip::CALIBRATION_DECO
Definition: ConstantsForRunType.h:93
edm::LogError
Definition: MessageLogger.h:183
CommissioningHistograms::printSummary
virtual void printSummary()
Definition: CommissioningHistograms.cc:484
SiStripCommissioningOfflineClient::plots_
std::vector< SummaryPlot > plots_
Definition: SiStripCommissioningOfflineClient.h:96
sistrip::PEDESTALS
Definition: ConstantsForRunType.h:72
sistrip::UNKNOWN_RUN_TYPE
Definition: ConstantsForRunType.h:94
edm::Service
Definition: Service.h:30
FrameHeaderEvents_cfi.partitionName
partitionName
Definition: FrameHeaderEvents_cfi.py:5
OptoScanHistograms
Definition: OptoScanHistograms.h:7
edm::LogVerbatim
Definition: MessageLogger.h:297
sistrip::PEDS_ONLY
Definition: ConstantsForRunType.h:90
SummaryPlotXmlParser
Parses the "summary plot" xml configuration file.
Definition: SummaryPlotXmlParser.h:26
SiStripCommissioningOfflineClient::runNumber_
uint32_t runNumber_
Definition: SiStripCommissioningOfflineClient.h:81
CommissioningHistograms::runType
static sistrip::RunType runType(DQMStore *const, const std::vector< std::string > &)
Definition: CommissioningHistograms.cc:161
SiStripCommissioningOfflineClient::map_
HistosMap map_
Definition: SiStripCommissioningOfflineClient.h:93
sistrip::CALIBRATION_SCAN_DECO
Definition: ConstantsForRunType.h:88
sistrip::collate_
static const char collate_[]
Definition: ConstantsForDqm.h:29
sistrip::APV_LATENCY
Definition: ConstantsForRunType.h:76
sistrip::UNDEFINED_RUN_TYPE
Definition: ConstantsForRunType.h:95
CommissioningHistograms::save
void save(std::string &filename, uint32_t run_number=0, std::string partitionName="")
Definition: CommissioningHistograms.cc:611
PedsFullNoiseHistograms
Definition: PedsFullNoiseHistograms.h:7
SiStripCommissioningOfflineClient::collateHistos_
bool collateHistos_
Definition: SiStripCommissioningOfflineClient.h:60
sistrip::NOISE
Definition: ConstantsForRunType.h:91
SummaryPlotXmlParser::parseXML
void parseXML(const std::string &xml_file)
Definition: SummaryPlotXmlParser.cc:41
CommissioningHistograms::histoAnalysis
virtual void histoAnalysis(bool debug)
Definition: CommissioningHistograms.cc:459
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqm::implementation::DQMStore::open
DQM_DEPRECATED bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:766
SiStripCommissioningOfflineClient::xmlFile_
std::string xmlFile_
Definition: SiStripCommissioningOfflineClient.h:66
SiStripCommissioningOfflineClient::parameters_
edm::ParameterSet parameters_
Definition: SiStripCommissioningOfflineClient.h:99
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
cuy.save
save
Definition: cuy.py:1165
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
SummaryPlotXmlParser::summaryPlots
std::vector< SummaryPlot > summaryPlots(const sistrip::RunType &)
Definition: SummaryPlotXmlParser.cc:26
event
Definition: event.py:1
SiStripCommissioningOfflineClient::uploadToConfigDb
virtual void uploadToConfigDb()
Definition: SiStripCommissioningOfflineClient.h:43
PedsOnlyHistograms
Definition: PedsOnlyHistograms.h:7
SiStripCommissioningOfflineClient::bei_
DQMStore * bei_
Definition: SiStripCommissioningOfflineClient.h:48
CommissioningHistograms::copyCustomInformation
static void copyCustomInformation(DQMStore *const, const std::vector< std::string > &)
Definition: CommissioningHistograms.cc:234
SiStripCommissioningOfflineClient::clientHistos_
bool clientHistos_
Definition: SiStripCommissioningOfflineClient.h:72
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
CommissioningHistograms::printAnalyses
virtual void printAnalyses()
Definition: CommissioningHistograms.cc:466
FedCablingHistograms
Definition: FedCablingHistograms.h:9