22 snprintf(buf,
sizeof(buf),
"%d", value);
60 fprintf(stderr,
"MVOdb: %s\n", error->
fErrorString.c_str());
65 fprintf(stderr,
"MVOdb: Error: MIDAS %s() at ODB path \"%s\" returned status %d\n", midas_func_name, path.c_str(), status);
82 fprintf(stderr,
"MVOdb::SetError: %s\n", error->
fErrorString.c_str());
86 fprintf(stderr,
"MVOdb::SetError: Error: %s at ODB path \"%s\"\n", message.c_str(), path.c_str());
97 snprintf(str,
sizeof(str),
"MakeFileDumpOdb: old ODB dump format is not supported, sorry");
98 SetError(error,
false,
"buffer", str);
100 }
else if (buf[0] ==
'<') {
103 }
else if (buf[0] ==
'{') {
109 snprintf(str,
sizeof(str),
"MakeFileDumpOdb: unknown ODB dump format, first char is \'%c\' (%d), dump size %d",
110 buf[0], buf[0], bufsize);
111 SetError(error,
false,
"buffer", str);
MVOdb * MakeJsonBufferOdb(const char *buf, int bufsize, MVOdbError *error=NULL)
MVOdb * MakeXmlBufferOdb(const char *buf, int bufsize, MVOdbError *error=NULL)
void SetOk(MVOdbError *error)
void SetMidasStatus(MVOdbError *error, bool print, const std::string &path, const char *midas_func_name, int status)
MVOdb * MakeFileDumpOdb(const char *buf, int bufsize, MVOdbError *error)
Access ODB from a midas file dump. FOrmat could be .xml, .json or .odb.
void SetError(MVOdbError *error, bool print, const std::string &path, const std::string &message)
void SetOk(MVOdbError *error)
static std::string toString(int value)