24std::vector<std::string>
tokenise(
const std::string &str,
const std::string &delims) {
25 std::vector<std::string> tokens;
27 auto beg = str.find_first_not_of(delims, 0);
28 auto end = str.find_first_of(delims, beg);
30 tokens.emplace_back(str.substr(beg, end-beg));
31 beg = str.find_first_not_of(delims, end);
32 end = str.find_first_of(delims, beg);
33 }
while (beg != std::string::npos);
45 msg.setGlobalKillBelow(level);
46 for (
int i = 0; i < msg.numStreams(); ++i) {
47 _oldConf.push_back(msg.getStream(i));
48 msg.getStream(i).removeTopic(topics);
49 msg.setStreamStatus(i,
true);
61 for (
unsigned int i = 0; i <
_oldConf.size(); ++i) {
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
RooFit::MsgLevel _oldKillBelow
HijackMessageStream(RooFit::MsgLevel level, RooFit::MsgTopic topics, const char *objectName=nullptr)
std::vector< RooMsgService::StreamConfig > _oldConf
virtual ~HijackMessageStream()
static RooMsgService & instance()
Return reference to singleton instance.
RooCmdArg OutputStream(std::ostream &os)
RooCmdArg Topic(Int_t topic)
RooCmdArg ObjectName(const char *name)
std::vector< std::string > tokenise(const std::string &str, const std::string &delims)
Tokenise the string by splitting at the characters in delims.