45 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
46 auto iov = iovs.front();
48 auto alignables = payload->getAlignableList();
50 TCanvas
canvas(
"Alignment PCL thresholds summary",
"Alignment PCL thresholds summary",1500,800);
53 canvas.SetTopMargin(0.07);
54 canvas.SetBottomMargin(0.06);
55 canvas.SetLeftMargin(0.11);
56 canvas.SetRightMargin(0.05);
60 auto Thresholds = std::unique_ptr<TH2F>(
new TH2F(
"Thresholds",
"Alignment parameter thresholds",alignables.size(),0,alignables.size(),24,0,24));
66 case DELTA :
return payload->getCut(alignable,coord);
67 case SIG :
return payload->getSigCut(alignable,coord);
68 case MAXMOVE :
return payload->getMaxMoveCut(alignable,coord);
69 case MAXERR :
return payload->getMaxErrorCut(alignable,coord);
70 case END_OF_TYPES :
return ret;
76 for(
const auto &alignable : alignables){
79 auto xLabel = replaceAll(replaceAll(alignable,
"minus",
"(-)"),
"plus",
"(+)");
80 Thresholds->GetXaxis()->SetBinLabel(xBin,(xLabel).c_str());
86 std::string theLabel = getStringFromTypeEnum(type)+getStringFromCoordEnum(coord);
88 Thresholds->GetYaxis()->SetBinLabel(yBin,theLabel.c_str());
91 Thresholds->SetBinContent(xBin,yBin,cutFunctor(type,alignable,coord));
103 canvas.SaveAs(fileName.c_str());
117 default :
return "should never be here";
125 case types::SIG :
return "#Delta/#sigma ";
126 case types::MAXMOVE :
return "max. move ";
127 case types::MAXERR :
return "max. err ";
128 default:
return "should never be here";
138 size_t start_pos = 0;
139 while((start_pos = out.find(from, start_pos)) != std::string::npos) {
140 out.replace(start_pos, from.length(), to);
141 start_pos += to.length();
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
virtual bool fill(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)=0
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
void setSingleIov(bool flag)