Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JEEP Namespace Reference

General puprpose classes and methods. More...

Classes

class  JArgs
 Data structure to store command line arguments. More...
 
struct  JComment
 Auxiliary class for comment. More...
 
class  JCommunicator
 Auxiliary class to control standard input and output. More...
 
struct  JContainer
 Auxiliary wrapper for I/O of container with optional comment (see JComment). More...
 
struct  JDate
 Auxiliary class for simple date. More...
 
struct  JEEPZ
 Auxiliary data structure for streaming of STL containers. More...
 
struct  JFunctionAdaptor
 Function adaptor. More...
 
struct  JFunctionAdaptorHelper
 Auxiliary base class for function adaptor. More...
 
struct  JGetStatusBit
 Auxiliary class to map key to status bit. More...
 
struct  JMessage
 Auxiliary class for handling debug parameter within a class. More...
 
struct  JMessage< JAANET::JHondaFluxInterpolator< JPhiFunction_t, JCoszFunctionalMap_t, JEnergyFunctionalMap_t > >
 JMessage template specialization for Honda atmospheric neutrino flux interpolators. More...
 
struct  JMessage< JOSCPROB::JOscProbInterpolator< JCollection_t, JFunction1D_t, JFunctionalMaplist_t > >
 JMessage template specialization for oscillation probability interpolators. More...
 
class  JProperties
 Utility class to parse parameter values. More...
 
class  JPropertiesElement
 The property value class. More...
 
class  JPropertiesElementInterface
 Interface for I/O of properties element. More...
 
class  JPropertiesTemplateElement
 Template class for I/O of properties element. More...
 
class  JPropertiesTemplateElement< const T >
 Template specialisation of JPropertiesTemplateElement for const data type. More...
 
class  JPropertiesTemplateElement< JProperties >
 Template specialisation for JProperties. More...
 
class  JPropertiesTemplateElement< JProperties::JFileReader >
 Template specialisation for JFileReader. More...
 
struct  JPutStatusBit
 Auxiliary class to map status bit to key. More...
 
struct  JStatus
 Auxiliary class for handling status. More...
 
struct  JTime
 Auxiliary class for simple time. More...
 
class  JTimekeeper
 Time keeper. More...
 
class  JTimer
 Auxiliary class for CPU timing and usage. More...
 
struct  JVersion
 Auxiliary data structure for general purpose version number. More...
 

Typedefs

typedef std::vector< std::string > JComment_t
 Type definition of comment block.
 
typedef std::multimap< JDate<'-'>, std::string > JGITTags_t
 Type definition of dated GIT tags.
 

Enumerations

enum  JMessage_t {
  debug_t = 3 , status_t = 2 , warning_t = 2 , notice_t = 1 ,
  error_t = 0 , fatal_t = 0
}
 Debug level. More...
 
enum  JScale_t {
  femto_t = -15 , pico_t = -12 , nano_t = -9 , micro_t = -6 ,
  milli_t = -3 , unit_t = 0 , kilo_t = +3 , mega_t = +6 ,
  giga_t = +9 , tera_t = +12 , peta_t = +15 , exa_t = +18
}
 Enumeration for scaling of quantity. More...
 

Functions

template<class T >
bool compareObjects (const T &first, const T &second, JBool< true >)
 Comparison of comparable objects.
 
template<class T >
bool compareObjects (const T &first, const T &second, JBool< false >)
 Comparison of uncomparable objects.
 
template<class T >
bool compareObjects (const T &first, const T &second)
 Comparison of objects.
 
template<int N>
bool compareObjects (const char(&first)[N], const char(&second)[N])
 Comparison of comparable objects.
 
bool hasWildCard (const std::string &file_name)
 Check presence of wild card.
 
std::string setWildCard (const std::string &file_name, const std::string &value)
 Get file name by setting wild card to given value.
 
std::string strip (const std::string &file_name)
 Strip leading and trailing white spaces from file name.
 
std::string getFilenameExtension (const std::string &file_name)
 Get file name extension, i.e. part after last JEEP::FILENAME_SEPARATOR if any.
 
std::string getFilename (const std::string &file_name)
 Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
 
std::string getPath (const std::string &file_name)
 Get path, i.e. part before last JEEP::PATHNAME_SEPARATOR if any.
 
std::string getFullPath (const std::string &path)
 Get full path, i.e. add JEEP::PATHNAME_SEPARATOR if necessary.
 
std::string getFilename (const std::string &path, const std::string &file_name)
 Compose full file name and introduce JEEP::PATHNAME_SEPARATOR if needed.
 
std::string getPath (const std::string &variable, const std::string &file_name)
 Get selected path from environment variable for given file name.
 
std::string getFullFilename (const std::string &variable, const std::string &file_name)
 Get full file name (see JEEP::getPath).
 
std::string getNamespace (const std::string &type_name)
 Get name space, i.e. part before JEEP::TYPENAME_SEPARATOR.
 
std::string getClassname (const std::string &type_name)
 Get type name, i.e. part after JEEP::TYPENAME_SEPARATOR.
 
std::string getProtocol (const std::string &file_name)
 Get protocol, i.e. part before first JEEP::PROTOCOL_SEPARATOR if any.
 
std::string getURL ()
 Get URL of document pages.
 
template<class T >
T * open (const std::string &file_name)
 Open file.
 
template<>
std::istream * open (const std::string &file_name)
 Open file.
 
template<>
std::ostream * open (const std::string &file_name)
 Open file.
 
void close (std::istream *pf)
 Close file.
 
void close (std::ostream *pf)
 Close file.
 
const JGITTags_tgetGITTags ()
 Get GIT dated tags.
 
std::string getGITVersion (const std::string &tag)
 Get GIT version for given GIT tag.
 
template<class T >
int sign (const T &value)
 Get sign of value.
 
std::ostream & getOstream ()
 Get output stream for conversion to std::string.
 
const char * getCString (const std::string &input)
 Get output C-string.
 
bool fail (std::istream &in)
 Check for stream state.
 
template<class T >
JPropertiesgetProperties (T &object, const JEquationParameters &parameters=JEquationParameters(), const int debug=1)
 Get properties of a given object.
 
double getValue (const JScale_t scale)
 Get numerical value corresponding to scale.
 
const char * getUnit (const int scale)
 Get textual unit corresponding to scale.
 
JScale_t getScale (const char unit)
 Get scale corresponding to textual unit.
 
void print (std::ostream &out, const JStatus &status, const JPutStatusBit &helper)
 Print status.
 
void print (std::ostream &out, const JStatus &status, const JGetStatusBit &helper)
 Print status.
 
template<class T >
std::istream & readObject (std::istream &in, T &object)
 Stream input of object.
 
template<class T >
std::ostream & writeObject (std::ostream &out, const T &object)
 Stream output of object.
 
template<class T >
std::ostream & writeObject (std::ostream &out, const char *prefix, const T &object, const char postfix)
 Stream output of object.
 
template<class JFirst_t , class JSecond_t >
std::istream & readObject (std::istream &in, std::pair< JFirst_t, JSecond_t > &object)
 Template specialisation of method readObject() for std::pair.
 
template<class JFirst_t , class JSecond_t >
std::ostream & writeObject (std::ostream &out, const std::pair< JFirst_t, JSecond_t > &object)
 Template specialisation of method writeObject() for std::pair.
 
template<class JFirst_t , class JSecond_t >
std::ostream & writeObject (std::ostream &out, const char *prefix, const std::pair< JFirst_t, JSecond_t > &object, const char postfix)
 Template specialisation of method writeObject() for std::pair.
 
template<class JElement_t , class JAllocator_t >
std::istream & readObject (std::istream &in, std::vector< JElement_t, JAllocator_t > &object)
 Template specialisation of method readObject() for std::vector.
 
template<class JElement_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const std::vector< JElement_t, JAllocator_t > &object)
 Template specialisation of method writeObject() for std::vector.
 
template<class JElement_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const char *prefix, const std::vector< JElement_t, JAllocator_t > &object, const char postfix)
 Template specialisation of method writeObject() for std::vector.
 
template<class JElement_t , class JAllocator_t >
std::istream & readObject (std::istream &in, std::list< JElement_t, JAllocator_t > &object)
 Template specialisation of method readObject() for std::list.
 
template<class JElement_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const std::list< JElement_t, JAllocator_t > &object)
 Template specialisation of method writeObject() for std::list.
 
template<class JElement_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const char *prefix, const std::list< JElement_t, JAllocator_t > &object, const char postfix)
 Template specialisation of method writeObject() for std::list.
 
template<class JElement_t , class JComparator_t , class JAllocator_t >
std::istream & readObject (std::istream &in, std::set< JElement_t, JComparator_t, JAllocator_t > &object)
 Template specialisation of method readObject() for std::set.
 
template<class JElement_t , class JComparator_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const std::set< JElement_t, JComparator_t, JAllocator_t > &object)
 Template specialisation of method writeObject() for std::set.
 
template<class JElement_t , class JComparator_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const char *prefix, const std::set< JElement_t, JComparator_t, JAllocator_t > &object, const char postfix)
 Template specialisation of method writeObject() for std::set.
 
template<class JElement_t , class JComparator_t , class JAllocator_t >
std::istream & readObject (std::istream &in, std::multiset< JElement_t, JComparator_t, JAllocator_t > &object)
 Template specialisation of method readObject() for std::multiset.
 
template<class JElement_t , class JComparator_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const std::multiset< JElement_t, JComparator_t, JAllocator_t > &object)
 Template specialisation of method writeObject() for std::multiset.
 
template<class JElement_t , class JComparator_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const char *prefix, const std::multiset< JElement_t, JComparator_t, JAllocator_t > &object, const char postfix)
 Template specialisation of method writeObject() for std::multiset.
 
template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::istream & readObject (std::istream &in, std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &object)
 Template specialisation of method readObject() for std::map.
 
template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &object)
 Template specialisation of method writeObject() for std::map.
 
template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const char *prefix, const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &object, const char postfix)
 Template specialisation of method writeObject() for std::map.
 
template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::istream & readObject (std::istream &in, std::multimap< JKey_t, JValue_t, JComparator_t, JAllocator_t > &object)
 Template specialisation of method readObject() for std::multimap.
 
template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const std::multimap< JKey_t, JValue_t, JComparator_t, JAllocator_t > &object)
 Template specialisation of method writeObject() for std::multimap.
 
template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::ostream & writeObject (std::ostream &out, const char *prefix, const std::multimap< JKey_t, JValue_t, JComparator_t, JAllocator_t > &object, const char postfix)
 Template specialisation of method writeObject() for std::multimap.
 
template<class JElement_t , std::size_t N>
std::istream & readObject (std::istream &in, std::array< JElement_t, N > &object)
 Template specialisation of method readObject() for std::array.
 
template<class JElement_t , std::size_t N>
std::ostream & writeObject (std::ostream &out, const std::array< JElement_t, N > &object)
 Template specialisation of method writeObject() for std::array.
 
template<class JElement_t , std::size_t N>
std::ostream & writeObject (std::ostream &out, const char *prefix, const std::array< JElement_t, N > &object, const char postfix)
 Template specialisation of method writeObject() for std::array.
 
template<class T >
std::ostream & writeArray (std::ostream &out, const char *left, const char *right, const char *sep, T __begin, T __end)
 Write array of objects.
 

Variables

static const char *const LD_LIBRARY_PATH = "LD_LIBRARY_PATH"
 Nick names of environment variables.
 
static const char *const PATH = "PATH"
 binary file paths
 
static const char *const SHELL = "SHELL"
 SHELL.
 
static const char *const JPP_PAGES = "JPP_PAGES"
 Jpp document pages.
 
static const char PATHNAME_SEPARATOR = '/'
 path name separator
 
static const char PATHLIST_SEPARATOR = ':'
 path list separator
 
