using namespace std;
#include "hhistogram.h"
#include "honlinecontrol.h"
#include "hlocalcont.h"
#include "hglobalcont.h"
#include "hlocalcondition.h"
#include "hparameter.h"
#include "hglobalcondition.h"
#include "hdetset.h"
#include "hdetsetcont.h"
#include "hcalclocation.h"
#include "TList.h"
#include "herror.h"
#include "hmemorycheck.h"
#include <iostream>
#include <iomanip>
ClassImp(HHistogram)
ClassImp(HDrawingOpt)
HHistogram::HHistogram() : TNamed() {
fHist1 = 0;
fHist2 = 0;
fDim = 0;
kMulti = kFALSE;
fCType = 0;
fCIdx = -1;
fDSIdx1 = -1;
fDSIdx2 = -1;
fPar1 = 0;
fPar2 = 0;
fKey = 0;
fLCondition1 = -1;
fLCondition2 = -1;
fLCount1 = 0;
fLCount2 = 0;
kConsistent = kFALSE;
kPause = kFALSE;
setCursors();
}
HHistogram::~HHistogram() {
if(fHist1) delete fHist1;
if(fHist2) delete fHist2;
if(fPar1) delete fPar1;
if(fPar2) delete fPar2;
}
TList* HHistogram::isSameDS(Int_t axis) {
if(!gOnline) return 0;
HDetSet *pHSet = 0;
HDetSet *pCSet = 0;
HLocalCondition *pLC = 0;
HGlobalCondition *pGC = 0;
HNameIdx *pNameIdx = 0;
TList* pRetList = 0;
if(fCType==1) return 0;
if(fCType==0) return 0;
pGC = gOnline->getGlobal()->at(fCIdx);
if(!pGC) return 0;
if(!pGC->isExpression()) return 0;
if(axis==1) pHSet = gOnline->getDetSet()->at(fDSIdx1);
if(axis==2) pHSet = gOnline->getDetSet()->at(fDSIdx2);
if(!pHSet) return 0;
TIter iter(pGC->getLCList());
while((pNameIdx = (HNameIdx*) iter())) {
pLC = gOnline->getLocal()->at(pNameIdx->fLCIndex);
if(!pLC) continue;
pCSet = gOnline->getDetSet()->at(pLC->getDetSet());
if(!pCSet) continue;
if(pHSet->isEqual(pCSet)) {
pRetList = pLC->getOutput()->getLocList();
break;
}
}
return pRetList;
}
void HHistogram::fill() {
HLocation *pLoc = 0;
HLocation *pLoc2 = 0;
HConditionOut *pOut = 0;
HConditionOut *pOut1 = 0;
HConditionOut *pOut2 = 0;
TIterator *it = 0;
TIterator *it2 = 0;
TList *pList = 0;
TList *pList2 = 0;
HDetSet *pHSet1 = 0;
HDetSet *pHSet2 = 0;
HDetSet *pCSet = 0;
Bool_t kDelList = kFALSE;
pHSet1 = gOnline->getDetSet()->at(fDSIdx1);
pHSet2 = gOnline->getDetSet()->at(fDSIdx2);
if(fCType == 1) pCSet = gOnline->getDetSet()->at(gOnline->getLocal()->
at(fCIdx)->getDetSet());
if(!pHSet1) return;
if(fKey>0) {
if(gOnline->getLocal()->at(fLCondition1)) {
pOut1 = gOnline->getLocal()->at(fLCondition1)->getOutput();
if(!pOut1) return;
}
if(gOnline->getLocal()->at(fLCondition2)) {
pOut2 = gOnline->getLocal()->at(fLCondition2)->getOutput();
if(!pOut2) return;
}
}
if(fCType == 1 && !pCSet) return;
if(fCType == 1) {
if(!pHSet1->isGeomEqual(pCSet)) return;
pOut = gOnline->getLocal()->at(fCIdx)->getOutput();
if(!pOut) return;
if(fKey==10 && pHSet1->isEqual(pCSet) && fDim==1) {
fHist1->Fill((Float_t)(pOut1->getCount(fLCount1)));
return;
}
if(fKey==11 && pHSet1->isEqual(pCSet) && fDim==2) {
fHist2->Fill((Float_t)(pOut1->getCount(fLCount1)),
(Float_t)(pOut2->getCount(fLCount2)));
return;
}
if(pHSet1->isEqual(pCSet)) {
pList = pOut->getLocList();
}
else {
pList = HCalcLocation::transform(pHSet1->getCategory(),
pOut->getIdxList());
kDelList = kTRUE;
}
if(!pList) return;
if(it) { delete it; it = 0; }
it = pList->MakeIterator();
while((pLoc = (HLocation*) it->Next()) != NULL) {
if(fDim==1 && fKey==0) {
fHist1->Fill(fPar1->getParameterValue(*pLoc));
}
if(fDim==2) {
if(fKey==0)
fHist2->Fill(fPar1->getParameterValue(*pLoc),
fPar2->getParameterValue(*pLoc));
if(fKey==10)
fHist2->Fill((Float_t)(pOut1->getCount(fLCount1)),
fPar2->getParameterValue(*pLoc));
if(fKey==1)
fHist2->Fill(fPar1->getParameterValue(*pLoc),
(Float_t)(pOut2->getCount(fLCount2)));
}
}
}
if(fCType==0 || fCType == 2) {
if(fDim==1) {
if(fCType==2 && fKey==10) {
fHist1->Fill((Float_t)(pOut1->getCount(fLCount1)));
return;
}
pList = isSameDS(1);
if(!pList) {
pList = pHSet1->getOutput()->getList();
}
if(!pList) return;
if(it) { delete it; it=0; }
it = pList->MakeIterator();
while((pLoc = (HLocation*) it->Next()) != NULL) {
fHist1->Fill(fPar1->getParameterValue(*pLoc));
}
}
if(fDim==2) {
if(!pHSet2) return;
if(fKey==11 && fCType==2) {
fHist2->Fill((Float_t)(pOut1->getCount(fLCount1)),
(Float_t)(pOut2->getCount(fLCount2)));
return;
}
pList = isSameDS(1);
if(!pList) {
pList = pHSet1->getOutput()->getList();
}
if(!pList) return;
if(fDSIdx1 == fDSIdx2) {
if(it) { delete it; it=0; }
it = pList->MakeIterator();
while((pLoc = (HLocation*) it->Next()) != NULL) {
if(fKey==0)
fHist2->Fill(fPar1->getParameterValue(*pLoc),
fPar2->getParameterValue(*pLoc));
if(fKey==10 && fCType==2)
fHist2->Fill((Float_t)(pOut1->getCount(fLCount1)),
fPar2->getParameterValue(*pLoc));
if(fKey==1 && fCType==2)
fHist2->Fill(fPar1->getParameterValue(*pLoc),
(Float_t)(pOut2->getCount(fLCount2)));
}
}
else {
pList2 = isSameDS(2);
if(!pList2) {
pList2 = pHSet2->getOutput()->getList();
}
if(!pList2) return;
if(it) { delete it; it=0; }
it = pList->MakeIterator();
if(it2) { delete it2; it2=0; }
it2 = pList2->MakeIterator();
while((pLoc = (HLocation*) it->Next()) != NULL) {
it2->Reset();
while((pLoc2 = (HLocation*) it2->Next()) != NULL) {
if(fKey==0) {
fHist2->Fill(fPar1->getParameterValue(*pLoc),
fPar2->getParameterValue(*pLoc2));
}
if(fKey==10 && fCType==2)
fHist2->Fill((Float_t)(pOut1->getCount(fLCount1)),
fPar2->getParameterValue(*pLoc));
if(fKey==1 && fCType==2)
fHist2->Fill(fPar1->getParameterValue(*pLoc),
(Float_t)(pOut2->getCount(fLCount2)));
}
}
}
}
}
if(it) { delete it; it = 0; }
if(it2) { delete it2; it2 = 0; }
if(pList && kDelList) {
pList->Delete();
delete pList;
pList = 0;
}
return;
}
void HHistogram::action() {
if(kPause) return;
if(!kConsistent) return;
HLocalCondition *pLC = 0;
HGlobalCondition *pGC = 0;
if(fCType==0) {
fill();
}
if(fCType==1) {
pLC = gOnline->getLocal()->at(fCIdx);
if(!pLC) return;
if(pLC->isEvaluated() && pLC->getOutput()->getTrueFlag()) fill();
}
if(fCType==2) {
pGC = gOnline->getGlobal()->at(fCIdx);
if(!pGC) return;
if(pGC->isTrue()) fill();
}
}
Bool_t HHistogram::checkConsistency(Bool_t kMsg) {
Bool_t kCounter1 = kFALSE;
Bool_t kCounter2 = kFALSE;
if(!gOnline) {
if(kMsg)
HError::message("Object of the main control class does not exist.");
kConsistent = kFALSE;
return kFALSE;
}
if(!fHist1 && !fHist2) {
if(kMsg) HError::message("Failed to add/modify the histogram.");
kConsistent = kFALSE;
return kFALSE;
}
HDetSet *pHSet = 0;
HDetSet *pCSet = 0;
HLocalCondition *pLC = 0;
HGlobalCondition *pGC = 0;
if(!gOnline->getDetSet()) {
if(kMsg) HError::message("Container of detector sets not found.");
kConsistent = kFALSE;
return kFALSE;
}
Int_t idx = -1;
Char_t nullstr[100] = "";
if(fDim == 1) {
if(!strcmp(fDSName1,nullstr)) {
if(kMsg) HError::message("Name of the 1st detector set is not defined.");
kConsistent = kFALSE;
return kFALSE;
}
idx = gOnline->getDetSet()->find(fDSName1);
if(idx != -1) fDSIdx1 = idx;
if(idx == -1 && fDSIdx1 != -1) {
pCSet = gOnline->getDetSet()->at(fDSIdx1);
if(pCSet) setDSName(pCSet->GetName(),1);
else {
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDSIdx1 == -1) {
if(kMsg) HError::message("1st detector set not found in the container.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDim == 2) {
if(!strcmp(fDSName1,nullstr)) {
if(kMsg) HError::message("Name of the 1st detector set is not defined.");
kConsistent = kFALSE;
return kFALSE;
}
idx = gOnline->getDetSet()->find(fDSName1);
if(idx != -1) fDSIdx1 = idx;
if(idx == -1 && fDSIdx1 != -1) {
pCSet = gOnline->getDetSet()->at(fDSIdx1);
if(pCSet) setDSName(pCSet->GetName(),1);
else {
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDSIdx1 == -1) {
if(kMsg) HError::message("1st detector set not found in the container.");
kConsistent = kFALSE;
return kFALSE;
}
if(!strcmp(fDSName2,nullstr)) {
if(kMsg) HError::message("Name of the 2nd detector set is not defined.");
kConsistent = kFALSE;
return kFALSE;
}
idx = gOnline->getDetSet()->find(fDSName2);
if(idx != -1) fDSIdx2 = idx;
if(idx == -1 && fDSIdx2 != -1) {
pCSet = gOnline->getDetSet()->at(fDSIdx2);
if(pCSet) setDSName(pCSet->GetName(),2);
else {
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDSIdx2 == -1) {
if(kMsg) HError::message("2nd detector set not found in the container");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fCType == 1) {
if(!gOnline->getLocal()) {
if(kMsg) HError::message("Container of local conditions not found.");
kConsistent = kFALSE;
return kFALSE;
}
if(!strcmp(fCName,nullstr)) {
if(kMsg) HError::message("Name of the local condition not defined.");
kConsistent = kFALSE;
return kFALSE;
}
idx = gOnline->getLocal()->find(fCName);
if(idx != -1) fCIdx = idx;
if(idx == -1 && fCIdx != -1) {
pLC = gOnline->getLocal()->at(fCIdx);
if(pLC) setCName(pLC->GetName());
else {
kConsistent = kFALSE;
return kFALSE;
}
}
if(fCIdx == -1) {
if(kMsg) HError::message("Local condition not found in the container.");
kConsistent = kFALSE;
return kFALSE;
}
pLC = gOnline->getLocal()->at(fCIdx);
if(!pLC) {
if(kMsg) HError::message("Error when extracting local condition.");
kConsistent = kFALSE;
return kFALSE;
}
if(!pLC->checkConsistency()) {
if(kMsg) HError::message("Local condition not consistent.");
kConsistent = kFALSE;
return kFALSE;
}
if(fDim == 2) {
if(fDSIdx1 != fDSIdx2) {
if(kMsg) HError::message("X and Y axis detector sets are different.");
kConsistent = kFALSE;
return kFALSE;
}
}
pHSet = gOnline->getDetSet()->at(fDSIdx1);
pCSet = gOnline->getDetSet()->at(pLC->getDetSet());
if(!pHSet->isEqual(pCSet) && !fKey) {
if(!pHSet->isGeomEqual(pCSet) ||
(pHSet->isGeomEqual(pCSet) &&
(pHSet->getCategory()==1 || pHSet->getCategory()==33))) {
if(kMsg)
HError::message("Det sets of histo and local condition are different");
kConsistent = kFALSE;
return kFALSE;
}
}
}
if(fCType == 2) {
if(!gOnline->getGlobal()) {
if(kMsg) HError::message("Container of global conditions not found.");
kConsistent = kFALSE;
return kFALSE;
}
if(!strcmp(fCName,nullstr)) {
if(kMsg) HError::message("Name of the global condition not defined.");
kConsistent = kFALSE;
return kFALSE;
}
idx = gOnline->getGlobal()->find(fCName);
if(idx != -1) fCIdx = idx;
if(idx == -1 && fCIdx != -1) {
pGC = gOnline->getGlobal()->at(fCIdx);
if(pGC) setCName(pGC->GetName());
else {
kConsistent = kFALSE;
return kFALSE;
}
}
if(fCIdx == -1) {
if(kMsg) HError::message("Global condition not found in the container.");
kConsistent = kFALSE;
return kFALSE;
}
pGC = gOnline->getGlobal()->at(fCIdx);
if(!pGC) {
if(kMsg) HError::message("Error when extracting global condition.");
kConsistent = kFALSE;
return kFALSE;
}
if(!pGC->checkConsistency()) {
if(kMsg) HError::message("Global condition not consistent.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDim == 1 && fKey==0) {
if(!fPar1) {
if(kMsg) HError::message("X axis parameter not set.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDim == 2 && fKey==0) {
if(!fPar1 || !fPar2) {
if(kMsg) HError::message("One of parameters not set.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDim == 2 && fKey==10) {
if(!fPar2) {
if(kMsg) HError::message("Y axis parameter not set.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDim == 2 && fKey==1) {
if(!fPar1) {
if(kMsg) HError::message("X axis parameter not set.");
kConsistent = kFALSE;
return kFALSE;
}
}
HDetSet *pS1, *pS2;
if(fDim == 1 && fKey==0) {
pS1 = gOnline->getDetSet()->at(fDSIdx1);
if(pS1->getCategory() != fPar1->getCategory()) {
if(kMsg) HError::message("X axis det set and parameter belong to different categories.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fDim == 2) {
if(fKey==0 || fKey==1) {
pS1 = gOnline->getDetSet()->at(fDSIdx1);
if(pS1->getCategory() != fPar1->getCategory()) {
if(kMsg) HError::message("X axis det set and parameter belong to different categories.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fKey==0 || fKey==10) {
pS2 = gOnline->getDetSet()->at(fDSIdx2);
if(pS2->getCategory() != fPar2->getCategory()) {
if(kMsg) HError::message("Y axis det set and parameter belong to different categories.");
kConsistent = kFALSE;
return kFALSE;
}
}
}
if(fCType == 1) {
if(fKey==10 || fKey==11) {
if(fLCondition1 == -1 || fLCondition1 != fCIdx) fLCondition1 = fCIdx;
if(fLCondition1 == -1) {
if(kMsg) HError::message("Local condition for the x axis counter not found.");
kConsistent = kFALSE;
return kFALSE;
}
if(fLCount1 < 1 || fLCount1 > 3) {
if(kMsg)
HError::message("Index of local condition counter is out of bounds.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(fKey==1 || fKey==11) {
if(fLCondition2 == -1 || fLCondition2 != fCIdx) fLCondition2 = fCIdx;
if(fLCondition2 == -1) {
if(kMsg) HError::message("Local condition for the y axis counter not found.");
kConsistent = kFALSE;
return kFALSE;
}
if(fLCount2 < 1 || fLCount2 > 3) {
if(kMsg)
HError::message("Index of local condition counter is out of bounds.");
kConsistent = kFALSE;
return kFALSE;
}
}
}
if(fCType == 2) {
TIter iter(pGC->getLCList());
HNameIdx *pNameIdx = 0;
while((pNameIdx = (HNameIdx*) iter())) {
if(fKey == 10 || fKey == 11) {
if(fLCondition1 == pNameIdx->fLCIndex && fLCondition1 != -1)
kCounter1 = kTRUE;
}
if(fKey == 1 || fKey == 11) {
if(fLCondition2 == pNameIdx->fLCIndex && fLCondition2 != -1)
kCounter2 = kTRUE;
}
}
if((fKey == 10 || fKey == 11) && !kCounter1) {
if(kMsg) HError::message("Local condition for the x axis counter not found.");
kConsistent = kFALSE;
return kFALSE;
}
if((fKey == 1 || fKey == 11) && !kCounter2) {
if(kMsg) HError::message("Local condition for the y axis counter not found.");
kConsistent = kFALSE;
return kFALSE;
}
if((fKey==10 || fKey==11) && (fLCount1 < 1 || fLCount1 > 3)) {
if(kMsg)
HError::message("Index of local condition counter is out of bounds.");
kConsistent = kFALSE;
return kFALSE;
}
if((fKey==1 || fKey==11) && (fLCount2 < 1 || fLCount2 > 3)) {
if(kMsg)
HError::message("Index of local condition counter is out of bounds.");
kConsistent = kFALSE;
return kFALSE;
}
}
if(!strcmp(nullstr,GetName())) {
if(kMsg) HError::message("Histogram name not defined.");
kConsistent = kFALSE;
return kFALSE;
}
if(gOnline->getMemCheck()->isAlarm()) gOnline->getMemCheck()->alarm();
kConsistent = kTRUE;
return kTRUE;
}
void HHistogram::setHist1(TH1F *hist) {
if(!hist) return;
fHist1 = hist;
}
void HHistogram::setHist2(TH2F *hist) {
if(!hist) return;
fHist2 = hist;
}
void HHistogram::print() {
cout << "object : " << GetName() << endl;
cout << "number of dimensions : " << fDim << endl;
if(kMulti) { cout << "multi status : kTRUE" << endl; }
else { cout << "multi status : kFALSE" << endl; }
if(fCType==0) { cout << "bound to no condition" << endl; }
if(fCType==1) { cout << "bound to local condition" << endl; }
if(fCType==2) { cout << "bound to global condition" << endl; }
cout << "condition index : " << fCIdx << endl;
cout << "condition name : " << fCName << endl;
cout << "first det set index : " << fDSIdx1 << endl;
cout << "first det set name : " << fDSName1 << endl;
cout << "second det set index : " << fDSIdx2 << endl;
cout << "second det set name : " << fDSName2 << endl;
if(fPar1) { cout << "x axis parameter : " << fPar1->GetName() << endl; }
else { cout << "x axis parameter not defined" << endl; }
if(fPar2) { cout << "y axis parameter : " << fPar2->GetName() << endl; }
else { cout << "y axis parameter not defined" << endl; }
if(kPause) { cout << "the histogram is paused" << endl; }
else { cout << "the histogram is not paused" << endl; }
if(kConsistent) { cout << "the histogram is consistent" << endl; }
else { cout << "the histogram is not consistent" << endl; }
if(fKey==10 || fKey==11) {
cout << "local condition on x axis: " << fLCondition1 << endl; }
if(fKey==10 || fKey==11) {
cout << "local condition counter on x axis: " << fLCount1 << endl; }
if(fKey==1 || fKey==11) {
cout << "local condition on y axis: " << fLCondition2 << endl; }
if(fKey==1 || fKey==11) {
cout << "local condition counter on y axis: " << fLCount2 << endl; }
}
void HHistogram::setDrawingOpt(HDrawingOpt *p, Bool_t kSave) {
if(!p) return;
Int_t binx1, binx2;
Int_t biny1, biny2;
if(fDim == 1) {
binx1 = fHist1->GetXaxis()->FindBin(p->xstart);
binx2 = fHist1->GetXaxis()->FindBin(p->xstop);
if(binx2 <= binx1) {
binx1 = fHist1->GetXaxis()->FindBin(fHist1->GetXaxis()->GetXmin());
binx2 = fHist1->GetXaxis()->FindBin(fHist1->GetXaxis()->GetXmax());
}
fHist1->GetXaxis()->SetRange(binx1,binx2);
if(p->scale > 0.0) fHist1->SetMaximum(p->scale);
else fHist1->SetMaximum();
fHist1->SetOption((*p).option);
}
if(fDim == 2) {
binx1 = fHist2->GetXaxis()->FindBin(p->xstart);
binx2 = fHist2->GetXaxis()->FindBin(p->xstop);
if(binx2 <= binx1) {
binx1 = fHist2->GetXaxis()->FindBin(fHist2->GetXaxis()->GetXmin());
binx2 = fHist2->GetXaxis()->FindBin(fHist2->GetXaxis()->GetXmax());
}
biny1 = fHist2->GetYaxis()->FindBin(p->ystart);
biny2 = fHist2->GetYaxis()->FindBin(p->ystop);
if(biny2 <= biny1) {
biny1 = fHist2->GetYaxis()->FindBin(fHist2->GetYaxis()->GetXmin());
binx2 = fHist2->GetYaxis()->FindBin(fHist2->GetYaxis()->GetXmax());
}
fHist2->GetXaxis()->SetRange(binx1,binx2);
fHist2->GetYaxis()->SetRange(biny1,biny2);
if(p->scale > 0.0) fHist2->SetMaximum(p->scale);
else fHist2->SetMaximum();
fHist2->SetOption((*p).option);
}
if(kSave) {
fDrawing.xstart = p->xstart;
fDrawing.xstop = p->xstop;
fDrawing.ystart = p->ystart;
fDrawing.ystop = p->ystop;
if(p->scale > 0.0) fDrawing.scale = p->scale;
else fDrawing.scale = -1111.;
sprintf(fDrawing.option,"%s",(*p).option);
}
}
void HHistogram::setDrawingOpt(Bool_t kDefault) {
Int_t binx1 = 0;
Int_t binx2 = 0;
Int_t biny1 = 0;
Int_t biny2 = 0;
if(fDim == 1) {
if(!kDefault) {
binx1 = fHist1->GetXaxis()->FindBin(fDrawing.xstart);
binx2 = fHist1->GetXaxis()->FindBin(fDrawing.xstop);
}
if(kDefault || (binx2 <= binx1)) {
binx1 = fHist1->GetXaxis()->FindBin(fHist1->GetXaxis()->GetXmin());
binx2 = fHist1->GetXaxis()->FindBin(fHist1->GetXaxis()->GetXmax());
}
fHist1->GetXaxis()->SetRange(binx1,binx2);
if(kDefault) {
fHist1->SetMaximum();
fHist1->SetOption();
}
if(!kDefault) {
if(fDrawing.scale > 0.0) fHist1->SetMaximum(fDrawing.scale);
else {
fHist1->SetMaximum();
fDrawing.scale = fHist1->GetMaximum();
}
fHist1->SetOption(fDrawing.option);
}
}
if(fDim == 2) {
if(!kDefault) {
binx1 = fHist2->GetXaxis()->FindBin(fDrawing.xstart);
binx2 = fHist2->GetXaxis()->FindBin(fDrawing.xstop);
}
if(kDefault || (binx2 <= binx1)) {
binx1 = fHist2->GetXaxis()->FindBin(fHist2->GetXaxis()->GetXmin());
binx2 = fHist2->GetXaxis()->FindBin(fHist2->GetXaxis()->GetXmax());
}
fHist2->GetXaxis()->SetRange(binx1,binx2);
if(!kDefault) {
biny1 = fHist2->GetYaxis()->FindBin(fDrawing.ystart);
biny2 = fHist2->GetYaxis()->FindBin(fDrawing.ystop);
}
if(kDefault || (biny2 <= biny1)) {
biny1 = fHist2->GetYaxis()->FindBin(fHist2->GetYaxis()->GetXmin());
biny2 = fHist2->GetYaxis()->FindBin(fHist2->GetYaxis()->GetXmax());
}
fHist2->GetYaxis()->SetRange(biny1,biny2);
if(kDefault) {
fHist2->SetMaximum();
fHist2->SetOption();
}
if(!kDefault) {
if(fDrawing.scale > 0.0) fHist2->SetMaximum(fDrawing.scale);
else {
fHist2->SetMaximum();
fDrawing.scale = fHist2->GetMaximum();
}
fHist2->SetOption(fDrawing.option);
}
}
}
Last change: Sat May 22 12:54:49 2010
Last generated: 2010-05-22 12:54
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.