8 #include <dqm_core/AlgorithmManager.h> 
    9 #include "dqm_core/AlgorithmConfig.h" 
   10 #include <dqm_core/exceptions.h> 
   12 #include <TDirectory.h> 
   36                                             const TObject& 
object,
 
   37                                             const dqm_core::AlgorithmConfig& 
config ) {
 
   38     if ( !
object.
IsA()->InheritsFrom( 
"TProfile" ) ) {
 
   39         throw dqm_core::BadConfig( ERS_HERE, 
name, 
"does not inherit from TProfile" );
 
   48     std::vector<double> bad_errs;
 
   49     std::vector<int> bad_lbs;
 
   50     int nonZerocounter = 0;
 
   51     double percentBadBins = -10.0;
 
   53     for (
int i = 1; 
i <= 2000; 
i++)
 
   55         if (abs(
histogram->GetBinContent(
i)) >= dif_limit)
 
   57             bad_errs.push_back( 
histogram->GetBinContent(
i) );
 
   63     percentBadBins = 
double( bad_errs.size() )/
double(nonZerocounter)*100;
 
   68     result->tags_[ 
"% Bad bins " ] = percentBadBins;
 
   69     for ( 
int i = 0; 
i < 
int(bad_errs.size()); ++
i ) 
 
   71         auto tag    = ( std::ostringstream() << 
"LB " << bad_lbs[
i] ).
str();
 
   75     if ( nonZerocounter == 0 )
 
   77     else if ( percentBadBins > rthreshold )
 
   79     else if ( percentBadBins > gthreshold )
 
   80         result->status_ = dqm_core::Result::Yellow;
 
   88     out << 
"AFP_Sync_check: Print out fraction of bad bins where module/station is out of synchronization\n" 
   89         << 
"Required Parameter: dif_limit: threshold for content of the individual bin to be assumed out of sync" << std::endl;