static const char FILENAME_SEPARATOR = '.'
 file name separator
 
static const char *const TYPENAME_SEPARATOR = "::"
 type name separator
 
static const char PROTOCOL_SEPARATOR = ':'
 protocol separator
 
static const char FILENAME_WILDCARD = '%'
 wild card character for file name substitution
 

Detailed Description

General puprpose classes and methods.

Author
mdejong
bjung

Typedef Documentation

◆ JComment_t

typedef std::vector<std::string> JEEP::JComment_t

Type definition of comment block.

Definition at line 31 of file JComment.hh.

◆ JGITTags_t

typedef std::multimap<JDate<'-'>, std::string> JEEP::JGITTags_t

Type definition of dated GIT tags.

Definition at line 25 of file Jeep/JGITTags.hh.

Enumeration Type Documentation

◆ JMessage_t

Debug level.

Enumerator
debug_t 

debug

status_t 

status

warning_t 

warning

notice_t 

notice

error_t 

error

fatal_t 

fatal; exit

Definition at line 27 of file JMessage.hh.

27 {
28
29 debug_t = 3, //!< debug
30 status_t = 2, //!< status
31 warning_t = 2, //!< warning
32 notice_t = 1, //!< notice
33 error_t = 0, //!< error
34 fatal_t = 0 //!< fatal; exit
35 };
@ error_t
error
Definition JMessage.hh:33
@ fatal_t
fatal; exit
Definition JMessage.hh:34
@ status_t
status
Definition JMessage.hh:30
@ warning_t
warning
Definition JMessage.hh:31
@ debug_t
debug
Definition JMessage.hh:29
@ notice_t
notice
Definition JMessage.hh:32

◆ JScale_t

Enumeration for scaling of quantity.

Enumerator
femto_t 

femto

pico_t 

pico

nano_t 

nano

micro_t 

micro

milli_t 

milli

unit_t 

unit

kilo_t 

kilo

mega_t 

mega

giga_t 

giga

tera_t 

tera

peta_t 

peta

exa_t 

exa

Definition at line 24 of file JScale.hh.

24 {
25
26 femto_t = -15, //!< femto
27 pico_t = -12, //!< pico
28 nano_t = -9, //!< nano
29 micro_t = -6, //!< micro
30 milli_t = -3, //!< milli
31 unit_t = 0, //!< unit
32 kilo_t = +3, //!< kilo
33 mega_t = +6, //!< mega
34 giga_t = +9, //!< giga
35 tera_t = +12, //!< tera
36 peta_t = +15, //!< peta
37 exa_t = +18 //!< exa
38 };
@ peta_t
peta
Definition JScale.hh:36
@ kilo_t
kilo
Definition JScale.hh:32
@ mega_t
mega
Definition JScale.hh:33
@ exa_t
exa
Definition JScale.hh:37
@ giga_t
giga
Definition JScale.hh:34
@ femto_t
femto
Definition JScale.hh:26
@ tera_t
tera
Definition JScale.hh:35
@ unit_t
unit
Definition JScale.hh:31
@ nano_t
nano
Definition JScale.hh:28
@ pico_t
pico
Definition JScale.hh:27
@ milli_t
milli
Definition JScale.hh:30
@ micro_t
micro
Definition JScale.hh:29

Function Documentation

◆ compareObjects() [1/4]

template<class T >
bool JEEP::compareObjects ( const T & first,
const T & second,
JBool< true >  )
inline

Comparison of comparable objects.

Parameters
firstfirst object
secondsecond object
Returns
true if objects are equal; else false

Definition at line 32 of file JComparisonToolkit.hh.

35 {
36 return first == second;
37 }

◆ compareObjects() [2/4]

template<class T >
bool JEEP::compareObjects ( const T & first,
const T & second,
JBool< false >  )
inline

Comparison of uncomparable objects.

Parameters
firstfirst object
secondsecond object
Returns
false

Definition at line 48 of file JComparisonToolkit.hh.

51 {
52 return false;
53 }

◆ compareObjects() [3/4]

template<class T >
bool JEEP::compareObjects ( const T & first,
const T & second )
inline

Comparison of objects.

Parameters
firstfirst object
secondsecond object
Returns
true if objects are comparable and equal; else false

Definition at line 64 of file JComparisonToolkit.hh.

66 {
67 return compareObjects(first, second, JBool<JComparisonAvailable<T>::has_eq>());
68 }
bool compareObjects(const T &first, const T &second, JBool< true >)
Comparison of comparable objects.
Auxiliary template class for type bool.
Definition JBool.hh:21

◆ compareObjects() [4/4]

template<int N>
bool JEEP::compareObjects ( const char(&) first[N],
const char(&) second[N] )
inline

Comparison of comparable objects.

Parameters
firstfirst object
secondsecond object
Returns
true if objects are equal; else false

Definition at line 79 of file JComparisonToolkit.hh.

81 {
82 return strcmp(first, second) == 0;
83 }

◆ hasWildCard()

bool JEEP::hasWildCard ( const std::string & file_name)
inline

Check presence of wild card.

Parameters
file_namefile name
Returns
true if wild card present; else false

Definition at line 53 of file JeepToolkit.hh.

54 {
55 return (file_name.find(FILENAME_WILDCARD) != std::string::npos);
56 }

◆ setWildCard()

std::string JEEP::setWildCard ( const std::string & file_name,
const std::string & value )
inline

Get file name by setting wild card to given value.

Parameters
file_nameinput file name
valuevalue
Returns
output file name

Definition at line 66 of file JeepToolkit.hh.

67 {
68 using namespace std;
69 using namespace JPP;
70
71 string buffer = file_name;
72
73 string::size_type pos = buffer.find(FILENAME_WILDCARD);
74
75 if (pos == string::npos) {
76 THROW(JNoValue, "Method getFilename(): Missing wild card character \'" << FILENAME_WILDCARD << "\'.");
77 }
78
79 return buffer.replace(pos, 1, value);
80 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Exception for missing value.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

◆ strip()

std::string JEEP::strip ( const std::string & file_name)
inline

Strip leading and trailing white spaces from file name.

Parameters
file_namefile name
Returns
file name

Definition at line 89 of file JeepToolkit.hh.

90 {
91 using namespace std;
92
93 string::const_iterator p = file_name. begin();
94 string::const_reverse_iterator q = file_name.rbegin();
95
96 for ( ; p != file_name.end() && q != file_name.rend() && isspace(*p); ++p) {}
97 for ( ; p != file_name.end() && q != file_name.rend() && isspace(*q); ++q) {}
98
99 return string(p,q.base());
100 }

◆ getFilenameExtension()

std::string JEEP::getFilenameExtension ( const std::string & file_name)
inline

Get file name extension, i.e. part after last JEEP::FILENAME_SEPARATOR if any.

Parameters
file_namefile name
Returns
extension (excluding separator)

Definition at line 109 of file JeepToolkit.hh.

110 {
111 using namespace std;
112
113 const size_t pos = file_name.rfind(FILENAME_SEPARATOR);
114
115 if (pos != string::npos)
116 return file_name.substr(pos + 1);
117 else
118 return "";
119 }

◆ getFilename() [1/2]

std::string JEEP::getFilename ( const std::string & file_name)
inline

Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.

Parameters
file_namefile name
Returns
file name part (excluding separator)

Definition at line 128 of file JeepToolkit.hh.

129 {
130 using namespace std;
131
132 const string buffer = strip(file_name);
133 const size_t pos = buffer.rfind(PATHNAME_SEPARATOR);
134
135 if (pos != string::npos)
136 return buffer.substr(pos + 1);
137 else
138 return buffer;
139 }
std::string strip(const std::string &file_name)
Strip leading and trailing white spaces from file name.

◆ getPath() [1/2]

std::string JEEP::getPath ( const std::string & file_name)
inline

Get path, i.e. part before last JEEP::PATHNAME_SEPARATOR if any.

Parameters
file_namefile name
Returns
path (including separator)

Definition at line 148 of file JeepToolkit.hh.

149 {
150 using namespace std;
151
152 const string buffer = strip(file_name);
153 const size_t pos = buffer.rfind(PATHNAME_SEPARATOR);
154
155 if (pos != string::npos)
156 return buffer.substr(0, pos + 1);
157 else
158 return "";
159 }

◆ getFullPath()

std::string JEEP::getFullPath ( const std::string & path)
inline

Get full path, i.e. add JEEP::PATHNAME_SEPARATOR if necessary.

Parameters
pathpath
Returns
path (including separator)

Definition at line 168 of file JeepToolkit.hh.

169 {
170 using namespace std;
171
172 const string buffer = strip(path);
173
174 if (buffer.empty() || *buffer.rbegin() == PATHNAME_SEPARATOR) {
175
176 return buffer;
177
178 } else {
179
180 return buffer + PATHNAME_SEPARATOR;
181 }
182 }

◆ getFilename() [2/2]

std::string JEEP::getFilename ( const std::string & path,
const std::string & file_name )
inline

Compose full file name and introduce JEEP::PATHNAME_SEPARATOR if needed.

Parameters
pathpath
file_namefile name
Returns
file name

Definition at line 192 of file JeepToolkit.hh.

193 {
194 using namespace std;
195
196 const string buffer = getFullPath(path);
197
198 if (buffer.empty())
199 return strip(file_name);
200 else
201 return buffer + strip(file_name);
202 }
std::string getFullPath(const std::string &path)
Get full path, i.e. add JEEP::PATHNAME_SEPARATOR if necessary.

◆ getPath() [2/2]

std::string JEEP::getPath ( const std::string & variable,
const std::string & file_name )
inline

Get selected path from environment variable for given file name.

The environment variable is parsed according character JEEP::PATHLIST_SEPARATOR. The first path in which a file exists with the given file name is returned. If no existing file is found, an empty path is returned.

Parameters
variableenvironment variable
file_namefile name
Returns
path

Definition at line 216 of file JeepToolkit.hh.

217 {
218 using namespace std;
219
220 string path = "";
221
222 if (!file_name.empty() && file_name[0] != PATHNAME_SEPARATOR) {
223
224 const char* const p = getenv(variable.c_str());
225
226 if (p != NULL) {
227
228 const string buffer(p);
229
230 if (!buffer.empty()) {
231
232 size_t pos = 0, len;
233
234 do {
235
236 len = buffer.substr(pos).find(PATHLIST_SEPARATOR);
237 path = buffer.substr(pos,len);
238
239 } while (!ifstream(getFilename(path, file_name).c_str()).good() && len != string::npos && (pos += len + 1) != buffer.length());
240 }
241 }
242 }
243
244 if (ifstream(getFilename(path, file_name).c_str()).good())
245 return path;
246 else
247 return "";
248 }

◆ getFullFilename()

std::string JEEP::getFullFilename ( const std::string & variable,
const std::string & file_name )
inline

Get full file name (see JEEP::getPath).

Parameters
variableenvironment variable
file_namefile name
Returns
file name

Definition at line 258 of file JeepToolkit.hh.

259 {
260 return getFilename(getPath(variable, file_name), file_name);
261 }
std::string getPath(const std::string &file_name)
Get path, i.e. part before last JEEP::PATHNAME_SEPARATOR if any.

◆ getNamespace()

std::string JEEP::getNamespace ( const std::string & type_name)
inline

Get name space, i.e. part before JEEP::TYPENAME_SEPARATOR.

Parameters
type_nametype name
Returns
name space (possibly empty)

Definition at line 270 of file JeepToolkit.hh.

271 {
272 using namespace std;
273
274 const size_t pos = type_name.rfind(TYPENAME_SEPARATOR);
275
276 if (pos != string::npos)
277 return type_name.substr(0, pos);
278 else
279 return "";
280 }

◆ getClassname()

std::string JEEP::getClassname ( const std::string & type_name)
inline

Get type name, i.e. part after JEEP::TYPENAME_SEPARATOR.

Parameters
type_nametype name
Returns
class name

Definition at line 289 of file JeepToolkit.hh.

290 {
291 using namespace std;
292
293 const size_t pos = type_name.rfind(TYPENAME_SEPARATOR);
294
295 if (pos != string::npos)
296 return type_name.substr(pos + 2);
297 else
298 return type_name;
299 }

◆ getProtocol()

std::string JEEP::getProtocol ( const std::string & file_name)
inline

Get protocol, i.e. part before first JEEP::PROTOCOL_SEPARATOR if any.

Parameters
file_namefile name
Returns
protocol (excluding separator)

Definition at line 308 of file JeepToolkit.hh.

309 {
310 using namespace std;
311
312 const size_t pos = file_name.find(PROTOCOL_SEPARATOR);
313
314 if (pos != string::npos)
315 return file_name.substr(0, pos);
316 else
317 return "";
318 }

◆ getURL()

std::string JEEP::getURL ( )
inline

Get URL of document pages.

Returns
URL

Definition at line 326 of file JeepToolkit.hh.

327 {
328 const char* const url = getenv(JPP_PAGES);
329
330 return std::string(url != NULL ? url : "");
331 }

◆ open() [1/3]

template<class T >
T * JEEP::open ( const std::string & file_name)
inline

Open file.

Parameters
file_namefile name
Returns
pointer to input stream

◆ open() [2/3]

template<>
std::istream * JEEP::open ( const std::string & file_name)
inline

Open file.

Parameters
file_namefile name
Returns
pointer to input stream

Definition at line 351 of file JeepToolkit.hh.

352 {
353 using namespace std;
354 using namespace JPP;
355
356 if (getFilenameExtension(file_name) == "gz")
357 return new igzstream(file_name.c_str());
358 else if (getFilenameExtension(file_name) == "txt")
359 return new ifstream (file_name.c_str());
360 else
361 return NULL;
362 }

◆ open() [3/3]

template<>
std::ostream * JEEP::open ( const std::string & file_name)
inline

Open file.

Parameters
file_namefile name
Returns
pointer to output stream

Definition at line 372 of file JeepToolkit.hh.

373 {
374 using namespace std;
375 using namespace JPP;
376
377 if (getFilenameExtension(file_name) == "gz")
378 return new ogzstream(file_name.c_str());
379 else if (getFilenameExtension(file_name) == "txt")
380 return new ofstream (file_name.c_str());
381 else
382 return NULL;
383 }

◆ close() [1/2]

void JEEP::close ( std::istream * pf)
inline

Close file.

Parameters
pfpointer to file stream

Definition at line 391 of file JeepToolkit.hh.

392 {
393 using namespace std;
394 using namespace JPP;
395
396 if (dynamic_cast<ifstream*> (pf) != NULL) { dynamic_cast<ifstream*> (pf)->close(); return; }
397 if (dynamic_cast<igzstream*>(pf) != NULL) { dynamic_cast<igzstream*>(pf)->close(); return; }
398 }
void close(std::istream *pf)
Close file.

◆ close() [2/2]

void JEEP::close ( std::ostream * pf)
inline

Close file.

Parameters
pfpointer to file stream

Definition at line 406 of file JeepToolkit.hh.

407 {
408 using namespace std;
409 using namespace JPP;
410
411 if (dynamic_cast<ofstream*> (pf) != NULL) { dynamic_cast<ofstream*> (pf)->close(); return; }
412 if (dynamic_cast<ogzstream*>(pf) != NULL) { dynamic_cast<ogzstream*>(pf)->close(); return; }
413 }

◆ getGITTags()

const JGITTags_t & JEEP::getGITTags ( )

Get GIT dated tags.

Returns
dated GIT tags

Definition at line 8 of file JGITTags.cc.

9 {
10 using namespace std;
11 using namespace JPP;
12
13 static JGITTags_t buffer;
14
15 if (buffer.empty()) {
16
17#ifdef GIT_TAGS
18
19 istringstream in(GIT_TAGS);
20
21 JDate<'-'> date;
22 string tag;
23
24 while (in >> tag >> date) {
25 buffer.insert(make_pair(date, tag));
26 }
27#endif
28 }
29
30 return buffer;
31 }
Auxiliary class for simple date.
Definition JDate.hh:40

◆ getGITVersion()

std::string JEEP::getGITVersion ( const std::string & tag)
inline

Get GIT version for given GIT tag.

Parameters
tagGIT tag
Returns
GIT version

Definition at line 34 of file Jeep/JGITTags.hh.

35 {
36 if (!tag.empty()) {
37
38 if (tag[0] == 'v' ||
39 tag[0] == 'V') {
40
41 return tag.substr(1);
42 }
43 }
44
45 return tag;
46 }

◆ sign()

template<class T >
int JEEP::sign ( const T & value)
inline

Get sign of value.

Parameters
valuevalue
Returns
-1 if value < 0; 0 if value == 0; +1 if value > 0

Definition at line 20 of file JLib.hh.

21 {
22 return (value > T(0)) - (value < T(0));
23 }

◆ getOstream()

std::ostream & JEEP::getOstream ( )
inline

Get output stream for conversion to std::string.

Note that the stream is emptied before use.

Returns
output stream

Definition at line 28 of file JPrint.hh.

29 {
30 static std::ostringstream buffer;
31
32 buffer.str("");
33
34 return buffer;
35 }

◆ getCString()

const char * JEEP::getCString ( const std::string & input)
inline

Get output C-string.

Note that this method is needed to guarentee livetime of underlying std::string.

Parameters
inputinput
Returns
C-string

Definition at line 46 of file JPrint.hh.

47 {
48 static std::string buffer;
49
50 buffer = input;
51
52 return buffer.c_str();
53 }

◆ fail()

bool JEEP::fail ( std::istream & in)
inline

Check for stream state.

Note that end-of-file is not defined as an error so to normally process e.g. std::string and std::vector.

Parameters
ininput stream
Returns
true if failure; else false

Definition at line 57 of file JProperties.hh.

58 {
59 return in.bad() || (in.fail() && !in.eof());
60 }

◆ getProperties()

template<class T >
JProperties & JEEP::getProperties ( T & object,
const JEquationParameters & parameters = JEquationParameters(),
const int debug = 1 )
inline

Get properties of a given object.

This method transfers the making of the property object to the corresponding class whilst preserving the constness of the argument.
The corresponding class should implement the method:

  template<bool is_constant>
  static JProperties getProperties(typename JCategory<T, is_constant>::reference_type object,
                                const JEquationParameters& equation,
                                const int debug)
Parameters
objectobject
parametersequation parameters
debugdebug level

Definition at line 1269 of file JProperties.hh.

1272 {
1273 using namespace JPP;
1274
1275 static JProperties properties;
1276
1277 properties = T::template getProperties<JClass<T>::is_constant>(object, parameters, debug);
1278
1279 return properties;
1280 }
int debug
debug level
Definition JSirene.cc:72
Utility class to parse parameter values.

◆ getValue()

double JEEP::getValue ( const JScale_t scale)
inline

Get numerical value corresponding to scale.

Parameters
scalescale
Returns
value

Definition at line 47 of file JScale.hh.

48 {
49 return pow(10.0, scale);
50 }
void scale(vector< double > &v, double c)
scale vector content

◆ getUnit()

const char * JEEP::getUnit ( const int scale)
inline

Get textual unit corresponding to scale.

Parameters
scalescale
Returns
textual unit

Definition at line 59 of file JScale.hh.

60 {
61 switch (scale) {
62
63 case femto_t:
64 return "f";
65
66 case pico_t:
67 return "p";
68
69 case nano_t:
70 return "n";
71
72 case micro_t:
73 return "u";
74
75 case milli_t:
76 return "m";
77
78 case unit_t:
79 return "";
80
81 case kilo_t:
82 return "k";
83
84 case mega_t:
85 return "M";
86
87 case giga_t:
88 return "G";
89
90 case tera_t:
91 return "T";
92
93 case peta_t:
94 return "P";
95
96 case exa_t:
97 return "E";
98
99 default:
100 THROW(JValueOutOfRange, "getUnit(): invalid scale " << scale);
101 };
102 }
Exception for accessing a value in a collection that is outside of its range.

◆ getScale()

JScale_t JEEP::getScale ( const char unit)
inline

Get scale corresponding to textual unit.

Parameters
unittextual unit
Returns
scale

Definition at line 111 of file JScale.hh.

112 {
113 switch (unit) {
114
115 case 'f':
116 return femto_t;
117
118 case 'p':
119 return pico_t;
120
121 case 'n':
122 return nano_t;
123
124 case 'u':
125 return micro_t;
126
127 case 'm':
128 return milli_t;
129
130 case ' ':
131 return unit_t;
132
133 case 'k':
134 return kilo_t;
135
136 case 'M':
137 return mega_t;
138
139 case 'G':
140 return giga_t;
141
142 case 'T':
143 return tera_t;
144
145 case 'P':
146 return peta_t;
147
148 case 'E':
149 return exa_t;
150
151 default:
152 THROW(JValueOutOfRange, "getScale(): invalid unit " << unit);
153 };
154 }

◆ print() [1/2]

void JEEP::print ( std::ostream & out,
const JStatus & status,
const JPutStatusBit & helper )
inline

Print status.

Parameters
outoutput stream
statusstatus
helperhelper

Definition at line 264 of file JStatus.hh.

265 {
266 using namespace std;
267
268 for (const auto& i : helper) {
269 out << setw(24) << left << i.second << right << status.has(i.first) << endl;
270 }
271 }
bool has(const int bit) const
Test PMT status.
Definition JStatus.hh:120

◆ print() [2/2]

void JEEP::print ( std::ostream & out,
const JStatus & status,
const JGetStatusBit & helper )
inline

Print status.

Parameters
outoutput stream
statusstatus
helperhelper

Definition at line 281 of file JStatus.hh.

282 {
283 using namespace std;
284
285 for (const auto& i : helper) {
286 out << setw(24) << left << i.first << right << status.has(i.second) << endl;
287 }
288 }

◆ readObject() [1/9]

template<class T >
std::istream & JEEP::readObject ( std::istream & in,
T & object )
inline

Stream input of object.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 28 of file JStreamToolkit.hh.

29 {
30 return in >> object;
31 }

◆ writeObject() [1/18]

template<class T >
std::ostream & JEEP::writeObject ( std::ostream & out,
const T & object )
inline

Stream output of object.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 42 of file JStreamToolkit.hh.

43 {
44 return out << object;
45 }

◆ writeObject() [2/18]

template<class T >
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const T & object,
const char postfix )
inline

Stream output of object.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 58 of file JStreamToolkit.hh.

62 {
63 return out << prefix << object << postfix;
64 }

◆ readObject() [2/9]

template<class JFirst_t , class JSecond_t >
std::istream & JEEP::readObject ( std::istream & in,
std::pair< JFirst_t, JSecond_t > & object )
inline

Template specialisation of method readObject() for std::pair.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 75 of file JStreamToolkit.hh.

76 {
77 readObject(in, object.first);
78 readObject(in, object.second);
79
80 return in;
81 }

◆ writeObject() [3/18]

template<class JFirst_t , class JSecond_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const std::pair< JFirst_t, JSecond_t > & object )
inline

Template specialisation of method writeObject() for std::pair.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 92 of file JStreamToolkit.hh.

93 {
94 writeObject(out, object.first);
95 writeObject(out, ' ');
96 writeObject(out, object.second);
97
98 return out;
99 }

◆ writeObject() [4/18]

template<class JFirst_t , class JSecond_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const std::pair< JFirst_t, JSecond_t > & object,
const char postfix )
inline

Template specialisation of method writeObject() for std::pair.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 112 of file JStreamToolkit.hh.

116 {
117 writeObject(out, prefix);
118 writeObject(out, object.first);
119 writeObject(out, ' ');
120 writeObject(out, object.second);
121 writeObject(out, postfix);
122
123 return out;
124 }

◆ readObject() [3/9]

template<class JElement_t , class JAllocator_t >
std::istream & JEEP::readObject ( std::istream & in,
std::vector< JElement_t, JAllocator_t > & object )
inline

Template specialisation of method readObject() for std::vector.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 135 of file JStreamToolkit.hh.

136 {
137 for (JElement_t element; readObject(in, element); ) {
138 object.push_back(element);
139 }
140
141 return in;
142 }

◆ writeObject() [5/18]

template<class JElement_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const std::vector< JElement_t, JAllocator_t > & object )
inline

Template specialisation of method writeObject() for std::vector.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 153 of file JStreamToolkit.hh.

154 {
155 for (typename std::vector<JElement_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
156 writeObject(out, ' ');
157 writeObject(out, *i);
158 }
159
160 return out;
161 }

◆ writeObject() [6/18]

template<class JElement_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const std::vector< JElement_t, JAllocator_t > & object,
const char postfix )
inline

Template specialisation of method writeObject() for std::vector.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 174 of file JStreamToolkit.hh.

178 {
179 for (typename std::vector<JElement_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
180 writeObject(out, prefix, *i, postfix);
181 }
182
183 return out;
184 }

◆ readObject() [4/9]

template<class JElement_t , class JAllocator_t >
std::istream & JEEP::readObject ( std::istream & in,
std::list< JElement_t, JAllocator_t > & object )
inline

Template specialisation of method readObject() for std::list.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 195 of file JStreamToolkit.hh.

196 {
197 for (JElement_t element; readObject(in, element); ) {
198 object.push_back(element);
199 }
200
201 return in;
202 }

◆ writeObject() [7/18]

template<class JElement_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const std::list< JElement_t, JAllocator_t > & object )
inline

Template specialisation of method writeObject() for std::list.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 213 of file JStreamToolkit.hh.

214 {
215 for (typename std::list<JElement_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
216 writeObject(out, ' ');
217 writeObject(out, *i);
218 }
219
220 return out;
221 }

◆ writeObject() [8/18]

template<class JElement_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const std::list< JElement_t, JAllocator_t > & object,
const char postfix )
inline

Template specialisation of method writeObject() for std::list.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 234 of file JStreamToolkit.hh.

238 {
239 for (typename std::list<JElement_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
240 writeObject(out, prefix, *i, postfix);
241 }
242
243 return out;
244 }

◆ readObject() [5/9]

template<class JElement_t , class JComparator_t , class JAllocator_t >
std::istream & JEEP::readObject ( std::istream & in,
std::set< JElement_t, JComparator_t, JAllocator_t > & object )
inline

Template specialisation of method readObject() for std::set.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 255 of file JStreamToolkit.hh.

256 {
257 for (JElement_t element; readObject(in, element); ) {
258
260
261 if (!result.second) {
262 object.erase (result.first);
263 object.insert(element);
264 }
265 }
266
267 return in;
268 }

◆ writeObject() [9/18]

template<class JElement_t , class JComparator_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const std::set< JElement_t, JComparator_t, JAllocator_t > & object )
inline

Template specialisation of method writeObject() for std::set.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 279 of file JStreamToolkit.hh.

280 {
281 for (typename std::set<JElement_t, JComparator_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
282 writeObject(out, ' ');
283 writeObject(out, *i);
284 }
285
286 return out;
287 }

◆ writeObject() [10/18]

template<class JElement_t , class JComparator_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const std::set< JElement_t, JComparator_t, JAllocator_t > & object,
const char postfix )
inline

Template specialisation of method writeObject() for std::set.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 300 of file JStreamToolkit.hh.

304 {
305 for (typename std::set<JElement_t, JComparator_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
306 writeObject(out, prefix, *i, postfix);
307 }
308
309 return out;
310 }

◆ readObject() [6/9]

template<class JElement_t , class JComparator_t , class JAllocator_t >
std::istream & JEEP::readObject ( std::istream & in,
std::multiset< JElement_t, JComparator_t, JAllocator_t > & object )
inline

Template specialisation of method readObject() for std::multiset.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 321 of file JStreamToolkit.hh.

322 {
323 for (JElement_t element; readObject(in, element); ) {
324 object.insert(element);
325 }
326
327 return in;
328 }

◆ writeObject() [11/18]

template<class JElement_t , class JComparator_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const std::multiset< JElement_t, JComparator_t, JAllocator_t > & object )
inline

Template specialisation of method writeObject() for std::multiset.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 339 of file JStreamToolkit.hh.

340 {
341 for (typename std::multiset<JElement_t, JComparator_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
342 writeObject(out, ' ');
343 writeObject(out, *i);
344 }
345
346 return out;
347 }

◆ writeObject() [12/18]

template<class JElement_t , class JComparator_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const std::multiset< JElement_t, JComparator_t, JAllocator_t > & object,
const char postfix )
inline

Template specialisation of method writeObject() for std::multiset.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 360 of file JStreamToolkit.hh.

364 {
365 for (typename std::multiset<JElement_t, JComparator_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
366 writeObject(out, prefix, *i, postfix);
367 }
368
369 return out;
370 }

◆ readObject() [7/9]

template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::istream & JEEP::readObject ( std::istream & in,
std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > & object )
inline

Template specialisation of method readObject() for std::map.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 381 of file JStreamToolkit.hh.

382 {
383 for (std::pair<JKey_t, JValue_t> element; readObject(in, element); ) {
384
386
387 if (!result.second) {
388 result.first->second = element.second;
389 }
390 }
391
392 return in;
393 }

◆ writeObject() [13/18]

template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > & object )
inline

Template specialisation of method writeObject() for std::map.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 404 of file JStreamToolkit.hh.

405 {
406 for (typename std::map<JKey_t, JValue_t, JComparator_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
407 writeObject(out, ' ');
408 writeObject(out, *i);
409 }
410
411 return out;
412 }

◆ writeObject() [14/18]

template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > & object,
const char postfix )
inline

Template specialisation of method writeObject() for std::map.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 425 of file JStreamToolkit.hh.

429 {
430 for (typename std::map<JKey_t, JValue_t, JComparator_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
431 writeObject(out, prefix, *i, postfix);
432 }
433
434 return out;
435 }

◆ readObject() [8/9]

template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::istream & JEEP::readObject ( std::istream & in,
std::multimap< JKey_t, JValue_t, JComparator_t, JAllocator_t > & object )
inline

Template specialisation of method readObject() for std::multimap.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 446 of file JStreamToolkit.hh.

447 {
448 for (std::pair<JKey_t, JValue_t> element; readObject(in, element); ) {
449 object.insert(element);
450 }
451
452 return in;
453 }

◆ writeObject() [15/18]

template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const std::multimap< JKey_t, JValue_t, JComparator_t, JAllocator_t > & object )
inline

Template specialisation of method writeObject() for std::multimap.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 464 of file JStreamToolkit.hh.

465 {
466 for (typename std::multimap<JKey_t, JValue_t, JComparator_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
467 writeObject(out, ' ');
468 writeObject(out, *i);
469 }
470
471 return out;
472 }

◆ writeObject() [16/18]

template<class JKey_t , class JValue_t , class JComparator_t , class JAllocator_t >
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const std::multimap< JKey_t, JValue_t, JComparator_t, JAllocator_t > & object,
const char postfix )
inline

Template specialisation of method writeObject() for std::multimap.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 485 of file JStreamToolkit.hh.

489 {
490 for (typename std::multimap<JKey_t, JValue_t, JComparator_t, JAllocator_t>::const_iterator i = object.begin(); i != object.end(); ++i) {
491 writeObject(out, prefix, *i, postfix);
492 }
493
494 return out;
495 }

◆ readObject() [9/9]

template<class JElement_t , std::size_t N>
std::istream & JEEP::readObject ( std::istream & in,
std::array< JElement_t, N > & object )
inline

Template specialisation of method readObject() for std::array.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 506 of file JStreamToolkit.hh.

507 {
508 for (size_t i = 0; i != N; ++i) {
509 readObject(in, object[i]);
510 }
511
512 return in;
513 }

◆ writeObject() [17/18]

template<class JElement_t , std::size_t N>
std::ostream & JEEP::writeObject ( std::ostream & out,
const std::array< JElement_t, N > & object )
inline

Template specialisation of method writeObject() for std::array.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 524 of file JStreamToolkit.hh.

525 {
526 for (size_t i = 0; i != N; ++i) {
527 writeObject(out, ' ');
528 writeObject(out, object[i]);
529 }
530
531 return out;
532 }

◆ writeObject() [18/18]

template<class JElement_t , std::size_t N>
std::ostream & JEEP::writeObject ( std::ostream & out,
const char * prefix,
const std::array< JElement_t, N > & object,
const char postfix )
inline

Template specialisation of method writeObject() for std::array.

Parameters
outoutput stream
prefixprefix
objectobject
postfixpostfix
Returns
output stream

Definition at line 545 of file JStreamToolkit.hh.

549 {
550 for (size_t i = 0; i != N; ++i) {
551 writeObject(out, prefix, object[i], postfix);
552 }
553
554 return out;
555 }

◆ writeArray()

template<class T >
std::ostream & JEEP::writeArray ( std::ostream & out,
const char * left,
const char * right,
const char * sep,
T __begin,
T __end )
inline

Write array of objects.

Parameters
outoutput stream
leftleft bracket
rightright bracket
sepseparator
__beginbegin of data
__endend of data
Returns
output stream

Definition at line 570 of file JStreamToolkit.hh.

576 {
577 if (std::distance(__begin, __end) != 0) {
578
579 out << left;
580
581 T i = __begin;
582
583 writeObject(out, *i);
584
585 while (++i != __end) {
586
587 out << sep;
588
589 writeObject(out, *i);
590 }
591
592 out << right;
593 }
594
595 return out;
596 }

Variable Documentation

◆ LD_LIBRARY_PATH

const char* const JEEP::LD_LIBRARY_PATH = "LD_LIBRARY_PATH"
static

Nick names of environment variables.

library file paths

Definition at line 34 of file JeepToolkit.hh.

◆ PATH

const char* const JEEP::PATH = "PATH"
static

binary file paths

Definition at line 35 of file JeepToolkit.hh.

◆ SHELL

const char* const JEEP::SHELL = "SHELL"
static

SHELL.

Definition at line 36 of file JeepToolkit.hh.

◆ JPP_PAGES

const char* const JEEP::JPP_PAGES = "JPP_PAGES"
static

Jpp document pages.

Definition at line 37 of file JeepToolkit.hh.

◆ PATHNAME_SEPARATOR

const char JEEP::PATHNAME_SEPARATOR = '/'
static

path name separator

Definition at line 39 of file JeepToolkit.hh.

◆ PATHLIST_SEPARATOR

const char JEEP::PATHLIST_SEPARATOR = ':'
static

path list separator

Definition at line 40 of file JeepToolkit.hh.

◆ FILENAME_SEPARATOR

const char JEEP::FILENAME_SEPARATOR = '.'
static

file name separator

Definition at line 41 of file JeepToolkit.hh.

◆ TYPENAME_SEPARATOR

const char* const JEEP::TYPENAME_SEPARATOR = "::"
static

type name separator

Definition at line 42 of file JeepToolkit.hh.

◆ PROTOCOL_SEPARATOR

const char JEEP::PROTOCOL_SEPARATOR = ':'
static

protocol separator

Definition at line 43 of file JeepToolkit.hh.

◆ FILENAME_WILDCARD

const char JEEP::FILENAME_WILDCARD = '%'
static

wild card character for file name substitution

Definition at line 44 of file JeepToolkit.hh.