#include <MDTTubeCheck.h>
Definition at line 20 of file MDTTubeCheck.h.
◆ MDTTubeCheck()
dqm_algorithms::MDTTubeCheck::MDTTubeCheck |
( |
| ) |
|
◆ ~MDTTubeCheck()
dqm_algorithms::MDTTubeCheck::~MDTTubeCheck |
( |
| ) |
|
|
virtual |
◆ clone()
dqm_core::Algorithm * dqm_algorithms::MDTTubeCheck::clone |
( |
| ) |
|
|
virtual |
◆ execute()
Definition at line 58 of file MDTTubeCheck.cxx.
61 const TH1 * refhist(0);
63 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
66 throw dqm_core::BadConfig( ERS_HERE,
name,
"dimension >= 2 " );
69 throw dqm_core::BadConfig( ERS_HERE,
name,
"does not inherit from TH1" );
87 catch ( dqm_core::Exception & ex ) {
88 throw dqm_core::BadConfig( ERS_HERE,
name, ex.what(), ex );
94 refhist =
static_cast<const TH1*
>(
config.getReference() );
96 catch ( dqm_core::Exception & ex ) {
97 throw dqm_core::BadRefHist(ERS_HERE,
name,
" Could not retreive reference");
99 if (
histogram->GetDimension() != refhist->GetDimension() ) {
100 throw dqm_core::BadRefHist( ERS_HERE,
name,
"Reference VS histo: Different dimension!" );
102 if (
histogram->GetNbinsX() != refhist->GetNbinsX() ) {
103 throw dqm_core::BadRefHist( ERS_HERE,
name,
"Reference VS histo: Different number of bins!" );
108 if (
histogram->GetEntries() < minstat ) {
109 ERS_INFO(
"Histogram does not satisfy MinStat requirement " <<
histogram->GetName());
114 ERS_DEBUG(1,
"Statistics: "<<
histogram->GetEntries()<<
" entries ");
116 int NewDead_count = 0;
117 int StillDead_count = 0;
118 int Revived_count = 0;
119 int LowStat_count = 0;
120 std::vector<int>
range;
124 ERS_INFO(
"Histogram has not dimension 1 : " <<
histogram->GetName());
125 throw dqm_core::Exception( ERS_HERE,
histogram->GetName() );
128 std::vector<int> Tubes;
135 double RefCont = refhist->GetBinContent(
i);
136 if ((
content < bin_threshold) && ((RefCont >= bin_threshold) || (RefCont == LowStatLevel))) {
139 }
else if ((
content < bin_threshold) && ((RefCont < bin_threshold) || (RefCont == LowStatLevel))) {
141 }
else if ((
content >= bin_threshold) && (RefCont < bin_threshold)) {
145 if (((
content < bin_threshold) ) ) {
152 ERS_DEBUG(1,
"Number of bins " <<
name <<
" different from a treshold of " << bin_threshold <<
" is " << NewDead_count );
155 if (LowStat_count > 0)
result->tags_[
"NTubes_withLowStat"] = LowStat_count;
156 if (Revived_count > 0)
result->tags_[
"NTubes_Revived"] = Revived_count;
157 result->tags_[
"NewDead_Tubes"] = NewDead_count;
158 if (Tubes.size()>0) {
159 for (
int k=0;
k<(
int)Tubes.size();
k++) {
160 std::string ToDB=
"ChangedStatusTube_";
162 asprintf(&nn,
"%i",
k+1);
164 result->tags_[ToDB] = Tubes[
k];
165 ERS_DEBUG(1,
"MDT Tube which changed status: "<<ToDB<<
" = "<<Tubes[
k] );
168 if (NewDead_count >= redTh) {
171 }
else if ( (NewDead_count > greenTh) || (Revived_count > 0)) {
172 result->status_ = dqm_core::Result::Yellow;
173 ERS_DEBUG(1,
"Yellow");
174 }
else if (LowStat_count > 0) {
176 ERS_DEBUG(1,
"Undefined");
177 }
else if (StillDead_count ==
range[1]) {
182 ERS_DEBUG(1,
"Green");
◆ printDescription()
void dqm_algorithms::MDTTubeCheck::printDescription |
( |
std::ostream & |
out | ) |
|
|
virtual |
Definition at line 189 of file MDTTubeCheck.cxx.
194 message +=
"Description: Check if the number of entries in bins is less than BinThreshold and compare with Reference Histo \n";
195 message +=
"Mandatory Parameter: BinThreshold = Look for bins less than BinTreshold; Count number of bins satifying requirement \n";
196 message +=
"Mandatory Parameter: ReferenceCheck = 0 if no check on reference is requested \n";
197 message +=
"Mandatory Green/Red Threshold: NBins = number of bins satifying requirement\n";
198 message +=
"Optional Parameters: LowStatLevel = Level (in y) that means too few statistics for analysis\n";
199 message +=
"Optional Parameters: MinStat = Minimum histogram statistics needed to perform Algorithm\n";
200 message +=
" xmin: minimum x range\n";
201 message +=
" xmax: maximum x range\n";
◆ m_name
std::string dqm_algorithms::MDTTubeCheck::m_name |
|
private |
The documentation for this class was generated from the following files: