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 <string>
10
#include <iosfwd>
11
12
#include "
ers/ers.hpp
"
13
14
#include "
oks/exceptions.hpp
"
15
16
25
26
namespace
dunedaq
{
27
namespace
oks
28
{
32
33
const
std::string
34
strerror
(
int
error
);
35
36
38
44
45
46
class
Oks
{
47
48
public
:
49
50
static
std::ostream&
error_msg
(
const
char
*);
51
static
std::ostream&
warning_msg
(
const
char
*);
52
static
std::ostream&
error_msg
(
const
std::string& s) {
return
error_msg
(s.c_str());}
53
static
std::ostream&
warning_msg
(
const
std::string& s) {
return
warning_msg
(s.c_str());}
54
55
static
void
substitute_variables
(std::string&);
56
static
bool
real_path
(std::string&,
bool
ignore_errors);
57
58
62
63
class
Tokenizer
{
64
65
public
:
66
67
Tokenizer
(
const
std::string& s,
const
char
* separator);
68
const
std::string
next
();
69
bool
next
(std::string&);
70
71
72
private
:
73
74
std::string
p_string
;
75
const
char
*
p_delimeters
;
76
std::string::size_type
p_idx
;
77
78
static
std::string
s_empty
;
79
};
80
81
};
82
83
84
}
// namespace oks
85
}
// namespace dunedaq
86
87
88
// defines MACRO and CONSTANTS for verbose report
89
90
#ifndef ERS_NO_DEBUG
91
# include <boost/date_time/posix_time/posix_time_types.hpp>
92
# include <boost/date_time/posix_time/time_formatters.hpp>
93
# define OSK_VERBOSE_REPORT(MSG) if(p_verbose) { boost::posix_time::ptime now = boost::posix_time::second_clock::universal_time(); std::cout << "[OKS " << boost::posix_time::to_simple_string(now) << "]: " << MSG << std::endl; std::cout.flush();}
94
#else
95
# define OSK_VERBOSE_REPORT(MSG) ;
96
#endif
97
98
99
// defines MACRO for OKS profiler
100
101
#ifndef ERS_NO_DEBUG
102
# define OSK_PROFILING(FID, K) OksFunctionProfiler yyy(FID, K);
103
#else
104
# define OSK_PROFILING(FID, K) ;
105
#endif
106
107
#endif
dunedaq::oks::Oks::Tokenizer::p_idx
std::string::size_type p_idx
Definition
defs.hpp:76
dunedaq::oks::Oks::Tokenizer::next
const std::string next()
Definition
time.cpp:194
dunedaq::oks::Oks::Tokenizer::p_delimeters
const char * p_delimeters
Definition
defs.hpp:75
dunedaq::oks::Oks::Tokenizer::Tokenizer
Tokenizer(const std::string &s, const char *separator)
Definition
time.cpp:186
dunedaq::oks::Oks::Tokenizer::s_empty
static std::string s_empty
Definition
defs.hpp:78
dunedaq::oks::Oks::Tokenizer::p_string
std::string p_string
Definition
defs.hpp:74
dunedaq::oks::Oks
Class contains common OKS classes and methods.
Definition
defs.hpp:46
dunedaq::oks::Oks::warning_msg
static std::ostream & warning_msg(const std::string &s)
Definition
defs.hpp:53
dunedaq::oks::Oks::error_msg
static std::ostream & error_msg(const std::string &s)
Definition
defs.hpp:52
dunedaq::oks::Oks::substitute_variables
static void substitute_variables(std::string &)
Definition
kernel.cpp:575
dunedaq::oks::Oks::warning_msg
static std::ostream & warning_msg(const char *)
Definition
kernel.cpp:568
dunedaq::oks::Oks::real_path
static bool real_path(std::string &, bool ignore_errors)
Definition
kernel.cpp:599
dunedaq::oks::Oks::error_msg
static std::ostream & error_msg(const char *)
Definition
kernel.cpp:561
ers.hpp
exceptions.hpp
dunedaq::oks
Definition
OksConfiguration.hpp:24
dunedaq::oks::strerror
const std::string strerror(int error)
Convert C error number to string.
Definition
kernel.cpp:119
dunedaq
Including Qt Headers.
Definition
module.cpp:16
dunedaq::error
CIB Buffer std::string descriptor Message from std::string descriptor CIB process error
Definition
CIBModuleIssues.hpp:47
Generated on
for DUNE-DAQ by
1.17.0