Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLTrigger/Timer: add function FastTimerService::fix_for_dqm which replaces check for illegal dqm characters for path so it can be used on paths and labels. #38963

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions HLTrigger/Timer/plugins/FastTimerService.cc
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ void FastTimerService::PlotsPerJob::book(dqm::reco::DQMStore::IBooker& booker,
if (bymodule) {
booker.setCurrentFolder(basedir + "/process " + process.name_ + " modules");
for (unsigned int id : process.modules_) {
auto const& module_name = job.module(id).moduleLabel();
auto const& module_name = fix_for_dqm(job.module(id).moduleLabel());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fwyzard The change is here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I guess I missed it !

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I force pushed the formatting update. Sometimes github does not register force pushed changes.

modules_[id].book(booker, module_name, module_name, module_ranges, lumisections, byls);
}
booker.setCurrentFolder(basedir);
Expand Down Expand Up @@ -942,6 +942,16 @@ void FastTimerService::postGlobalBeginRun(edm::GlobalContext const& gc) { ignore

void FastTimerService::preStreamBeginRun(edm::StreamContext const& sc) { ignoredSignal(__func__); }

std::string FastTimerService::fix_for_dqm(std::string input) {
// clean characters that are deemed unsafe for DQM
// see the definition of `s_safe` in DQMServices/Core/src/DQMStore.cc
auto safe_for_dqm = "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+=_()# "s;
for (auto& c : input)
if (safe_for_dqm.find(c) == std::string::npos)
c = '_';
return input;
}

void FastTimerService::preallocate(edm::service::SystemBounds const& bounds) {
concurrent_lumis_ = bounds.maxNumberOfConcurrentLuminosityBlocks();
concurrent_runs_ = bounds.maxNumberOfConcurrentRuns();
Expand All @@ -952,12 +962,7 @@ void FastTimerService::preallocate(edm::service::SystemBounds const& bounds) {
dqm_path_ += fmt::sprintf(
"/Running on %s with %d streams on %d threads", processor_model, concurrent_streams_, concurrent_threads_);

// clean characters that are deemed unsafe for DQM
// see the definition of `s_safe` in DQMServices/Core/src/DQMStore.cc
auto safe_for_dqm = "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+=_()# "s;
for (auto& c : dqm_path_)
if (safe_for_dqm.find(c) == std::string::npos)
c = '_';
dqm_path_ = fix_for_dqm(dqm_path_);

// allocate atomic variables to keep track of the completion of each step, process by process
subprocess_event_check_ = std::make_unique<std::atomic<unsigned int>[]>(concurrent_streams_);
Expand Down
1 change: 1 addition & 0 deletions HLTrigger/Timer/plugins/FastTimerService.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class FastTimerService : public tbb::task_scheduler_observer {

public:
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
static std::string fix_for_dqm(std::string input);

private:
// forward declarations
Expand Down