CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
MonitorElementData::Path Struct Reference

#include <MonitorElementCollection.h>

Public Types

enum  Type { Type::DIR, Type::DIR_AND_NAME }
 

Public Member Functions

std::string const & getDirname () const
 
std::string getFullname () const
 
std::string const & getObjectname () const
 
bool operator== (Path const &other) const
 
void set (std::string path, Path::Type type)
 

Private Attributes

std::string dirname_
 
std::string objname_
 

Detailed Description

Definition at line 162 of file MonitorElementCollection.h.

Member Enumeration Documentation

◆ Type

Enumerator
DIR 
DIR_AND_NAME 

Definition at line 169 of file MonitorElementCollection.h.

169 { DIR, DIR_AND_NAME };

Member Function Documentation

◆ getDirname()

std::string const& MonitorElementData::Path::getDirname ( ) const
inline

Definition at line 171 of file MonitorElementCollection.h.

171 { return dirname_; }

References dirname_.

Referenced by dqm::impl::MonitorElement::syncCoreObject().

◆ getFullname()

std::string MonitorElementData::Path::getFullname ( ) const
inline

Definition at line 173 of file MonitorElementCollection.h.

173 { return dirname_ + objname_; }

References dirname_, and objname_.

Referenced by dqm::impl::MonitorElement::getFullname().

◆ getObjectname()

std::string const& MonitorElementData::Path::getObjectname ( ) const
inline

Definition at line 172 of file MonitorElementCollection.h.

172 { return objname_; }

References objname_.

Referenced by dqm::impl::MonitorElement::syncCoreObject().

◆ operator==()

bool MonitorElementData::Path::operator== ( Path const &  other) const
inline

Definition at line 216 of file MonitorElementCollection.h.

216  {
217  return this->dirname_ == other.dirname_ && this->objname_ == other.objname_;
218  }

References trackingPlots::other.

◆ set()

void MonitorElementData::Path::set ( std::string  path,
Path::Type  type 
)
inline

Definition at line 181 of file MonitorElementCollection.h.

181  {
183  std::vector<std::string> buf;
184  static std::regex const dir("^/*([^/]+)");
185  std::smatch m;
186 
187  while (std::regex_search(in, m, dir)) {
188  if (m[1] == "..") {
189  if (!buf.empty()) {
190  buf.pop_back();
191  }
192  } else {
193  buf.push_back(m[1]);
194  }
195  in = m.suffix().str();
196  }
197 
198  // Construct dirname_ and object_name
199  dirname_ = "";
200  objname_ = "";
201  int numberOfItems = buf.size();
202  for (int i = 0; i < numberOfItems; i++) {
203  if (i == numberOfItems - 1) {
204  // Processing last component...
206  objname_ = buf[i];
207  } else if (type == Path::Type::DIR) {
208  dirname_ += buf[i] + "/";
209  }
210  } else {
211  dirname_ += buf[i] + "/";
212  }
213  }
214  }

References visDQMUpload::buf, DeadROC_duringRun::dir, DIR, DIR_AND_NAME, dirname_, mps_fire::i, recoMuon::in, visualization-live-secondInstance_cfg::m, objname_, castor_dqm_sourceclient_file_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ dirname_

std::string MonitorElementData::Path::dirname_
private

Definition at line 165 of file MonitorElementCollection.h.

Referenced by getDirname(), getFullname(), and set().

◆ objname_

std::string MonitorElementData::Path::objname_
private

Definition at line 166 of file MonitorElementCollection.h.

Referenced by getFullname(), getObjectname(), and set().

dqmPostProcessing_online.DIR
DIR
Definition: dqmPostProcessing_online.py:10
MonitorElementData::Path::dirname_
std::string dirname_
Definition: MonitorElementCollection.h:165
mps_fire.i
i
Definition: mps_fire.py:428
MonitorElementData::Path::Type::DIR_AND_NAME
MonitorElementData::Path::Type::DIR
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
trackingPlots.other
other
Definition: trackingPlots.py:1467
MonitorElementData::Path::objname_
std::string objname_
Definition: MonitorElementCollection.h:166
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
recoMuon::in
Definition: RecoMuonEnumerators.h:6
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23