28 <<
"[VpspScanAlgorithm::" << __func__ <<
"]" 29 <<
" NULL pointer to Analysis object!";
34 if ( histos.size() != 2 ) {
42 std::vector<TH1*>::const_iterator ihis = histos.begin();
43 for ( ; ihis != histos.end(); ihis++ ) {
46 if ( !(*ihis) ) {
continue; }
65 histos_[apv].second = (*ihis)->GetName();
80 <<
"[VpspScanAlgorithm::" << __func__ <<
"]" 81 <<
" NULL pointer to base Analysis object!";
89 <<
"[VpspScanAlgorithm::" << __func__ <<
"]" 90 <<
" NULL pointer to derived Analysis object!";
96 std::vector<const TProfile*>
histos;
97 std::vector<uint16_t> monitorables;
98 for ( uint16_t iapv = 0; iapv < 2; iapv++ ) {
100 monitorables.clear();
104 histos.push_back( const_cast<const TProfile*>( dynamic_cast<TProfile*>(
histos_[iapv].
first) ) );
114 for (
int k = 5;
k < 55;
k++ ) {
115 if ( !histos[0]->GetBinEntries(
k) ) {
continue; }
116 if ( histos[0]->GetBinContent(
k) >= top ) {
118 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) ) {
continue; }
134 if ( histos[0]->GetBinContent(
k) <= bottom ) {
136 bottom = histos[0]->GetBinContent(
k);
143 monitorables[6] =
static_cast<uint16_t
>(bottom);
144 monitorables[4] =
last;
147 float opt = bottom + ( top - bottom ) * 1./3.;
148 monitorables[1] =
static_cast<uint16_t
>(opt);
154 for ( ; ivpsp < 55; ivpsp++ ) {
155 if ( histos[0]->GetBinContent(ivpsp) < opt ) {
break; }
159 monitorables[0] = vpsp;
172 anal->
vpsp_[iapv] = monitorables[0];
175 anal->
topEdge_[iapv] = monitorables[3];
static const char unexpectedTask_[]
const uint32_t & fedKey() const
Utility class that holds histogram title.
std::vector< Histo > histos_
std::pair< TH1 *, std::string > Histo
static const char numberOfHistos_[]
static const char unexpectedExtraInfo_[]
static const char noBaselineLevel_[]
static const uint16_t valid_
static const char noBottomPlateau_[]
static const char mlCommissioning_[]
uint32_t extractFedKey(const TH1 *const )
virtual void addErrorCode(const std::string &error)
static const char noTopPlateau_[]
Histogram-based analysis for VPSP scan.
static const uint16_t invalid_
void extract(const std::vector< TH1 * > &) override
std::vector< std::vector< double > > tmp
Abstract base for derived classes that provide analysis of commissioning histograms.
static const char noVpspSetting_[]
CommissioningAnalysis *const anal() const
static const char nullPtr_[]