97 JParser<> zap(
"Auxiliary application to examine datalog file.");
99 zap[
'f'] =
make_field(datalogstringFile,
"datalog file");
100 zap[
'e'] =
make_field(egrep,
"filter, precede with '!' to invert") =
"";
109 catch(
const exception& error) {
110 FATAL(error.what() << endl);
117 for (
const auto& filename : datalogstringFile) {
118 datalogs.
load(filename);
121 catch(
const exception& error) {
122 FATAL(error.what() << endl);
126 JDatalogs_t::iterator __end = datalogs.end();
128 for (JDatalogs_t::iterator i = datalogs.begin(); i != __end; ) {
130 bool status = UTC(i->utc);
132 if (!egrep.empty()) {
134 if (egrep[0] !=
'!' && !regex_match(i->data, regex(
".*" + egrep.substr(0) +
".*"))) { status =
false; }
135 if (egrep[0] ==
'!' && regex_match(i->data, regex(
".*" + egrep.substr(1) +
".*"))) { status =
false; }
150 status = i->match(datalog);
156 iter_swap(i, --__end);
159 datalogs.erase(__end, datalogs.end());
164 for (
const auto& datalog : datalogs) {
165 print(cout, datalog);
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Utility class to parse parameter values.
std::string toString() const
Convert tag to string.
Utility class to parse command line options.
std::ostream & print(std::ostream &out, const JTestSummary &summary, const char delimiter=' ', const bool useColors=true)
Print test summary.
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
static const std::string MESSAGE_TAG
Message logging tag.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
static const JNET::JTag RC_REPLY
Type definition of range.
Auxiliary data structure for datalog strings.
Container for datalog strings.
void load(const std::string &file_name)
Load message from input file.
Auxiliary data structure for logger message.
bool match(const JLoggerMessage &message) const
Get match.
Auxiliary data structure for reply message.
bool match(const JReplyMessage &message) const
Get match.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...