18 #include "Riostream.h"
21 #include "TObjArray.h"
70 condarr =
new TObjArray(elements);
72 for(Int_t i = 0; i < elements; i++)
76 condarr =
new TObjArray(elements);
78 for(Int_t i = 0; i < elements; i++)
92 if(strcmp(type,
"TGo4WinCond")==0) {
93 condarr =
new TObjArray(elements);
95 for(Int_t i = 0; i < elements; i++)
98 if(strcmp(type,
"TGo4PolyCond")==0) {
99 condarr =
new TObjArray(elements);
101 for(Int_t i = 0; i < elements; i++)
133 Int_t ii =
condarr->GetLast()+1;
134 for(Int_t i = 0; i < ii; i++)
138 Bool_t result=cond->
Test(x,y);
146 if(conny) rev=conny->
Test(x,y);
156 Int_t ii =
condarr->GetLast()+1;
157 for(Int_t i = 0; i < ii; i++)
161 Bool_t result=cond->
Test(x);
169 if(conny) rev=conny->
Test(x);
178 Int_t ii =
condarr->GetLast()+1;
180 std::cout << GetName() <<
" has " << ii <<
" " << cond->ClassName() <<
" conditions" << std::endl;
181 for(Int_t i = 0; i < ii; i++)
190 Int_t ii =
condarr->GetLast()+1;
191 std::cout <<
"-"<<ClassName()<<
" "<<GetName()<<
" Printout:" << std::endl;
193 for(Int_t i = 0; i < ii; i++)
196 TROOT::IndentLevel();
217 return cond->ClassName();
230 Int_t ii =
condarr->GetLast()+1;
232 for(Int_t i = 0; i < ii; i++)
241 if(conny) conny->
Enable();
250 Int_t ii =
condarr->GetLast()+1;
252 for(Int_t i = 0; i < ii; i++)
261 if(conny) conny->
Disable(result);
270 Int_t ii =
condarr->GetLast()+1;
272 for(Int_t i = 0; i < ii; i++)
281 if(conny) conny->
Invert(on);
290 Int_t ii =
condarr->GetLast()+1;
291 for(Int_t i = 0; i < ii; i++)
305 Bool_t* result, Bool_t* truevalue, Bool_t* falsevalue)
309 Int_t ii =
condarr->GetLast()+1;
310 for(Int_t i = 0; i < ii; i++)
313 cond->
GetFlags(enabled,lastresult,markreset, result, truevalue, falsevalue);
319 if(conny) conny->
GetFlags(enabled,lastresult,markreset, result, truevalue, falsevalue);
334 Int_t ii =
condarr->GetLast()+1;
335 for(Int_t i = 0; i < ii; i++)
358 if(conny) rev=conny->
Counts();
373 if(conny) rev=conny->
Counts();
388 if(conny) rev=conny->
GetXLow();
403 if(conny) rev=conny->
GetXUp();
418 if(conny) rev=conny->
GetYLow();
433 if(conny) rev=conny->
GetYUp();
445 Int_t ii =
condarr->GetLast()+1;
446 for(Int_t i = 0; i < ii; i++)
465 Int_t ii =
condarr->GetLast()+1;
466 for(Int_t i = 0; i < ii; i++)
475 if(conny) conny->
SetValues(low1,up1,low2,up2);
486 Int_t ii =
condarr->GetLast()+1;
487 for(Int_t i = 0; i < ii; i++)
507 if(cond->InheritsFrom(TGo4CondArray::Class()))
509 Int_t dii =
condarr->GetLast()+1;
516 for(Int_t i = 0; i < dii; i++){
519 result = result && ( dcond->
UpdateFrom(scond,counts));
539 Int_t ii =
condarr->GetLast()+1;
540 for(Int_t i = 0; i < ii; i++)
573 Int_t ii =
condarr->GetLast()+1;
574 for(Int_t i = 0; i < ii; i++)
607 Int_t ii =
condarr->GetLast()+1;
608 for(Int_t i = 0; i < ii; i++)
642 Int_t ii =
condarr->GetLast()+1;
643 for(Int_t i = 0; i < ii; i++)
674 Int_t ii =
condarr->GetLast()+1;
675 for(Int_t i = 0; i < ii; i++)
706 Int_t ii =
condarr->GetLast()+1;
707 for(Int_t i = 0; i < ii; i++)
738 Int_t ii =
condarr->GetLast()+1;
739 for(Int_t i = 0; i < ii; i++)
770 Int_t ii =
condarr->GetLast()+1;
771 for(Int_t i = 0; i < ii; i++)
802 Int_t ii =
condarr->GetLast()+1;
803 for(Int_t i = 0; i < ii; i++)
834 Int_t ii =
condarr->GetLast()+1;
835 for(Int_t i = 0; i < ii; i++)
866 Int_t ii =
condarr->GetLast()+1;
867 for(Int_t i = 0; i < ii; i++)
900 Int_t ii =
condarr->GetLast()+1;
901 for(Int_t i = 0; i < ii; i++)
921 Int_t ii =
condarr->GetLast()+1;
923 for(Int_t i = 0; i < ii; i++)
926 sum+=cond->
GetMean(histo,axis);
933 if(conny) rev=conny->
GetMean(histo,axis);
947 if(conny) rev=conny->
GetRMS(histo,axis);
989 if(conny) rev=conny->
GetXMax(histo);
1003 if(conny) rev=conny->
GetYMax(histo);
1013 Int_t ii =
condarr->GetLast()+1;
1014 for(Int_t i = 0; i < ii; i++)
1017 Double_t lmax=cond->
GetCMax(histo);
1018 if(lmax>rev) rev=lmax;
1024 if(conny) rev=conny->
GetCMax(histo);
1041 for(Int_t i = 0; i <=
condarr->GetLast(); i++) {
1051 for(Int_t i = 0; i <=
condarr->GetLast(); i++) {
1094 if (strstr(opt,
"sel=")==opt)
1095 selid = atoi(opt+4);
1098 bool selected = (selid<0) || (selid==i);
1108 if(painter==0)
return;
1109 if(painter->InheritsFrom(TGo4CondArrayPainter::Class()))
1116 TGo4Log::Warn(
"Could not set painter of class %s for TGo4CondArray %s",
1117 painter->ClassName(),GetName());
1130 Int_t size =
sizeof(*this);
1131 if (GetName()!=0) size+=strlen(GetName());
1132 if (GetTitle()!=0) size+=strlen(GetTitle());
1135 size+=
sizeof(*condarr) +
condarr->GetEntriesFast() *
sizeof(TObject*);
1150 TString extraargs = TString::Format(
", %d, \"%s\"",
GetNumber(),
GetType());
1151 TString varname =
MakeScript(out, Form(
"condarr%d", cnt++), opt, extraargs.Data());
1154 TString options = opt;
1155 const char* subname = strstr(opt,
"name:");
1156 if (subname!=0) options.Resize(subname - opt);
1159 TString subopt = options + TString::Format(
" nocreate name:%s->At(%d)", varname.Data(), n);
1160 At(n)->SavePrimitive(out, subopt.Data());
virtual Double_t GetRMS(TH1 *histo, Int_t axis=1)
virtual Bool_t IsYRMSDraw()
virtual void SetChanged(Bool_t on)
virtual Int_t TrueCounts()
virtual void MarkReset(Bool_t on)
virtual void SetIntDraw(Bool_t on)
virtual Bool_t IsVisible()
virtual Bool_t IsXMaxDraw()
const char * GetType() const
virtual Bool_t IsLabelDraw()
virtual Double_t GetXMax(TH1 *histo)
virtual Double_t GetMean(TH1 *histo, Int_t axis=1)
virtual void SetLimitsDraw(Bool_t on)
virtual Bool_t IsXRMSDraw()
virtual Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts)
virtual void SetLimitsDraw(Bool_t on)
void PrintCondition(Bool_t points)
virtual Double_t GetCMax(TH1 *histo)
virtual Bool_t IsXMeanDraw()
virtual Double_t GetCurtosis(TH1 *histo, Int_t axis=1)
virtual Int_t IsChanged()
virtual void SetYRMSDraw(Bool_t on)
virtual void GetFlags(Bool_t *enabled, Bool_t *lastresult, Bool_t *markreset, Bool_t *result, Bool_t *truevalue, Bool_t *falsevalue)
virtual void SetYRMSDraw(Bool_t on)
virtual void SetXMaxDraw(Bool_t on)
virtual Double_t GetYMax(TH1 *histo)
virtual Bool_t IsXMeanDraw()
virtual Bool_t IsLimitsDraw()
virtual void SetPainter(TGo4ConditionPainter *painter)
virtual void PrintCondition(Bool_t full=kTRUE)
static void Warn(const char *text,...)
virtual Bool_t IsLimitsDraw()
virtual Double_t GetSkewness(TH1 *histo, Int_t axis=1)
virtual Double_t GetXMax(TH1 *histo)
virtual Bool_t IsYMeanDraw()
virtual Double_t GetYUp()
TGo4WinCond * Win(Int_t i)
virtual void SetVisible(Bool_t on)
static void CleanupSpecials()
virtual Double_t GetIntegral(TH1 *histo, Option_t *opt="")
virtual void SetXMaxDraw(Bool_t on)
virtual Bool_t IsIntDraw()
virtual Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts)
virtual void ResetCounts()
virtual void Draw(Option_t *opt="")
virtual Bool_t IsXRMSDraw()
virtual void SetVisible(Bool_t on)
virtual Bool_t IsIntDraw()
virtual void SetYMaxDraw(Bool_t on)
void SetPainted(Bool_t on)
virtual Double_t GetXLow()
virtual Bool_t IsArrayType()
virtual void SetYMeanDraw(Bool_t on)
virtual void SavePrimitive(std::ostream &fs, Option_t *="")
virtual TGo4Condition * GetActiveCondition()
virtual Bool_t IsXMaxDraw()
virtual Double_t GetMean(TH1 *histo, Int_t axis=1)
virtual Double_t GetCurtosis(TH1 *histo, Int_t axis=1)
virtual Int_t GetNumberOfConditions()
virtual Bool_t IsVisible()
virtual void Invert(Bool_t on)
virtual void Disable(Bool_t result)
virtual Bool_t IsMultiEdit()
virtual void SetIntDraw(Bool_t on)
virtual Bool_t IsYMaxDraw()
virtual Double_t GetYLow()
virtual void SetYMeanDraw(Bool_t on)
virtual Bool_t IsCMaxDraw()
virtual void Disable(Bool_t result)
virtual void SetCMaxDraw(Bool_t on)
virtual void SetYMaxDraw(Bool_t on)
virtual void SetChanged(Bool_t on)
virtual void SetCondition(TGo4Condition *con)
virtual Bool_t IsYRMSDraw()
const char * MakeScript(std::ostream &out, const char *varname, Option_t *opt="", const char *arrextraargs=0)
virtual Double_t GetXLow()
virtual void SetXMeanDraw(Bool_t on)
virtual void GetFlags(Bool_t *enabled, Bool_t *lastresult, Bool_t *markreset, Bool_t *result, Bool_t *truevalue, Bool_t *falsevalue)
virtual Double_t GetSkewness(TH1 *histo, Int_t axis=1)
virtual Bool_t IsLabelDraw()
virtual void Draw(Option_t *opt="")
virtual void SetXMeanDraw(Bool_t on)
virtual TGo4ConditionPainter * CreatePainter()
TGo4PolyCond * Poly(Int_t i)
virtual void MarkReset(Bool_t on)
virtual void SetXRMSDraw(Bool_t on)
TGo4ConditionPainter * fxPainter
virtual Double_t GetYMax(TH1 *histo)
virtual void SetLabelDraw(Bool_t on)
virtual Int_t GetMemorySize()
virtual Bool_t IsPolygonType()
virtual Bool_t IsPolygonType()
TGo4Condition * At(Int_t i)
virtual Double_t GetXUp()
virtual Double_t GetRMS(TH1 *histo, Int_t axis=1)
virtual void SetCurrentIndex(Int_t ix)
virtual Bool_t IsCMaxDraw()
virtual void SetXRMSDraw(Bool_t on)
virtual Bool_t IsYMeanDraw()
virtual Double_t GetXUp()
virtual void SetLabelDraw(Bool_t on)
virtual Double_t GetCMax(TH1 *histo)
virtual Int_t IsChanged()
TGo4Condition * operator[](Int_t i)
virtual Bool_t IsYMaxDraw()
virtual void ResetCounts()
virtual Double_t GetIntegral(TH1 *histo, Option_t *opt="")
virtual void Invert(Bool_t on)
virtual Int_t GetMemorySize()
virtual Double_t GetYUp()
virtual void SetCMaxDraw(Bool_t on)
virtual Int_t GetCurrentIndex()
virtual Double_t GetYLow()