List of all members.
Detailed Description
Definition at line 102 of file utils.py.
Constructor & Destructor Documentation
def utils::StatisticalTest::__init__ |
( |
|
self, |
|
|
|
threshold |
|
) |
| |
Member Function Documentation
def utils::StatisticalTest::do_test |
( |
|
self | ) |
|
def utils::StatisticalTest::get_rank |
( |
|
self | ) |
|
Definition at line 115 of file utils.py.
00116 :
00117 if not self.is_init:
00118 if self.rank < 0:
00119 type1=type(self.h1)
00120 type2=type(self.h2)
00121 if (type1 != type2):
00122 logger(1,"*** ERROR: object types in comparison don't match: %s!=%s" %(type1,type2))
00123 self.rank=test_codes["DIFF_TYPES"]
00124 elif not self.h2.InheritsFrom("TH1"):
00125 logger(1,"*** ERROR: object type is not histogram but a %s" %(type1))
00126 self.rank=test_codes["NO_HIST"]
00127
00128
00129
00130
00131 else:
00132 is_empty1=is_empty(self.h1)
00133 is_empty2=is_empty(self.h2)
00134 are_empty=is_empty1 and is_empty2
00135 one_empty=is_empty1 or is_empty2
00136
00137 Nbins1= getNbins(self.h1)
00138 Nbins2= getNbins(self.h2)
00139
00140 if are_empty:
00141
00142
00143 return 1
00144 elif one_empty:
00145
00146
00147 return 1
00148
00149
00150 if Nbins1!=Nbins2:
00151 return test_codes["DIFF_BIN"]
00152
00153 self.rank=self.do_test()
00154 self.is_init=True
00155 return self.rank
def utils::StatisticalTest::get_status |
( |
|
self | ) |
|
Definition at line 156 of file utils.py.
00157 :
00158 status = SUCCESS
00159 if self.get_rank()<0:
00160 status=NULL
00161 logger(0,"+++ Test %s FAILED: rank is %s and threshold is %s ==> %s" %(self.name, self.rank, self.threshold, status))
00162 elif self.get_rank() < self.threshold:
00163 status=FAIL
00164 logger(0,"+++ Test %s: rank is %s and threshold is %s ==> %s" %(self.name, self.rank, self.threshold, status))
00165 return status
def utils::StatisticalTest::set_operands |
( |
|
self, |
|
|
|
h1, |
|
|
|
h2 |
|
) |
| |
Definition at line 111 of file utils.py.
00112 :
00113 self.h1=h1
00114 self.h2=h2
Member Data Documentation
2D! return test_codes["2D"]
Definition at line 103 of file utils.py.