50 std::cout <<
"**** Geometrical shaped condition with parameters:" << std::endl;
54 std::cout <<
"**** Tilt: "<<
fdTheta<<
" deg" << std::endl;
55 std::cout <<
"**** Resolution: "<<
fiResolution<<
" points" << std::endl;
63 if (cond->InheritsFrom(TGo4ShapedCond::Class())) {
77 std::cout <<
"Cannot update " << GetName() <<
" from " << cond->ClassName()
90 message.Form(
"TGo4ShapedCond::UpdateFromUrl - condition %s: with url:%s\n", GetName(), rest_url_opt);
91 Double_t x = 0, y = 0, a = 0, b = 0;
104 message.Append(TString::Format(
"Set to Circle shape with x:%f, y:%f, r:%f, points=%d", x, y, a, resolution));
107 message.Append(TString::Format(
"Set to Ellipse shape with x:%f, y:%f, a:%f b:%f,theta:%f, points=%d", x, y, a, b,
111 message.Append(TString::Format(
"Set to Box shape with x:%f, y:%f, a:%f b:%f,theta:%f", x, y, a, b, theta));
112 SetBox(x, y, a, b, theta);
114 message.Append(
"Set to Free polygon shape!");
199 Double_t dphi = TMath::TwoPi()/n;
200 Double_t ct = TMath::Cos(TMath::Pi()*
fdTheta/180);
201 Double_t st = TMath::Sin(TMath::Pi()*
fdTheta/180);
202 for (Int_t i = 0; i < n; i++)
204 Double_t dx =
fdRadius1 * TMath::Cos((Double_t) i * dphi);
205 Double_t dy =
fdRadius2 * TMath::Sin((Double_t) i * dphi);
215 Double_t ct = TMath::Cos(TMath::Pi()*
fdTheta/180);
216 Double_t st = TMath::Sin(TMath::Pi()*
fdTheta/180);
225 for(Int_t i=4; i< n+1; ++i)
#define GO4ELLIPSECOND_DEFAULTRESOLUTION
Double_t GetUrlOptionAsDouble(const char *key, Double_t def_value)
Scan list of url options for key.
virtual Bool_t UpdateFromUrl(const char *rest_url_opt)
Method used by HTTP server to update some fields, specified in URL syntax.
Int_t GetUrlOptionAsInt(const char *key, Int_t def_value)
Scan list of url options for key.
static const char * Message(Int_t prio, const char *text,...) GO4_PRINTF2_ARGS
Display a message.
void PrintCondition(Bool_t points=kTRUE) override
Printout values.
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override
Copy values from cond to this.
Bool_t UpdateFromUrl(const char *rest_url_opt) override
Method used by HTTP server to update some fields, specified in URL syntax.
virtual void SetValues()
Set values needed, i.e.
void DefineEllipse(Double_t *x, Double_t *y, Int_t n)
Bool_t UpdateFromUrl(const char *rest_url_opt) override
Method used by HTTP server to update some fields, specified in URL syntax.
void SetTheta(Double_t angle)
void DefineBox(Double_t *x, Double_t *y, Int_t n)
static TString fgxURL_A1
web condition editor keyword used in UpdateFromUrl.
void GetRadius(Double_t &a1, Double_t &a2) const
Bool_t UpdateFrom(TGo4Condition *cond, Bool_t counts) override
Copy values from cond to this.
Go4CondShape_t fiShapeType
void SetCenter(Double_t x, Double_t y)
const char * GetShapeName() const
Double_t GetTheta() const
static TString fgxURL_A2
web condition editor keyword used in UpdateFromUrl.
static TString fgxURL_CX
web condition editor keyword used in UpdateFromUrl.
void GetCenter(Double_t &x, Double_t &y) const
Int_t GetResolution() const
static TString fgxURL_CY
web condition editor keyword used in UpdateFromUrl.
virtual ~TGo4ShapedCond()
void SetRadius(Double_t a1, Double_t a2)
static TString fgxURL_SHAPE
web condition editor keyword used in UpdateFromUrl.
static TString fgxURL_TH
web condition editor keyword used in UpdateFromUrl.
void PrintCondition(Bool_t points=kTRUE) override
Printout values.
static TString fgxURL_RESOLUTION
web condition editor keyword used in UpdateFromUrl.