Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
JROOT::data_type< T > Struct Template Reference

Template definition of data structure for set of data points. More...

#include <JRootfit.hh>

Public Member Functions

template<>
void unpack (const TH1 &h1, const range_type &X)
 
template<>
void unpack (const TH1 &h1, const range_type &X)
 
template<>
void unpack (const TH2 &h2, const range_type &X, const range_type &Y)
 
template<>
void unpack (const TH2 &h2, const range_type &X, const range_type &Y)
 
template<>
void unpack (const TH3 &h3, const range_type &X, const range_type &Y, const range_type &Z)
 
template<>
void unpack (const TH3 &h3, const range_type &X, const range_type &Y, const range_type &Z)
 

Detailed Description

template<class T>
struct JROOT::data_type< T >

Template definition of data structure for set of data points.

Definition at line 292 of file JRootfit.hh.

Member Function Documentation

template<>
void JROOT::data_type< m_1d< m_count > >::unpack ( const TH1 &  h1,
const range_type X 
)
Parameters
h1histogram
Xabscissa range

Definition at line 340 of file JRootfit.hh.

342  {
343  for (Int_t ix = 1; ix <= h1.GetXaxis()->GetNbins(); ++ix) {
344 
345  const double x = h1.GetXaxis()->GetBinCenter(ix);
346  const size_t count = h1.GetBinContent(ix);
347 
348  if (X(x)) {
349  this->push_back(m_1d<m_count>(x, count));
350  }
351  }
352  }
then usage $script< input file >[option] nPossible options count
Definition: JVolume1D.sh:31
1D data point.
Definition: JRootfit.hh:187
no fit printf nominal n $STRING awk v X
template<>
void JROOT::data_type< m_1d< m_value > >::unpack ( const TH1 &  h1,
const range_type X 
)
Parameters
h1histogram
Xabscissa range

Definition at line 362 of file JRootfit.hh.

364  {
365  for (Int_t ix = 1; ix <= h1.GetXaxis()->GetNbins(); ++ix) {
366 
367  const double x = h1.GetXaxis()->GetBinCenter(ix);
368  const double value = h1.GetBinContent(ix);
369  const double error = h1.GetBinError (ix);
370 
371  if (X(x) && error > 0.0) {
372  this->push_back(m_1d<m_value>(x, m_value(value, error)));
373  }
374  }
375  }
1D data point.
Definition: JRootfit.hh:187
no fit printf nominal n $STRING awk v X
Data point for value with error.
Definition: JRootfit.hh:127
template<>
void JROOT::data_type< m_2d< m_count > >::unpack ( const TH2 &  h2,
const range_type X,
const range_type Y 
)
Parameters
h2histogram
Xabscissa range
Yabscissa range

Definition at line 428 of file JRootfit.hh.

431  {
432  for (Int_t ix = 1; ix <= h2.GetXaxis()->GetNbins(); ++ix) {
433  for (Int_t iy = 1; iy <= h2.GetYaxis()->GetNbins(); ++iy) {
434 
435  const double x = h2.GetXaxis()->GetBinCenter(ix);
436  const double y = h2.GetYaxis()->GetBinCenter(iy);
437  const size_t count = h2.GetBinContent(ix,iy);
438 
439  if (X(x) && Y(y)) {
440  this->push_back(m_2d<m_count>(x, y, count));
441  }
442  }
443  }
444  }
then usage $script< input file >[option] nPossible options count
Definition: JVolume1D.sh:31
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
2D data point.
Definition: JRootfit.hh:218
no fit printf nominal n $STRING awk v X
template<>
void JROOT::data_type< m_2d< m_value > >::unpack ( const TH2 &  h2,
const range_type X,
const range_type Y 
)
Parameters
h2histogram
Xabscissa range
Yabscissa range

Definition at line 455 of file JRootfit.hh.

458  {
459  for (Int_t ix = 1; ix <= h2.GetXaxis()->GetNbins(); ++ix) {
460  for (Int_t iy = 1; iy <= h2.GetYaxis()->GetNbins(); ++iy) {
461 
462  const double x = h2.GetXaxis()->GetBinCenter(ix);
463  const double y = h2.GetYaxis()->GetBinCenter(iy);
464  const double value = h2.GetBinContent(ix,iy);
465  const double error = h2.GetBinError (ix,iy);
466 
467  if (X(x) && Y(y) && error > 0.0) {
468  this->push_back(m_2d<m_value>(x, y, m_value(value, error)));
469  }
470  }
471  }
472  }
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
2D data point.
Definition: JRootfit.hh:218
no fit printf nominal n $STRING awk v X
Data point for value with error.
Definition: JRootfit.hh:127
template<>
void JROOT::data_type< m_3d< m_count > >::unpack ( const TH3 &  h3,
const range_type X,
const range_type Y,
const range_type Z 
)
Parameters
h3histogram
Xabscissa range
Yabscissa range
Zabscissa range

Definition at line 530 of file JRootfit.hh.

534  {
535  for (Int_t ix = 1; ix <= h3.GetXaxis()->GetNbins(); ++ix) {
536  for (Int_t iy = 1; iy <= h3.GetYaxis()->GetNbins(); ++iy) {
537  for (Int_t iz = 1; iz <= h3.GetZaxis()->GetNbins(); ++iz) {
538 
539  const double x = h3.GetXaxis()->GetBinCenter(ix);
540  const double y = h3.GetYaxis()->GetBinCenter(iy);
541  const double z = h3.GetZaxis()->GetBinCenter(iz);
542  const size_t count = h3.GetBinContent(ix,iy,iz);
543 
544  if (X(x) && Y(y) && Z(z)) {
545  this->push_back(m_3d<m_count>(x, y, z, count));
546  }
547  }
548  }
549  }
550  }
then usage $script< input file >[option] nPossible options count
Definition: JVolume1D.sh:31
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
Definition: JDrawPDF.sh:45
no fit printf nominal n $STRING awk v X
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
3D data point.
Definition: JRootfit.hh:253
template<>
void JROOT::data_type< m_3d< m_value > >::unpack ( const TH3 &  h3,
const range_type X,
const range_type Y,
const range_type Z 
)
Parameters
h3histogram
Xabscissa range
Yabscissa range
Zabscissa range

Definition at line 562 of file JRootfit.hh.

566  {
567  for (Int_t ix = 1; ix <= h3.GetXaxis()->GetNbins(); ++ix) {
568  for (Int_t iy = 1; iy <= h3.GetYaxis()->GetNbins(); ++iy) {
569  for (Int_t iz = 1; iz <= h3.GetZaxis()->GetNbins(); ++iz) {
570 
571  const double x = h3.GetXaxis()->GetBinCenter(ix);
572  const double y = h3.GetYaxis()->GetBinCenter(iy);
573  const double z = h3.GetZaxis()->GetBinCenter(iz);
574  const double value = h3.GetBinContent(ix,iy,iz);
575  const double error = h3.GetBinError (ix,iy,iz);
576 
577  if (X(x) && Y(y) && Z(z) && error > 0.0) {
578  this->push_back(m_3d<m_value>(x, y, z, m_value(value, error)));
579  }
580  }
581  }
582  }
583  }
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
Definition: JDrawPDF.sh:45
no fit printf nominal n $STRING awk v X
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
Data point for value with error.
Definition: JRootfit.hh:127
3D data point.
Definition: JRootfit.hh:253

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