AliPhysics  1909eaa (1909eaa)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TestTHistManager::THistManagerTestSuite Class Reference

Collection of tests for the THistManager. More...

#include <THistManager.h>

Public Member Functions

 THistManagerTestSuite ()
 
virtual ~THistManagerTestSuite ()
 
int TestBuildSimpleHistograms ()
 
int TestBuildGroupedHistograms ()
 
int TestFillSimpleHistograms ()
 
int TestFillGroupedHistograms ()
 

Detailed Description

Collection of tests for the THistManager.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
Nov 23, 2016

Test suite for histogram manager. Currently implemented tests:

  • Build simple histograms
  • Build histrogram in groups
  • Simple fill
  • Fill histograms in groups

Definition at line 592 of file THistManager.h.

Constructor & Destructor Documentation

TestTHistManager::THistManagerTestSuite::THistManagerTestSuite ( )
inline

Constructor

Definition at line 598 of file THistManager.h.

virtual TestTHistManager::THistManagerTestSuite::~THistManagerTestSuite ( )
inlinevirtual

Destructor

Definition at line 603 of file THistManager.h.

Member Function Documentation

int TestTHistManager::THistManagerTestSuite::TestBuildGroupedHistograms ( )

Purpose of the test: Check whether histmanager assings histograms correctly into groups Relies on: TestBuildSimpleHistograms

Creating 3 groups with 2 histograms

  • Group 1 has only 1D histograms
  • Group 2 has only 2D histograms
  • Group 3 has only 3D histograms Names of the histograms are the same for all groups.

In addition: 1 group with a subgroup and a TProfile.

Test passed:

  • All Groups need to be found, and all histograms within the group with the matching type
  • Subgroup need to be found in the subgroup test
    Returns
    0 if test is passed, 1 if it failed

Definition at line 719 of file THistManager.cxx.

Referenced by TestTHistManager::TestRunAll(), and TestTHistManager::TestRunBuildGrouped().

int TestTHistManager::THistManagerTestSuite::TestBuildSimpleHistograms ( )

Purpose of the test: Check whether histmanager builds histogram correctly (no grouping)

Create 1 histogram of each type

  • TH1
  • TH2
  • TH3
  • THnSparse
  • TProfile Find the histogram according to its name in the list of histograms

Test passed: All histograms need to be found in the list of histograms, and type must match

Returns
0 if test is passed, 1 if it failed

Definition at line 681 of file THistManager.cxx.

Referenced by TestTHistManager::TestRunAll(), and TestTHistManager::TestRunBuildSimple().

int TestTHistManager::THistManagerTestSuite::TestFillGroupedHistograms ( )

Purpose of the test: Test access of histograms in groups, check whether histograms are filled properly Relies on: TestBuildSimpleHistograms, TestBuildGroupedHistograms, TestFillSimpleHistograms

Fill 2 test histograms in 2 groups

  • Group1: TH1
  • Group2: TH2 each 100 times for bin 1. In addition Fill TProfile in Group3 with Subgroup1 100 times with weight1

Test passed:

  • All Histograms are found in the groups and subgroups
  • All Histograms have the expected value (100 for histograms, 1 for profile)
    Returns
    0 if test is passed, 1 if it failed

Definition at line 875 of file THistManager.cxx.

Referenced by TestTHistManager::TestRunAll(), and TestTHistManager::TestRunFillGrouped().

int TestTHistManager::THistManagerTestSuite::TestFillSimpleHistograms ( )

Purpose of the test: Check whether histograms are found correctly by the automatic procedure, and whether fill is correctly propagated Relies on: TestBuildSimpleHistograms

Creating histograms of all types

  • TH1
  • TH2
  • TH3
  • THnSparse
  • TProfile with 1 bin per dimension and each with 100 times the same value.

Test passed:

  • All histograms need to have in its 1 bin the bin content 100
    Returns
    0 if test is passed, 1 if it failed

Definition at line 792 of file THistManager.cxx.

Referenced by TestTHistManager::TestRunAll(), and TestTHistManager::TestRunFillSimple().


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