Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CexmcSimpleRangeWithValue.hh File Reference
#include <vector>
#include <iosfwd>
#include <G4Types.hh>
Include dependency graph for CexmcSimpleRangeWithValue.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

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.

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.

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 }