11 #include <dqm_core/AlgorithmConfig.h>
20 #include <dqm_core/AlgorithmManager.h>
40 const TObject &
object,
41 const dqm_core::AlgorithmConfig &
config)
44 if(
object.
IsA()->InheritsFrom(
"TH1" ) ) {
47 throw dqm_core::BadConfig( ERS_HERE,
name,
"dimension > 2 " );
50 throw dqm_core::BadConfig( ERS_HERE,
name,
"does not inherit from TH1" );
56 std::set<int> ignoredBins;
58 if (oneIgnoredBin > 0) {
59 ignoredBins.insert(oneIgnoredBin);
62 if (!ignoredBinsString.empty()) {
63 std::string IgnoredBin;
64 std::istringstream is(ignoredBinsString);
65 while (std::getline(is, IgnoredBin,
';')) {
66 ignoredBins.insert(std::stoi(IgnoredBin));
72 for (
int towerNum =
range.at(0); towerNum <=
range.at(1); ++towerNum ) {
73 double inputCont =
histogram->GetBinContent(towerNum);
74 if (ignoredBins.count(towerNum))
continue;
75 if (inputCont>worstStatus) worstStatus=inputCont;
79 result->tags_[
"BinContent"] = worstStatus;
81 else if(worstStatus==1)
result->status_ = dqm_core::Result::Yellow;
84 result->status_ = dqm_core::Result::Disabled;
97 out<<
"Red bin: The tower has experienced a large spike in rate. The large spike threshold algorithm is written in TilePPMContainerSpike in TriggerMonitor in L1Calo's git repository. \n" << std::endl;
99 out<<
"Yellow bin: The tower has experienced a spike in rate. The spike threshold algorithm is written in TilePPMContainerSpike in TriggerMonitor in L1Calo's git repository. \n" << std::endl;
101 out<<
"Black bin: This tower is disabled\n" << std::endl;
103 out<<
"Optional Parameter, Publish Bin: Publishes the content of the bins that are different than result." << std::endl;
105 out<<
"Optional Parameter, IgnoredBins: Ignores the content of the bin if you do not want a bin's result dominating a histogram" << std::endl;