Jpp  18.6.0-rc.1
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 291 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 339 of file JRootfit.hh.

341  {
342  for (Int_t ix = 1; ix <= h1.GetXaxis()->GetNbins(); ++ix) {
343 
344  const double x = h1.GetXaxis()->GetBinCenter(ix);
345  const size_t count = h1.GetBinContent(ix);
346 
347  if (X(x)) {
348  this->push_back(m_1d<m_count>(x, count));
349  }
350  }
351  }
then usage $script< input file >[option] nPossible options count
Definition: JVolume1D.sh:31
1D data point.
Definition: JRootfit.hh:186
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 361 of file JRootfit.hh.

363  {
364  for (Int_t ix = 1; ix <= h1.GetXaxis()->GetNbins(); ++ix) {
365 
366  const double x = h1.GetXaxis()->GetBinCenter(ix);
367  const double value = h1.GetBinContent(ix);
368  const double error = h1.GetBinError (ix);
369 
370  if (X(x) && error > 0.0) {
371  this->push_back(m_1d<m_value>(x, m_value(value, error)));
372  }
373  }
374  }
1D data point.
Definition: JRootfit.hh:186
no fit printf nominal n $STRING awk v X
Data point for value with error.
Definition: JRootfit.hh:126
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 427 of file JRootfit.hh.

430  {
431  for (Int_t ix = 1; ix <= h2.GetXaxis()->GetNbins(); ++ix) {
432  for (Int_t iy = 1; iy <= h2.GetYaxis()->GetNbins(); ++iy) {
433 
434  const double x = h2.GetXaxis()->GetBinCenter(ix);
435  const double y = h2.GetYaxis()->GetBinCenter(iy);
436  const size_t count = h2.GetBinContent(ix,iy);
437 
438  if (X(x) && Y(y)) {
439  this->push_back(m_2d<m_count>(x, y, count));
440  }
441  }
442  }
443  }
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:217
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 454 of file JRootfit.hh.

457  {
458  for (Int_t ix = 1; ix <= h2.GetXaxis()->GetNbins(); ++ix) {
459  for (Int_t iy = 1; iy <= h2.GetYaxis()->GetNbins(); ++iy) {
460 
461  const double x = h2.GetXaxis()->GetBinCenter(ix);
462  const double y = h2.GetYaxis()->GetBinCenter(iy);
463  const double value = h2.GetBinContent(ix,iy);
464  const double error = h2.GetBinError (ix,iy);
465 
466  if (X(x) && Y(y) && error > 0.0) {
467  this->push_back(m_2d<m_value>(x, y, m_value(value, error)));
468  }
469  }
470  }
471  }
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:217
no fit printf nominal n $STRING awk v X
Data point for value with error.
Definition: JRootfit.hh:126
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 529 of file JRootfit.hh.

533  {
534  for (Int_t ix = 1; ix <= h3.GetXaxis()->GetNbins(); ++ix) {
535  for (Int_t iy = 1; iy <= h3.GetYaxis()->GetNbins(); ++iy) {
536  for (Int_t iz = 1; iz <= h3.GetZaxis()->GetNbins(); ++iz) {
537 
538  const double x = h3.GetXaxis()->GetBinCenter(ix);
539  const double y = h3.GetYaxis()->GetBinCenter(iy);
540  const double z = h3.GetZaxis()->GetBinCenter(iz);
541  const size_t count = h3.GetBinContent(ix,iy,iz);
542 
543  if (X(x) && Y(y) && Z(z)) {
544  this->push_back(m_3d<m_count>(x, y, z, count));
545  }
546  }
547  }
548  }
549  }
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
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:252
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 561 of file JRootfit.hh.

565  {
566  for (Int_t ix = 1; ix <= h3.GetXaxis()->GetNbins(); ++ix) {
567  for (Int_t iy = 1; iy <= h3.GetYaxis()->GetNbins(); ++iy) {
568  for (Int_t iz = 1; iz <= h3.GetZaxis()->GetNbins(); ++iz) {
569 
570  const double x = h3.GetXaxis()->GetBinCenter(ix);
571  const double y = h3.GetYaxis()->GetBinCenter(iy);
572  const double z = h3.GetZaxis()->GetBinCenter(iz);
573  const double value = h3.GetBinContent(ix,iy,iz);
574  const double error = h3.GetBinError (ix,iy,iz);
575 
576  if (X(x) && Y(y) && Z(z) && error > 0.0) {
577  this->push_back(m_3d<m_value>(x, y, z, m_value(value, error)));
578  }
579  }
580  }
581  }
582  }
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
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:126
3D data point.
Definition: JRootfit.hh:252

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