Skip to content
Snippets Groups Projects
Commit 84d04a15 authored by Charles Burton's avatar Charles Burton Committed by Vakhtang Tsulaia
Browse files

Allow commas in titles, etc.

parent 41b30e01
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ def ExampleMonitoringConfig(inputFlags): ...@@ -81,7 +81,7 @@ def ExampleMonitoringConfig(inputFlags):
### STEP 5 ### ### STEP 5 ###
# Configure histograms # Configure histograms
myGroup.defineHistogram('lumiPerBCID',title='Luminosity;L/BCID;Events', myGroup.defineHistogram('lumiPerBCID',title='Luminosity","WithCommaInTitle;L/BCID;Events',
path='ToRuleThemAll',xbins=10,xmin=0.0,xmax=10.0) path='ToRuleThemAll',xbins=10,xmin=0.0,xmax=10.0)
myGroup.defineHistogram('lb', title='Luminosity Block;lb;Events', myGroup.defineHistogram('lb', title='Luminosity Block;lb;Events',
path='ToFindThem',xbins=1000,xmin=-0.5,xmax=999.5,weight='testweight') path='ToFindThem',xbins=1000,xmin=-0.5,xmax=999.5,weight='testweight')
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
using namespace Monitored; using namespace Monitored;
typedef boost::tokenizer<boost::char_separator<char>> tokenizer_t; typedef boost::tokenizer<boost::escaped_list_separator<char>> tokenizer_t;
const HistogramDef HistogramDef::parse(const std::string &histogramDefinition) { const HistogramDef HistogramDef::parse(const std::string &histogramDefinition) {
HistogramDef result; HistogramDef result;
...@@ -61,12 +61,11 @@ const HistogramDef HistogramDef::parse(const std::string &histogramDefinition) { ...@@ -61,12 +61,11 @@ const HistogramDef HistogramDef::parse(const std::string &histogramDefinition) {
} }
std::vector<std::string> HistogramDef::splitWithSeparator(const std::string &input, const char *separator) { std::vector<std::string> HistogramDef::splitWithSeparator(const std::string &input, const char *separator) {
boost::char_separator<char> sep(separator); boost::escaped_list_separator<char> sep('\\',*separator);
tokenizer_t tokens(input, sep); tokenizer_t tokens(input,sep);
std::vector<std::string> result; std::vector<std::string> result;
for (tokenizer_t::iterator itr = tokens.begin(); itr != tokens.end(); ++itr) { for (auto word : tokens ) {
std::string word = *itr;
boost::trim(word); boost::trim(word);
result.push_back(word); result.push_back(word);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment