Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JROOT::data_type< T > Struct Template Reference

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

Public Member Functions

void unpack (const TH1 &h1, const range_type &X)
 Unpack 1D-histogram.
 
void unpack (const TH1 &h1, const range_type &X)
 Unpack 1D-histogram.
 
void unpack (const TH2 &h2, const range_type &X, const range_type &Y)
 Unpack 2D-histogram.
 
void unpack (const TH2 &h2, const range_type &X, const range_type &Y)
 Unpack 2D-histogram.
 
void unpack (const TH3 &h3, const range_type &X, const range_type &Y, const range_type &Z)
 Unpack 3D-histogram.
 
void unpack (const TH3 &h3, const range_type &X, const range_type &Y, const range_type &Z)
 Unpack 3D-histogram.
 

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

◆ unpack() [1/6]

void JROOT::data_type< m_1d< m_count > >::unpack ( const TH1 & h1,
const range_type & X )

Unpack 1D-histogram.

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 }

◆ unpack() [2/6]

void JROOT::data_type< m_1d< m_value > >::unpack ( const TH1 & h1,
const range_type & X )

Unpack 1D-histogram.

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 }

◆ unpack() [3/6]

void JROOT::data_type< m_2d< m_count > >::unpack ( const TH2 & h2,
const range_type & X,
const range_type & Y )

Unpack 2D-histogram.

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 }

◆ unpack() [4/6]

void JROOT::data_type< m_2d< m_value > >::unpack ( const TH2 & h2,
const range_type & X,
const range_type & Y )

Unpack 2D-histogram.

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 }

◆ unpack() [5/6]

void JROOT::data_type< m_3d< m_count > >::unpack ( const TH3 & h3,
const range_type & X,
const range_type & Y,
const range_type & Z )

Unpack 3D-histogram.

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 }

◆ unpack() [6/6]

void JROOT::data_type< m_3d< m_value > >::unpack ( const TH3 & h3,
const range_type & X,
const range_type & Y,
const range_type & Z )

Unpack 3D-histogram.

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 }

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