Template specialisation of JDAQFileReader for DAQ compatible data types.
More...
#include <JDAQFileReader.hh>
|
| static void | Throw (const bool option) |
| | Enable/disable throw option.
|
| |
| static int | Throw (const JException_t &error, const int value=-1) |
| | Throw exception or return error.
|
| |
template<
class T>
class JSUPPORT::JDAQFileReader< T, true >
Template specialisation of JDAQFileReader for DAQ compatible data types.
This class provides for an implementation of the JLANG::JAccessibleObjectIterator interface.
The method JLANG::JAbstractObjectIterator::setObject is overwritten so that the desired object is read from the file which may contain also other objects.
Definition at line 52 of file JDAQFileReader.hh.
◆ pointer_type
◆ JDAQFileReader()
Default constructor.
Definition at line 62 of file JDAQFileReader.hh.
62 :
66 {}
Binary input based on std::istream.
JStreamReader(std::istream &__in)
Constructor.
Template definition of a multi-dimensional oscillation probability interpolation table.
◆ setObject()
Set object.
- Parameters
-
| object | reference to object to be set |
- Returns
- true if set; else false
Reimplemented from JIO::JReaderObjectIterator< T >.
Definition at line 75 of file JDAQFileReader.hh.
76 {
80
82
84
86
87 return false;
88
90
92
94
97
99
101
103
104 } else {
105
107 }
108 }
109
110 return false;
111 }
std::vector< char > buffer
Simple data structure for the DAQ preamble required for a correct calculation of the object size for ...
int getDataType() const
Get data type.
int getLength() const
Get length.
Auxiliary classes and methods for binary I/O.
KM3NeT DAQ data structures and auxiliaries.
◆ open()
| virtual void JLANG::JAccessibleBinaryInputStream::open |
( |
const char * | file_name | ) |
|
|
inlineoverridevirtualinherited |
◆ is_open()
| virtual bool JLANG::JAccessibleInputStream::is_open |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ close()
| virtual void JLANG::JAccessibleInputStream::close |
( |
| ) |
|
|
inlinevirtualinherited |
◆ Throw() [1/2]
Enable/disable throw option.
- Parameters
-
| option | true enable; false disable |
Definition at line 37 of file JThrow.hh.
◆ Throw() [2/2]
Throw exception or return error.
- Parameters
-
| error | exception |
| value | return code |
- Returns
- return code
Definition at line 51 of file JThrow.hh.
◆ getStatus()
| virtual bool JIO::JStreamReader::getStatus |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ clear()
| virtual void JIO::JStreamReader::clear |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ read()
| virtual int JIO::JStreamReader::read |
( |
char * | buffer, |
|
|
const int | length ) |
|
inlineoverridevirtualinherited |
Read byte array.
- Parameters
-
| buffer | pointer to byte array |
| length | number of bytes |
- Returns
- number of bytes read
Implements JLANG::JBinaryInput.
Definition at line 65 of file JStreamIO.hh.
66 {
67 in.read(buffer, length);
68
70 }
◆ operator>>() [1/17]
Read serialisable data object.
- Parameters
-
| object | serialisable data object |
- Returns
- JReader
Definition at line 82 of file JSerialisable.hh.
83 {
84 return object.read(*this);
85 }
◆ operator>>() [2/17]
| JReader & JIO::JReader::operator>> |
( |
bool & | value | ) |
|
|
inlineinherited |
◆ operator>>() [3/17]
| JReader & JIO::JReader::operator>> |
( |
char & | value | ) |
|
|
inlineinherited |
◆ operator>>() [4/17]
| JReader & JIO::JReader::operator>> |
( |
unsigned char & | value | ) |
|
|
inlineinherited |
Definition at line 90 of file JSerialisable.hh.
90{
read((
char*) &value,
sizeof(
unsigned char));
return *
this; }
◆ operator>>() [5/17]
| JReader & JIO::JReader::operator>> |
( |
short & | value | ) |
|
|
inlineinherited |
◆ operator>>() [6/17]
| JReader & JIO::JReader::operator>> |
( |
unsigned short & | value | ) |
|
|
inlineinherited |
Definition at line 92 of file JSerialisable.hh.
92{
read((
char*) &value,
sizeof(
unsigned short));
return *
this; }
◆ operator>>() [7/17]
| JReader & JIO::JReader::operator>> |
( |
int & | value | ) |
|
|
inlineinherited |
◆ operator>>() [8/17]
| JReader & JIO::JReader::operator>> |
( |
unsigned int & | value | ) |
|
|
inlineinherited |
Definition at line 94 of file JSerialisable.hh.
94{
read((
char*) &value,
sizeof(
unsigned int));
return *
this; }
◆ operator>>() [9/17]
| JReader & JIO::JReader::operator>> |
( |
long int & | value | ) |
|
|
inlineinherited |
◆ operator>>() [10/17]
| JReader & JIO::JReader::operator>> |
( |
unsigned long int & | value | ) |
|
|
inlineinherited |
Definition at line 96 of file JSerialisable.hh.
96{
read((
char*) &value,
sizeof(
unsigned long int));
return *
this; }
◆ operator>>() [11/17]
| JReader & JIO::JReader::operator>> |
( |
long long int & | value | ) |
|
|
inlineinherited |
Definition at line 97 of file JSerialisable.hh.
97{
read((
char*) &value,
sizeof(
long long int));
return *
this; }
◆ operator>>() [12/17]
| JReader & JIO::JReader::operator>> |
( |
unsigned long long int & | value | ) |
|
|
inlineinherited |
Definition at line 98 of file JSerialisable.hh.
98{
read((
char*) &value,
sizeof(
unsigned long long int));
return *
this; }
◆ operator>>() [13/17]
| JReader & JIO::JReader::operator>> |
( |
float & | value | ) |
|
|
inlineinherited |
◆ operator>>() [14/17]
| JReader & JIO::JReader::operator>> |
( |
double & | value | ) |
|
|
inlineinherited |
◆ operator>>() [15/17]
| JReader & JIO::JReader::operator>> |
( |
long double & | value | ) |
|
|
inlineinherited |
◆ operator>>() [16/17]
Definition at line 102 of file JSerialisable.hh.
102{
return (*
this) >> value.
getID(); }
int getID() const
Get identifier.
◆ operator>>() [17/17]
Definition at line 103 of file JSerialisable.hh.
status_type getStatus(const JType< status_type > &type) const
Get status.
◆ load() [1/2]
Read object.
- Parameters
-
- Returns
- this reader
Definition at line 112 of file JSerialisable.hh.
113 {
114 return object.read(*this);
115 }
◆ load() [2/2]
template<class T >
| JReader & JIO::JReader::load |
( |
T & | object | ) |
|
|
inlineinherited |
Read object.
- Parameters
-
- Returns
- this reader
Definition at line 125 of file JSerialisable.hh.
126 {
127 return *this >> object;
128 }
◆ operator bool()
| JLANG::JAbstractObjectStatus::operator bool |
( |
| ) |
const |
|
inlineinherited |
Type conversion operator.
- Returns
- status of this object
Definition at line 33 of file JAbstractObjectStatus.hh.
34 {
36 }
virtual bool getStatus() const =0
Get status of object.
◆ operator!()
| bool JLANG::JAbstractObjectStatus::operator! |
( |
| ) |
const |
|
inlineinherited |
◆ hasNext()
template<class T >
|
|
inlineoverridevirtualinherited |
◆ next()
template<class T >
|
|
inlineoverridevirtualinherited |
◆ skip()
◆ preamble
◆ buffer
◆ do_throw
throw option
Set default throw option to true.
Definition at line 28 of file JThrow.hh.
◆ in
| std::istream& JIO::JStreamReader::in |
|
protectedinherited |
◆ object
◆ has_next
◆ ps
The documentation for this class was generated from the following file: