Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JAANET::detector Struct Reference

Detector file. More...

#include <JHead.hh>

Public Member Functions

 detector ()
 Default constructor.
 
bool match (const detector &object) const
 Test match.
 
 ClassDefNV (detector, 1)
 

Public Attributes

std::string program
 
std::string filename
 

Friends

std::istream & operator>> (std::istream &in, detector &object)
 Read detector from input stream.
 
std::ostream & operator<< (std::ostream &out, const detector &object)
 Write detector to output stream.
 

Detailed Description

Detector file.

Definition at line 226 of file JHead.hh.

Constructor & Destructor Documentation

◆ detector()

JAANET::detector::detector ( )
inline

Default constructor.

Definition at line 231 of file JHead.hh.

232 {}

Member Function Documentation

◆ match()

bool JAANET::detector::match ( const detector & object) const
inline

Test match.

Parameters
objectdetector
Returns
true if matches; else false

Definition at line 240 of file JHead.hh.

241 {
242 return this->program == object.program && this->filename == object.filename;
243 }
std::string program
Definition JHead.hh:278
std::string filename
Definition JHead.hh:279

◆ ClassDefNV()

JAANET::detector::ClassDefNV ( detector ,
1  )

Friends And Related Symbol Documentation

◆ operator>>

std::istream & operator>> ( std::istream & in,
detector & object )
friend

Read detector from input stream.

Parameters
ininput stream
objectdetector
Returns
input stream

Definition at line 252 of file JHead.hh.

253 {
254 using namespace JPP;
255
256 in >> object.program >> object.filename;
257
258 if (!in || is_integer(object.filename)) { // legacy
259 object.filename = object.program;
260 object.program = "?";
261 }
262
263 return in;
264 }
bool is_integer(const std::string &buffer)
Check if string is an integer.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const detector & object )
friend

Write detector to output stream.

Parameters
outoutput stream
objectdetector
Returns
output stream

Definition at line 273 of file JHead.hh.

274 {
275 return out << object.program << ' ' << object.filename;
276 }

Member Data Documentation

◆ program

std::string JAANET::detector::program

Definition at line 278 of file JHead.hh.

◆ filename

std::string JAANET::detector::filename

Definition at line 279 of file JHead.hh.


The documentation for this struct was generated from the following file: