13 using namespace sistrip;
27 <<
" NULL pointer to Analysis object!";
32 if (histos.size() != 2) {
37 if (!histos.empty()) {
42 std::vector<TH1*>::const_iterator ihis = histos.begin();
43 for (; ihis != histos.end(); ihis++) {
66 histos_[apv].second = (*ihis)->GetName();
78 <<
" NULL pointer to base Analysis object!";
86 <<
" NULL pointer to derived Analysis object!";
92 std::vector<const TProfile*>
histos;
93 std::vector<uint16_t> monitorables;
94 for (uint16_t iapv = 0; iapv < 2; iapv++) {
99 histos.push_back(const_cast<const TProfile*>(dynamic_cast<TProfile*>(
histos_[iapv].
first)));
110 for (
int k = 5;
k < 55;
k++) {
111 if (!histos[0]->GetBinEntries(
k)) {
114 if (histos[0]->GetBinContent(
k) >= top) {
116 top = histos[0]->GetBinContent(
k);
126 monitorables[5] =
static_cast<uint16_t
>(top);
127 monitorables[3] =
first;
132 for (
int k = 55;
k > 5;
k--) {
133 if (!histos[0]->GetBinEntries(
k)) {
136 if (histos[0]->GetBinContent(
k) <= bottom) {
138 bottom = histos[0]->GetBinContent(
k);
145 monitorables[6] =
static_cast<uint16_t
>(bottom);
146 monitorables[4] =
last;
149 float opt = bottom + (top - bottom) * 1. / 3.;
150 monitorables[1] =
static_cast<uint16_t
>(
opt);
156 for (; ivpsp < 55; ivpsp++) {
157 if (histos[0]->GetBinContent(ivpsp) <
opt) {
163 monitorables[0] = vpsp;
175 anal->
vpsp_[iapv] = monitorables[0];
178 anal->
topEdge_[iapv] = monitorables[3];
static const char unexpectedTask_[]
const uint32_t & fedKey() const
Utility class that holds histogram title.
std::vector< Histo > histos_
static const char numberOfHistos_[]
static const char unexpectedExtraInfo_[]
static const char noBaselineLevel_[]
static const uint16_t valid_
uint32_t extractFedKey(const TH1 *const)
static const char noBottomPlateau_[]
static const char mlCommissioning_[]
virtual void addErrorCode(const std::string &error)
static const char noTopPlateau_[]
Histogram-based analysis for VPSP scan.
std::pair< TH1 *, std::string > Histo
static const uint16_t invalid_
void extract(const std::vector< TH1 * > &) override
Abstract base for derived classes that provide analysis of commissioning histograms.
static const char noVpspSetting_[]
Log< level::Warning, false > LogWarning
CommissioningAnalysis *const anal() const
static const char nullPtr_[]