Jpp  debug
the software that should make you happy
Public Member Functions | Public Attributes | List of all members
JDETECTOR::JDetectorParameters Class Reference

Data structure for parameters for detector geometry. More...

#include <JDetectorParameters.hh>

Inheritance diagram for JDETECTOR::JDetectorParameters:
JLANG::JComparable< JFirst_t, JSecond_t >

Public Member Functions

 JDetectorParameters ()
 Default constructor. More...
 
const bool isDefined () const
 Get status of parameters. More...
 
bool less (const JDetectorParameters &detector) const
 Compare detector parameters. More...
 

Public Attributes

JParameter< int > detectorType
 
JParameter< double > floorDistance_m
 
JParameter< unsigned int > numberOfFloors
 
JParameter< double > lineDistance_m
 
JParameter< unsigned int > numberOfLines
 

Detailed Description

Data structure for parameters for detector geometry.

Definition at line 27 of file JDetectorParameters.hh.

Constructor & Destructor Documentation

◆ JDetectorParameters()

JDETECTOR::JDetectorParameters::JDetectorParameters ( )
inline

Default constructor.

Definition at line 34 of file JDetectorParameters.hh.

34  :
35  detectorType (),
37  numberOfFloors (),
38  lineDistance_m (),
39  numberOfLines ()
40  {}
JParameter< unsigned int > numberOfLines
JParameter< double > floorDistance_m
JParameter< unsigned int > numberOfFloors

Member Function Documentation

◆ isDefined()

const bool JDETECTOR::JDetectorParameters::isDefined ( ) const
inline

Get status of parameters.

Returns
true if all parameters have been defined; else false

Definition at line 55 of file JDetectorParameters.hh.

56  {
57  return (detectorType .isDefined() &&
62  }
const bool isDefined() const
Get status of parameters.
const bool isDefined() const
Get status of parameter.
Definition: JParameter.hh:116

◆ less()

bool JDETECTOR::JDetectorParameters::less ( const JDetectorParameters detector) const
inline

Compare detector parameters.

The hierarchy is: 1) detector type; 2) number of lines; 3) number of floors; 4) line distance; 5) floor distance;

Parameters
detectordetector parameters
Returns
true is first is less than second; else false

Definition at line 78 of file JDetectorParameters.hh.

79  {
80  if (detectorType == detector.detectorType)
81  if (numberOfLines == detector.numberOfLines)
82  if (numberOfFloors == detector.numberOfFloors)
83  if (lineDistance_m == detector.lineDistance_m)
84  return floorDistance_m < detector.floorDistance_m;
85  else
86  return lineDistance_m < detector.lineDistance_m;
87  else
88  return numberOfFloors < detector.numberOfFloors;
89  else
90  return numberOfLines < detector.numberOfLines;
91  else
92  return detectorType < detector.detectorType;
93  }

Member Data Documentation

◆ detectorType

JParameter<int> JDETECTOR::JDetectorParameters::detectorType

Definition at line 43 of file JDetectorParameters.hh.

◆ floorDistance_m

JParameter<double> JDETECTOR::JDetectorParameters::floorDistance_m

Definition at line 44 of file JDetectorParameters.hh.

◆ numberOfFloors

JParameter<unsigned int> JDETECTOR::JDetectorParameters::numberOfFloors

Definition at line 45 of file JDetectorParameters.hh.

◆ lineDistance_m

JParameter<double> JDETECTOR::JDetectorParameters::lineDistance_m

Definition at line 46 of file JDetectorParameters.hh.

◆ numberOfLines

JParameter<unsigned int> JDETECTOR::JDetectorParameters::numberOfLines

Definition at line 47 of file JDetectorParameters.hh.


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