Geant4.10
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions
CexmcSimpleRangeWithValue.hh File Reference
#include <vector>
#include <iosfwd>
#include <G4Types.hh>

Go to the source code of this file.

Data Structures

struct  CexmcSimpleRangeWithValue< RangeCategory, ValueCategory >
 

Typedefs

typedef
CexmcSimpleRangeWithValue
< CexmcEnergyValueCategory
CexmcEnergyRangeWithDoubleValue
 
typedef std::vector
< CexmcEnergyRangeWithDoubleValue
CexmcEnergyRangeWithDoubleValueList
 

Enumerations

enum  CexmcValueCategory { CexmcPlainValueCategory, CexmcEnergyValueCategory }
 

Functions

template<CexmcValueCategory RangeCategory, CexmcValueCategory ValueCategory>
bool operator< (const CexmcSimpleRangeWithValue< RangeCategory, ValueCategory > &left, const CexmcSimpleRangeWithValue< RangeCategory, ValueCategory > &right)
 
std::ostream & operator<< (std::ostream &out, const CexmcEnergyRangeWithDoubleValue &range)
 
std::ostream & operator<< (std::ostream &out, const CexmcEnergyRangeWithDoubleValueList &range)
 

Typedef Documentation

Definition at line 111 of file CexmcSimpleRangeWithValue.hh.

Definition at line 114 of file CexmcSimpleRangeWithValue.hh.

Enumeration Type Documentation

Enumerator
CexmcPlainValueCategory 
CexmcEnergyValueCategory 

Definition at line 52 of file CexmcSimpleRangeWithValue.hh.

Function Documentation

template<CexmcValueCategory RangeCategory, CexmcValueCategory ValueCategory>
bool operator< ( const CexmcSimpleRangeWithValue< RangeCategory, ValueCategory > &  left,
const CexmcSimpleRangeWithValue< RangeCategory, ValueCategory > &  right 
)
inline

Definition at line 97 of file CexmcSimpleRangeWithValue.hh.

References CexmcSimpleRangeWithValue< RangeCategory, ValueCategory >::bottom, and CexmcSimpleRangeWithValue< RangeCategory, ValueCategory >::top.

100 {
101  if ( left.bottom != right.bottom )
102  return left.bottom < right.bottom;
103  if ( left.top != right.top )
104  return left.top > right.top;
105 
106  return false;
107 }
std::ostream& operator<< ( std::ostream &  out,
const CexmcEnergyRangeWithDoubleValue range 
)

Definition at line 50 of file CexmcSimpleRangeWithValue.cc.

References CexmcSimpleRangeWithValue< RangeCategory, ValueCategory >::bottom, G4BestUnit, CexmcSimpleRangeWithValue< RangeCategory, ValueCategory >::top, and CexmcSimpleRangeWithValue< RangeCategory, ValueCategory >::value.

52 {
53  out << "[ " << std::setw( 3 ) << G4BestUnit( range.bottom, "Energy" ) <<
54  ", " << std::setw( 3 ) << G4BestUnit( range.top, "Energy" ) <<
55  " ) " << range.value;
56 
57  return out;
58 }
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::ostream& operator<< ( std::ostream &  out,
const CexmcEnergyRangeWithDoubleValueList range 
)

Definition at line 61 of file CexmcSimpleRangeWithValue.cc.

63 {
64  out << std::endl;
65  for ( CexmcEnergyRangeWithDoubleValueList::const_iterator
66  k( ranges.begin() ); k != ranges.end(); ++k )
67  {
68  out << " " << *k << std::endl;
69  }
70 
71  return out;
72 }