Public Member Functions | Private Attributes | Friends | List of all members
Limits< T > Class Template Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-03-07/SuperNovaDDT/SliceSelector.h"

Public Member Functions

 Limits ()
 
 Limits (fhicl::ParameterSet const &p)
 
bool Contains (const T &v) const
 

Private Attributes

T fMin
 
T fMax
 
bool fHasMin = false
 
bool fHasMax = false
 

Friends

template<class U >
std::ostream & operator<< (std::ostream &s, const Limits< U > &lims)
 

Detailed Description

template<class T>
class Limits< T >

Definition at line 10 of file SliceSelector.h.

Constructor & Destructor Documentation

template<class T>
Limits< T >::Limits ( )
inline

Definition at line 12 of file SliceSelector.h.

12 :fHasMin(false),fHasMax(false){}
bool fHasMin
Definition: SliceSelector.h:34
bool fHasMax
Definition: SliceSelector.h:35
template<class T>
Limits< T >::Limits ( fhicl::ParameterSet const &  p)
inline

Definition at line 14 of file SliceSelector.h.

14  :
15  fHasMin(p.get_if_present<T>("min",fMin)),
16  fHasMax(p.get_if_present<T>("max",fMax))
17  {}
bool fHasMin
Definition: SliceSelector.h:34
const char * p
Definition: xmltok.h:285
double T
Definition: Xdiff_gwt.C:5
bool fHasMax
Definition: SliceSelector.h:35

Member Function Documentation

template<class T>
bool Limits< T >::Contains ( const T v) const
inline

Definition at line 18 of file SliceSelector.h.

18  {
19  return (!fHasMin || fMin<=v)&&(!fHasMax || v<=fMax);
20  }
bool fHasMin
Definition: SliceSelector.h:34
bool fHasMax
Definition: SliceSelector.h:35

Friends And Related Function Documentation

template<class T>
template<class U >
std::ostream& operator<< ( std::ostream &  s,
const Limits< U > &  lims 
)
friend

Definition at line 23 of file SliceSelector.h.

23  {
24  s<<"[";
25  if(lims.fHasMin) s<<lims.fMin<<"<";
26  s<<"x";
27  if(lims.fHasMax) s<<"<"<<lims.fMax;
28  s<<"]";
29  return s;
30  }
bool fHasMin
Definition: SliceSelector.h:34
const XML_Char * s
Definition: expat.h:262
bool fHasMax
Definition: SliceSelector.h:35

Member Data Documentation

template<class T>
bool Limits< T >::fHasMax = false
private

Definition at line 35 of file SliceSelector.h.

template<class T>
bool Limits< T >::fHasMin = false
private

Definition at line 34 of file SliceSelector.h.

template<class T>
T Limits< T >::fMax
private

Definition at line 33 of file SliceSelector.h.

template<class T>
T Limits< T >::fMin
private

Definition at line 33 of file SliceSelector.h.


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