46{
48
49 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
52 throw dqm_core::BadConfig( ERS_HERE, name, "dimension > 2 " );
53 }
54 } else {
55 throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TH1" );
56 }
57
66
67 if (greaterthan && lessthan) {
68 ERS_INFO("Both GreaterThan and LessThan parameters set: Will check for for both");
69 greaterthan = false;
70 lessthan = false;
71 }
72
73 if (
histogram->GetEntries() < minstat ) {
74 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
77 }
78
79 double bin_threshold;
80 double gthreshold;
81 double rthreshold;
82 try {
86 }
87 catch( dqm_core::Exception & ex ) {
88 throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex );
89 }
90
91
92 double sumwe=0;
93 double sume=0;
94 TH1* resulthisto;
97 }
else if (
histogram->InheritsFrom(
"TH1")) {
99 } else {
100 throw dqm_core::BadConfig( ERS_HERE, name, "does not inherit from TH1" );
101 }
102
103 resulthisto->Reset();
104
107
108 for (
int i = range[0];
i <=
range[1]; ++
i ) {
109 for (
int j = range[2]; j <=
range[3]; ++j ) {
110 if (
histogram->GetBinContent(i,j) == ignoreval)
continue;
111 if (
histogram->GetBinError(i,j) == 0 )
continue;
113 sume += 1./std::pow(
histogram->GetBinError(i,j),2);
114 }
115 }
117
118 if (sume !=0 ) {
120 } else {
121 dqm_core::Result *
result =
new dqm_core::Result(dqm_core::Result::Undefined);
122 result->tags_[
"SumErrors"] = sume;
123 delete resulthisto;
125 }
126
127 dqm_core::Result*
result =
new dqm_core::Result();
129
130 for (
int k = range[0];
k <=
range[1]; ++
k ) {
131 for (
int l = range[2];
l <=
range[3]; ++
l ) {
132 double inputcont =
histogram->GetBinContent(k,l);
133 double inputerr =
histogram->GetBinError(k,l);
138 if (inputcont == ignoreval) continue;
139 if (inputerr != 0){
141 if (greaterthan &&
diff < 0. )
continue;
142 if (lessthan &&
diff > 0. )
continue;
143
144 if ( (std::abs(sigma) > bin_threshold) && (std::abs(
diff) > maxdiffabs) && (std::abs(reldiff) > maxdiffrel) ) {
145 resulthisto->SetBinContent(k,l,inputcont);
147 if (publish &&
count < maxpublish){
149 }
150 }
151 }
152
153 }
154 }
155
157 result->object_ = boost::shared_ptr<TObject>(resulthisto);
158
159 ERS_DEBUG(1,
"Number of bins " << bin_threshold <<
" Sigma away from average of "<< avg <<
" is " <<
count);
160 ERS_DEBUG(1,"Green threshold: "<< gthreshold << " bin(s); Red threshold : " << rthreshold << " bin(s) ");
161
162
163
164 if (
count <= gthreshold ) {
165 result->status_ = dqm_core::Result::Green;
166 }
else if (
count < rthreshold ) {
167 result->status_ = dqm_core::Result::Yellow;
168 } else {
169 result->status_ = dqm_core::Result::Red;
170 }
172
173}
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
l
Printing final latex table to .tex output file.
setBGCode setTAP setLVL2ErrorBits bool
#define IsA
Declare the TObject style functions.