DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
oks
include
oks
defs.hpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS oks source for the DUNE DAQ project.
3
// Fork baseline commit: oks-08-03-04 (2022-04-14).
4
// Renamed since fork: yes (from oks/defs.h to include/oks/defs.hpp).
5
6
#ifndef OKS_DEFS_H
7
#define OKS_DEFS_H
8
9
#include <iosfwd>
10
#include <string>
11
12
#include "
ers/ers.hpp
"
13
14
#include "
oks/exceptions.hpp
"
15
24
25
namespace
dunedaq
{
26
namespace
oks
{
30
31
const
std::string
32
strerror
(
int
error
);
33
35
41
42
class
Oks
43
{
44
45
public
:
46
static
std::ostream&
error_msg
(
const
char
*);
47
static
std::ostream&
warning_msg
(
const
char
*);
48
static
std::ostream&
error_msg
(
const
std::string& s) {
return
error_msg
(s.c_str()); }
49
static
std::ostream&
warning_msg
(
const
std::string& s) {
return
warning_msg
(s.c_str()); }
50
51
static
void
substitute_variables
(std::string&);
52
static
bool
real_path
(std::string&,
bool
ignore_errors);
53
57
58
class
Tokenizer
59
{
60
61
public
:
62
Tokenizer
(
const
std::string& s,
const
char
* separator);
63
const
std::string
next
();
64
bool
next
(std::string&);
65
66
private
:
67
std::string
p_string
;
68
const
char
*
p_delimeters
;
69
std::string::size_type
p_idx
;
70
71
static
std::string
s_empty
;
72
};
73
};
74
75
}
// namespace oks
76
}
// namespace dunedaq
77
78
// defines MACRO and CONSTANTS for verbose report
79
80
#ifndef ERS_NO_DEBUG
81
#include <boost/date_time/posix_time/posix_time_types.hpp>
82
#include <boost/date_time/posix_time/time_formatters.hpp>
83
#define OSK_VERBOSE_REPORT(MSG) \
84
if (p_verbose) { \
85
boost::posix_time::ptime now = boost::posix_time::second_clock::universal_time(); \
86
std::cout << "[OKS " << boost::posix_time::to_simple_string(now) << "]: " << MSG << std::endl; \
87
std::cout.flush(); \
88
}
89
#else
90
#define OSK_VERBOSE_REPORT(MSG) ;
91
#endif
92
93
// defines MACRO for OKS profiler
94
95
#ifndef ERS_NO_DEBUG
96
#define OSK_PROFILING(FID, K) OksFunctionProfiler yyy(FID, K);
97
#else
98
#define OSK_PROFILING(FID, K) ;
99
#endif
100
101
#endif
dunedaq::oks::Oks::Tokenizer::p_idx
std::string::size_type p_idx
Definition
defs.hpp:69
dunedaq::oks::Oks::Tokenizer::next
const std::string next()
Definition
time.cpp:190
dunedaq::oks::Oks::Tokenizer::p_delimeters
const char * p_delimeters
Definition
defs.hpp:68
dunedaq::oks::Oks::Tokenizer::Tokenizer
Tokenizer(const std::string &s, const char *separator)
Definition
time.cpp:182
dunedaq::oks::Oks::Tokenizer::s_empty
static std::string s_empty
Definition
defs.hpp:71
dunedaq::oks::Oks::Tokenizer::p_string
std::string p_string
Definition
defs.hpp:67
dunedaq::oks::Oks
Class contains common OKS classes and methods.
Definition
defs.hpp:43
dunedaq::oks::Oks::warning_msg
static std::ostream & warning_msg(const std::string &s)
Definition
defs.hpp:49
dunedaq::oks::Oks::error_msg
static std::ostream & error_msg(const std::string &s)
Definition
defs.hpp:48
dunedaq::oks::Oks::substitute_variables
static void substitute_variables(std::string &)
Definition
kernel.cpp:525
dunedaq::oks::Oks::warning_msg
static std::ostream & warning_msg(const char *)
Definition
kernel.cpp:518
dunedaq::oks::Oks::real_path
static bool real_path(std::string &, bool ignore_errors)
Definition
kernel.cpp:546
dunedaq::oks::Oks::error_msg
static std::ostream & error_msg(const char *)
Definition
kernel.cpp:511
ers.hpp
exceptions.hpp
dunedaq::oks
Definition
SchemaCommand.hpp:17
dunedaq::oks::strerror
const std::string strerror(int error)
Convert C error number to string.
Definition
kernel.cpp:111
dunedaq
The DUNE-DAQ namespace.
Definition
cib_utilities.cpp:5
dunedaq::error
CIB Buffer std::string descriptor Message from std::string descriptor CIB process error
Definition
CIBModuleIssues.hpp:31
Generated on
for DUNE-DAQ by
1.18.0