Beispiel #1
0
void
mxmsg(unsigned int level,
      std::string message) {
  static bool s_saw_cr_after_nl = false;

  if (g_suppress_info && (MXMSG_INFO == level))
    return;

  if ('\n' == message[0]) {
    message.erase(0, 1);
    g_mm_stdio->puts("\n");
    s_saw_cr_after_nl = false;
  }

  if (level == MXMSG_ERROR) {
    if (s_saw_cr_after_nl)
      g_mm_stdio->puts("\n");
    if (!ba::starts_with(message, Y("Error:")))
      g_mm_stdio->puts(g_cc_stdio->native(Y("Error: ")));

  } else if (level == MXMSG_WARNING)
    g_mm_stdio->puts(g_cc_stdio->native(Y("Warning: ")));

  else if (level == MXMSG_DEBUG)
    g_mm_stdio->puts(g_cc_stdio->native(Y("Debug> ")));

  size_t idx_cr = message.rfind('\r');
  if (std::string::npos != idx_cr) {
    size_t idx_nl = message.rfind('\n');
    if ((std::string::npos != idx_nl) && (idx_nl < idx_cr))
      s_saw_cr_after_nl = true;
  }

  std::string output = g_cc_stdio->native(message);
  g_mm_stdio->puts(output);
  g_mm_stdio->flush();
}
std::vector<int> AssociatingDecayTree::addAssociations(counted_ptr<AssociatedDecayTree> ctree) const{
  return addAssociations(ctree.get());
}
Beispiel #3
0
std::complex<double> AmpPair::add(const counted_ptr<IDalitzEvent>& evtPtr
		       , double weight
		       , double efficiency
		       ){
  return add(evtPtr.get(), weight, efficiency);
}
Beispiel #4
0
bool Log::IsInLog(counted_ptr<ILogEntry> ptr) {
    if (ptr.get()->GetIndex() == Log::idx_to_find_) {
        return true;
    }
    return false;
}