inlib  1.2.0
Public Types | Public Member Functions | Protected Types | Protected Member Functions
inlib::histo::b1< TC, TN, TW, TH > Class Template Reference
Inheritance diagram for inlib::histo::b1< TC, TN, TW, TH >:
Inheritance graph
[legend]
Collaboration diagram for inlib::histo::b1< TC, TN, TW, TH >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef base_histo< TC, TN, TW,
TH >::bn_t 
bn_t

Public Member Functions

virtual TH bin_error (int) const =0
void update_fast_getters ()
int coord_to_index (TC aCoord) const
TC mean () const
TC rms () const
TN bin_entries (int aI) const
TW bin_Sw (int aI) const
TW bin_Sw2 (int aI) const
TC bin_Sxw (int aI) const
TC bin_Sx2w (int aI) const
TH bin_height (int aI) const
TC bin_center (int aI) const
TC bin_mean (int aI) const
TC bin_rms (int aI) const
const histo::axis< TC > & axis () const
histo::axis< TC > & axis ()
void hprint (std::ostream &a_out)

Protected Types

enum  { AxisX = 0 }

Protected Member Functions

 b1 (const std::string &a_title, bn_t aXnumber, TC aXmin, TC aXmax)
 b1 (const std::string &a_title, const std::vector< TC > &aEdges)
virtual ~b1 ()
 b1 (const b1 &a_from)
b1operator= (const b1 &a_from)

Detailed Description

template<class TC, class TN, class TW, class TH>
class inlib::histo::b1< TC, TN, TW, TH >

Definition at line 15 of file b1.


Member Typedef Documentation

template<class TC, class TN, class TW, class TH>
typedef base_histo<TC,TN,TW,TH>::bn_t inlib::histo::b1< TC, TN, TW, TH >::bn_t

Member Enumeration Documentation

template<class TC, class TN, class TW, class TH>
anonymous enum [protected]
Enumerator:
AxisX 

Definition at line 18 of file b1.

{AxisX=0};

Constructor & Destructor Documentation

template<class TC, class TN, class TW, class TH>
inlib::histo::b1< TC, TN, TW, TH >::b1 ( const std::string &  a_title,
bn_t  aXnumber,
TC  aXmin,
TC  aXmax 
) [inline, protected]

Definition at line 153 of file b1.

                                             {
    parent::m_title = a_title;
    std::vector<bn_t> ns;
    ns.push_back(aXnumber);
    std::vector<TC> mins;
    mins.push_back(aXmin);
    std::vector<TC> maxs;
    maxs.push_back(aXmax);
    configure(1,ns,mins,maxs);
  }
template<class TC, class TN, class TW, class TH>
inlib::histo::b1< TC, TN, TW, TH >::b1 ( const std::string &  a_title,
const std::vector< TC > &  aEdges 
) [inline, protected]

Definition at line 164 of file b1.

                                                           {
    parent::m_title = a_title;
    std::vector< std::vector<TC> > edges(1);
    edges[0] = aEdges;
    configure(1,edges);
  }
template<class TC, class TN, class TW, class TH>
virtual inlib::histo::b1< TC, TN, TW, TH >::~b1 ( ) [inline, protected, virtual]

Definition at line 171 of file b1.

{}
template<class TC, class TN, class TW, class TH>
inlib::histo::b1< TC, TN, TW, TH >::b1 ( const b1< TC, TN, TW, TH > &  a_from) [inline, protected]

Definition at line 173 of file b1.

                      : parent(a_from) {
    update_fast_getters();
  }

Member Function Documentation

template<class TC, class TN, class TW, class TH>
const histo::axis<TC>& inlib::histo::b1< TC, TN, TW, TH >::axis ( ) const [inline]

Definition at line 106 of file b1.

{return parent::m_axes[0];}
template<class TC, class TN, class TW, class TH>
histo::axis<TC>& inlib::histo::b1< TC, TN, TW, TH >::axis ( ) [inline]

Definition at line 107 of file b1.

{return parent::m_axes[0];} //touchy
template<class TC, class TN, class TW, class TH>
TC inlib::histo::b1< TC, TN, TW, TH >::bin_center ( int  aI) const [inline]

Definition at line 82 of file b1.

{return parent::m_axes[0].bin_center(aI);}
template<class TC, class TN, class TW, class TH>
TN inlib::histo::b1< TC, TN, TW, TH >::bin_entries ( int  aI) const [inline]

Definition at line 42 of file b1.

                               {
    if(parent::m_bin_number==0) return 0;
    bn_t offset;
    if(!parent::m_axes[0].in_range_to_absolute_index(aI,offset)) return 0;
    return parent::m_bin_entries[offset];
  }
template<class TC, class TN, class TW, class TH>
virtual TH inlib::histo::b1< TC, TN, TW, TH >::bin_error ( int  ) const [pure virtual]
template<class TC, class TN, class TW, class TH>
TH inlib::histo::b1< TC, TN, TW, TH >::bin_height ( int  aI) const [inline]

Definition at line 75 of file b1.

                              {
    if(parent::m_bin_number==0) return 0;
    bn_t offset;
    if(!parent::m_axes[0].in_range_to_absolute_index(aI,offset)) return 0;
    return this->get_bin_height(offset);
  }
template<class TC, class TN, class TW, class TH>
TC inlib::histo::b1< TC, TN, TW, TH >::bin_mean ( int  aI) const [inline]

Definition at line 84 of file b1.

                            {
    if(parent::m_bin_number==0) return 0;
    bn_t offset;
    if(!parent::m_axes[0].in_range_to_absolute_index(aI,offset)) return 0;
    TW sw = parent::m_bin_Sw[offset];
    if(sw==0) return 0;
    return parent::m_bin_Sxw[offset][AxisX]/sw;
  }
template<class TC, class TN, class TW, class TH>
TC inlib::histo::b1< TC, TN, TW, TH >::bin_rms ( int  aI) const [inline]

Definition at line 93 of file b1.

                           {
    if(parent::m_bin_number==0) return 0;
    bn_t offset;
    if(!parent::m_axes[0].in_range_to_absolute_index(aI,offset)) return 0;
    TW sw = parent::m_bin_Sw[offset];
    if(sw==0) return 0;
    TC sxw = parent::m_bin_Sxw[offset][AxisX];
    TC sx2w = parent::m_bin_Sx2w[offset][AxisX];
    TC mean = sxw/sw;
    return ::sqrt(::fabs((sx2w / sw) - mean * mean));
  }
template<class TC, class TN, class TW, class TH>
TW inlib::histo::b1< TC, TN, TW, TH >::bin_Sw ( int  aI) const [inline]

Definition at line 49 of file b1.

                          {
    if(parent::m_bin_number==0) return 0;
    bn_t offset;
    if(!parent::m_axes[0].in_range_to_absolute_index(aI,offset)) return 0;
    return parent::m_bin_Sw(offset);
  }
template<class TC, class TN, class TW, class TH>
TW inlib::histo::b1< TC, TN, TW, TH >::bin_Sw2 ( int  aI) const [inline]

Definition at line 56 of file b1.

                           {
    if(parent::m_bin_number==0) return 0;
    bn_t offset;
    if(!parent::m_axes[0].in_range_to_absolute_index(aI,offset)) return 0;
    return parent::m_bin_Sw2(offset);
  }
template<class TC, class TN, class TW, class TH>
TC inlib::histo::b1< TC, TN, TW, TH >::bin_Sx2w ( int  aI) const [inline]

Definition at line 68 of file b1.

                            {
    if(parent::m_bin_number==0) return 0;
    bn_t offset;
    if(!parent::m_axes[0].in_range_to_absolute_index(aI,offset)) return 0;
    return parent::m_bin_Sx2w[offset][AxisX];
  }
template<class TC, class TN, class TW, class TH>
TC inlib::histo::b1< TC, TN, TW, TH >::bin_Sxw ( int  aI) const [inline]

Definition at line 62 of file b1.

                           {
    if(parent::m_bin_number==0) return 0;
    bn_t offset;
    if(!parent::m_axes[0].in_range_to_absolute_index(aI,offset)) return 0;
    return parent::m_bin_Sxw[offset][AxisX];
  }
template<class TC, class TN, class TW, class TH>
int inlib::histo::b1< TC, TN, TW, TH >::coord_to_index ( TC  aCoord) const [inline]

Definition at line 27 of file b1.

                                      {
    return axis().coord_to_index(aCoord);
  }
template<class TC, class TN, class TW, class TH>
void inlib::histo::b1< TC, TN, TW, TH >::hprint ( std::ostream &  a_out) [inline]

Definition at line 110 of file b1.

                                 {
    // A la HPRINT.
    a_out << parent::dimension() << parent::title() << std::endl;
    a_out 
      << " * ENTRIES = " << parent::all_entries()
      << " * ALL CHANNELS = " << parent::sum_bin_heights()
      << " * UNDERFLOW = " << bin_height(histo::axis<TC>::UNDERFLOW_BIN)
      << " * OVERFLOW = " << bin_height(histo::axis<TC>::OVERFLOW_BIN)
      << std::endl;
    a_out 
      << " * BIN WID = " << axis().bin_width(0)
      << " * MEAN VALUE = " << mean()
      << " * R . M . S = " << rms()
      << std::endl;
  
    // Some bins :
    bn_t bins = axis().bins();
    a_out 
      << " * ENTRIES[0]   = " 
      << bin_entries(0)    
      << " * HEIGHT[0] = " 
      << bin_height(0)    
      << " * ERROR[0] = "     
      << bin_error(0)    
      << std::endl;
    a_out 
      << " * ENTRIES[N/2] = " 
      << bin_entries(bins/2)    
      << " * HEIGHT[N/2] = " 
      << bin_height(bins/2)
      << " * ERROR[N/2] = " 
      << bin_error(bins/2)
      << std::endl;
    a_out 
      << " * ENTRIES[N-1] = " 
      << bin_entries(bins-1)    
      << " * HEIGHT[N-1] = " 
      << bin_height(bins-1)
      << " * ERROR[N-1] = " 
      << bin_error(bins-1)
      << std::endl;
  }
template<class TC, class TN, class TW, class TH>
TC inlib::histo::b1< TC, TN, TW, TH >::mean ( ) const [inline]

Definition at line 30 of file b1.

                  {
    TC value;
    get_ith_axis_mean(AxisX,value); //can return false.
    return value;
  }
template<class TC, class TN, class TW, class TH>
b1& inlib::histo::b1< TC, TN, TW, TH >::operator= ( const b1< TC, TN, TW, TH > &  a_from) [inline, protected]

Definition at line 176 of file b1.

                                  {
    parent::operator=(a_from);
    update_fast_getters();
    return *this;
  }
template<class TC, class TN, class TW, class TH>
TC inlib::histo::b1< TC, TN, TW, TH >::rms ( ) const [inline]

Definition at line 35 of file b1.

                 {
    TC value;
    get_ith_axis_rms(AxisX,value); //can return false.
    return value;
  }
template<class TC, class TN, class TW, class TH>
void inlib::histo::b1< TC, TN, TW, TH >::update_fast_getters ( ) [inline]

Definition at line 24 of file b1.

{}

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines