]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant3/THIGZ.cxx
Coding convention correction and warning removal
[u/mrichter/AliRoot.git] / TGeant3 / THIGZ.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log$
8918e700 18Revision 1.4 1999/09/29 09:24:31 fca
19Introduction of the Copyright and cvs Log
20
4c039060 21*/
22
fe4da5cc 23///////////////////////////////////////////////////////////////////////////////
24// //
25// Interface to the HIGZ package for the GEANT drawing package //
26// //
27//Begin_Html
28/*
1439f98e 29<img src="picts/THIGZClass.gif">
fe4da5cc 30*/
31//End_Html
32// //
33// //
34///////////////////////////////////////////////////////////////////////////////
35
36#include "TROOT.h"
37#include "THIGZ.h"
38#include "TGeant3.h"
39#include "TGraph.h"
40#include "TColor.h"
41#include "TLine.h"
42#include "TPolyLine.h"
43#include "TPolyMarker.h"
44#include "TPaveLabel.h"
45#include "TText.h"
46#include "Rtypes.h"
47#include "AliCallf77.h"
48#include "TPaveTree.h"
49#include <string.h>
50#include <ctype.h>
51
52#ifndef WIN32
53# define hplint hplint_
54# define hplend hplend_
55# define hplfra hplfra_
56# define igmeta igmeta_
57# define iselnt iselnt_
58# define igiwty igiwty_
59# define igqwk igqwk_
60
61# define iacwk iacwk_
62# define iclrwk iclrwk_
63# define iclwk iclwk_
64# define idawk idawk_
65# define ifa ifa_
66# define igbox igbox_
67# define ightor ightor_
68# define igpave igpave_
69# define igpid igpid_
70# define igq igq_
71# define igrng igrng_
72# define igsa igsa_
73# define igset igset_
74# define igterm igterm_
75# define iopwk iopwk_
76# define ipl ipl_
77# define ipm ipm_
78# define irqlc irqlc_
79# define iscr iscr_
80# define isfaci isfaci_
81# define isfais isfais_
82# define isln isln_
83# define ismk ismk_
84# define islwsc islwsc_
85# define isplci isplci_
86# define ispmci ispmci_
87# define istxci istxci_
88# define isvp isvp_
89# define iswn iswn_
90# define itx itx_
91
92#else
93# define iacwk IACWK
94# define iclrwk ICLRWK
95# define iclwk ICLWK
96# define idawk IDAWK
97# define ifa IFA
98# define igbox IGBOX
99# define ightor IGHTOR
100# define igpave IGPAVE
101# define igpid IGPID
102# define igq IGQ
103# define igrng IGRNG
104# define igsa IGSA
105# define igset IGSET
106# define igterm IGTERM
107# define iopwk IOPWK
108# define ipl IPL
109# define ipm IPM
110# define irqlc IRQLC
111# define iscr ISCR
112# define isfaci ISFACI
113# define isfais ISFAIS
114# define isln ISLN
115# define ismk ISMK
116# define islwsc ISLWSC
117# define isplci ISPLCI
118# define ispmci ISPMCI
119# define istxci ISTXCI
120# define isvp ISVP
121# define iswn ISWN
122# define itx ITX
123#endif
124
125static Int_t npid = 0;
126static char cpar[1200];
cfce8870 127static TGeant3 *geant3=(TGeant3*)gMC;
fe4da5cc 128
8918e700 129THIGZ *gHigz = 0;
fe4da5cc 130
131ClassImp(THIGZ)
132
133//_______________________________________________________________
134THIGZ::THIGZ()
135 :TCanvas()
136{
137}
138
139//_______________________________________________________________
140THIGZ::THIGZ(Int_t size)
141 :TCanvas("higz","higz",size,size)
142{
8918e700 143 gHigz = this;
fe4da5cc 144 Reset();
145 SetFillColor(10);
146}
147//_______________________________________________________________
148THIGZ::~THIGZ()
149{
150}
151//_______________________________________________________________
152Float_t THIGZ::Get(const char *name)
153{
154 if (!strcmp(name,"FAIS")) return fFAIS;
155 if (!strcmp(name,"FASI")) return fFASI;
156 if (!strcmp(name,"LTYP")) return fLTYP;
157 if (!strcmp(name,"BASL")) return fBASL;
158 if (!strcmp(name,"LWID")) return fLWID;
159 if (!strcmp(name,"MTYP")) return fMTYP;
160 if (!strcmp(name,"MSCF")) return fMSCF;
161 if (!strcmp(name,"PLCI")) return fPLCI;
162 if (!strcmp(name,"PMCI")) return fPMCI;
163 if (!strcmp(name,"FACI")) return fFACI;
164 if (!strcmp(name,"TXCI")) return fTXCI;
165 if (!strcmp(name,"TXAL")) return fTXAL;
166 if (!strcmp(name,"CHHE")) return fCHHE*fY2;
167 if (!strcmp(name,"TANG")) return fTANG;
168 if (!strcmp(name,"TXFP")) return fTXFP;
169 if (!strcmp(name,"BORD")) return fBORD;
170 if (!strcmp(name,"NCOL")) return fNCOL;
171 if (!strcmp(name,"DRMD")) return fDRMD;
172 if (!strcmp(name,"SYNC")) return fSYNC;
173 if (!strcmp(name,"CLIP")) return fCLIP;
174 if (!strcmp(name,"2BUF")) return f2BUF;
175 return -1;
176}
177//_______________________________________________________________
178void THIGZ::Set(const char *name, Float_t val)
179{
180 if (!strcmp(name,"FAIS")) {fFAIS = Int_t(val); return;}
181 if (!strcmp(name,"FASI")) {fFASI = Int_t(val); return;}
182 if (!strcmp(name,"LTYP")) {fLTYP = Int_t(val); return;}
183 if (!strcmp(name,"BASL")) {fBASL = val; return;}
184 if (!strcmp(name,"LWID")) {fLWID = val; if (val <= 0) fLWID=1; return;}
185 if (!strcmp(name,"MTYP")) {fMTYP = Int_t(val); return;}
186 if (!strcmp(name,"MSCF")) {fMSCF = val; return;}
187 if (!strcmp(name,"PLCI")) {fPLCI = Int_t(val); return;}
188 if (!strcmp(name,"PMCI")) {fPMCI = Int_t(val); return;}
189 if (!strcmp(name,"FACI")) {fFACI = Int_t(val)%1000; return;}
190 if (!strcmp(name,"TXCI")) {fTXCI = Int_t(val); return;}
191 if (!strcmp(name,"TXAL")) {
192 Int_t align = Int_t(val);
193 Int_t aligh = align/10;
194 Int_t aligv = align%10;
195 Int_t ah = aligh;
196 Int_t av = aligv;
197 if (aligh == 0) ah = 1;
198 if (aligv == 1 || aligh == 2) av = 3;
199 if (aligv == 3) av = 2;
200 if (aligv == 0) av = 1;
201 fTXAL = 10*ah + av;
202 return;
203 }
204 if (!strcmp(name,"CHHE")) {fCHHE = val/fY2; if (fCHHE <= 0) fCHHE = 0.03; return;}
205 if (!strcmp(name,"TANG")) {fTANG = val; return;}
206 if (!strcmp(name,"TXFP")) {fTXFP = Int_t(val); return;}
207 if (!strcmp(name,"BORD")) {fBORD = Int_t(val); return;}
208 if (!strcmp(name,"NCOL")) {fNCOL = Int_t(val); return;}
209 if (!strcmp(name,"DRMD")) {fDRMD = Int_t(val); return;}
210 if (!strcmp(name,"SYNC")) {fSYNC = Int_t(val); return;}
211 if (!strcmp(name,"CLIP")) {fCLIP = Int_t(val); return;}
212 if (!strcmp(name,"2BUF")) {f2BUF = Int_t(val); return;}
213}
214//_______________________________________________________________
215void THIGZ::Reset(Option_t *)
216{
217 fFAIS = 0;
218 fFASI = 1;
219 fLTYP = 1;
220 fBASL = 1;
221 fLWID = 1;
222 fMTYP = 1;
223 fMSCF = 1;
224 fPLCI = 1;
225 fPMCI = 1;
226 fFACI = 1;
227 fTXCI = 1;
228 fTXAL = 12;
229 fCHHE = 0.03;
230 fTANG = 0;
231 fTXFP = 62;
232 fBORD = 0;
233 fNCOL = 8;
234 fDRMD = 1;
235 fSYNC = 1;
236 fCLIP = 0;
237 f2BUF = 0;
238 fPID = 0;
239 fPname= "";
240}
241//___________________________________________
242void THIGZ::Gsatt(const char *name, const char *att, Int_t val)
243{
244// NAME Volume name
245// IOPT Name of the attribute to be set
246// IVAL Value to which the attribute is to be set
247//
248// name= "*" stands for all the volumes.
249// iopt can be chosen among the following :
250// see TGeant3::Gsatt for more details
251//
252
cfce8870 253 gMC->Gsatt(name,att,val);
fe4da5cc 254}
255
256//___________________________________________
257void THIGZ::Gdopt(const char *name,const char *value)
258{
259// NAME Option name
260// VALUE Option value
261//
262// To set/modify the drawing options.
263// see TGeant3::Gdopt for more details
264//
cfce8870 265 gMC->Gdopt(name,value);
fe4da5cc 266}
267
268
269//___________________________________________
270void THIGZ::Gdraw(const char *name,Float_t theta, Float_t phi, Float_t psi,Float_t u0,Float_t v0,Float_t ul,Float_t vl)
271{
272// NAME Volume name
273// +
274// THETA Viewing angle theta (for 3D projection)
275// PHI Viewing angle phi (for 3D projection)
276// PSI Viewing angle psi (for 2D rotation)
277// U0 U-coord. (horizontal) of volume origin
278// V0 V-coord. (vertical) of volume origin
279// SU Scale factor for U-coord.
280// SV Scale factor for V-coord.
281// see TGeant3::Gdraw for more details
282//
283
cfce8870 284 gMC->Gdraw(name,theta,phi,psi,u0,v0,ul,vl);
fe4da5cc 285}
286
287
288//___________________________________________
289void THIGZ::Gdrawc(const char *name,Int_t axis, Float_t cut,Float_t u0,Float_t v0,Float_t ul,Float_t vl)
290{
291// NAME Volume name
292// CAXIS Axis value
293// CUTVAL Cut plane distance from the origin along the axis
294// +
295// U0 U-coord. (horizontal) of volume origin
296// V0 V-coord. (vertical) of volume origin
297// SU Scale factor for U-coord.
298// SV Scale factor for V-coord.
299// see TGeant3::Gdrawc for more details
300//
301
fe4da5cc 302 geant3->Gdrawc(name,axis,cut,u0,v0,ul,vl);
303}
304
305
306//___________________________________________
307void THIGZ::Gdspec(const char *name)
308{
309// NAME Volume name
310//
311// Shows 3 views of the volume (two cut-views and a 3D view), together with
312// its geometrical specifications. The 3D drawing will
313// be performed according the current values of the options HIDE and
314// SHAD and according the current CVOL clipping parameters for that
315// volume.
316// see TGeant3::Gdspec for more details
317//
318
fe4da5cc 319 geant3->Gdspec(name);
320}
321
322
323//___________________________________________
324void THIGZ::Gdtree(const char *name,Int_t levmax, Int_t isel)
325{
326// NAME Volume name
327// LEVMAX Depth level
328// ISELT Options
329//
330// This function draws the logical tree,
331// Each volume in the tree is represented by a TPaveTree object.
332// Double-clicking on a TPaveTree draws the specs of the corresponding volume.
333// Use TPaveTree pop-up menu to select:
334// - drawing specs
335// - drawing tree
336// - drawing tree of parent
337//
338
fe4da5cc 339 geant3->Gdtree(name,levmax,isel);
340}
341
342
343//______________________________________________________________________________
344void THIGZ::SetBOMB(Float_t boom)
345{
346// BOOM : Exploding factor for volumes position
347//
348// To 'explode' the detector. If BOOM is positive (values smaller
349// than 1. are suggested, but any value is possible)
350// all the volumes are shifted by a distance
351// proportional to BOOM along the direction between their centre
352// and the origin of the MARS; the volumes which are symmetric
353// with respect to this origin are simply not shown.
354// BOOM equal to 0 resets the normal mode.
355// A negative (greater than -1.) value of
356// BOOM will cause an 'implosion'; for even lower values of BOOM
357// the volumes' positions will be reflected respect to the origin.
358// This command can be useful to improve the 3D effect for very
359// complex detectors. The following commands will make explode the
360// detector:
361
fe4da5cc 362 geant3->SetBOMB(boom);
363}
364
365//_______________________________________________________________
366extern "C" void type_of_call iacwk(Int_t &)
367{
368// printf("iacwk called,wid=%d\n",wid);
369}
370
371//_______________________________________________________________
372extern "C" void type_of_call iclrwk(Int_t &,Int_t &)
373{
374// printf("iclrwk called\n");
8918e700 375 gHigz->Clear();
fe4da5cc 376}
377
378//_______________________________________________________________
379extern "C" void type_of_call iclwk(Int_t &,Int_t &)
380{
381// printf("iclwk called\n");
382
383}
384
385//_______________________________________________________________
386extern "C" void type_of_call idawk(Int_t &)
387{
388// printf("idawk called\n");
389}
390
391//_______________________________________________________________
392extern "C" void type_of_call ifa(Int_t &n,Float_t *x, Float_t *y)
393{
8918e700 394// printf("ifa called, n=%d, pname=%s, pid=%d, x1=%f, y1=%f,x2=%f, y2=%f, x3=%f, y3=%f\n",n,gHigz->fPname.Data(),gHigz->fPID,x[0],y[0],x[1],y[1],x[2],y[2]);
fe4da5cc 395 TGraph *gr = new TGraph(n,x,y);
8918e700 396 gr->SetFillColor(gHigz->fFACI);
fe4da5cc 397 gr->Draw("f");
398}
399
400//_______________________________________________________________
401extern "C" void type_of_call igbox(Float_t &x1,Float_t &x2,Float_t &y1,Float_t &y2)
402{
403 printf("igbox called, x1=%f, y1=%f, x2=%f, y2=%f\n",x1,y1,x2,y2);
404 TBox *box = new TBox(x1,y1,x2,y2);
8918e700 405 box->SetLineColor(gHigz->fPLCI);
406 box->SetFillColor(gHigz->fFACI);
407 box->SetFillStyle(gHigz->fFASI);
fe4da5cc 408 box->Draw();
409}
410
411//_______________________________________________________________
412extern "C" void type_of_call ightor(Float_t &h,Float_t &l,Float_t &s,Float_t &r,Float_t &g,Float_t &b)
413{
414// printf("ightor called\n");
415 TColor *col1 = gROOT->GetColor(1);
416 if (col1) col1->HLStoRGB(h,l,s,r,g,b);
417}
418
419//_______________________________________________________________
420extern "C" void type_of_call igpave(Float_t &x1,Float_t &x2,Float_t &yy1,Float_t &yy2,Float_t &,Int_t &isbox,Int_t &isfram,const char *, const Int_t)
421{
422 char text[5];
8918e700 423 strncpy(text,(char*)&gHigz->fPID,4);
fe4da5cc 424 text[4] = 0;
425 Float_t y1 = yy1;
426 Float_t y2 = yy2;
427 if (y1 > y2) { y1 = yy2; y2 = yy1;}
428 Float_t y = 0.5*(y1+y2);
8918e700 429 Float_t dymax = 0.06*(gHigz->GetY2()-gHigz->GetY1());
430 Float_t dymin = -gHigz->PixeltoY(12);
fe4da5cc 431 if (y2-y1 > dymax) {
432 y1 = y - 0.5*dymax;
433 y2 = y + 0.5*dymax;
434 }
435 if (y2-y1 < dymin) {
436 y1 = y - 0.5*dymin;
437 y2 = y + 0.5*dymin;
438 }
439 TPaveTree *pt = new TPaveTree(x1,y1,x2,y2,text);
440 pt->SetTextColor(5);
441 pt->SetFillColor(isbox%1000);
442 pt->SetLineColor(isfram%1000);
443 pt->Draw();
8918e700 444// printf("igpave called, text=%s, Pname=%s, x1=%f, y1=%f, x2=%f, y2=%f, isbox=%d, isfram=%d\n",text,gHigz->fPname.Data(),x1,y1,x2,y2,isbox,isfram);
fe4da5cc 445}
446
447//_______________________________________________________________
448#ifndef WIN32
449extern "C" void type_of_call igpid(Int_t &,const char *name,Int_t &pid,const char *, const Int_t l1, const Int_t)
450#else
451extern "C" void type_of_call igpid(Int_t &,const char *name,const Int_t l1, Int_t &pid,const char *, const Int_t)
452#endif
453{
454 npid++;
455// if(npid&100 == 0) printf("igpid called, npid=%d\n",npid);
456 strncpy(cpar,name,l1); cpar[l1] = 0;
8918e700 457 gHigz->fPname = cpar;
458 gHigz->fPID = pid;
fe4da5cc 459
460// char text[5];
8918e700 461// strncpy(text,(char*)&gHigz->fPID,4);
fe4da5cc 462// text[4] = 0;
463// printf("igpid called, level=%d, name=%s, pid=%d, cpid=%s\n",level,cpar,pid,text);
464}
465
466//_______________________________________________________________
467#ifndef WIN32
468extern "C" void type_of_call igq(const char *name,Float_t &rval, const Int_t l1)
469#else
470extern "C" void type_of_call igq(const char *name,const Int_t l1, Float_t &rval)
471#endif
472{
473 strncpy(cpar,name,l1); cpar[l1] = 0;
474// printf("igq called, name=%s\n",cpar);
8918e700 475 rval = gHigz->Get(cpar);
fe4da5cc 476}
477
478//_______________________________________________________________
479extern "C" void type_of_call igrng(Float_t &xsize,Float_t &ysize)
480{
481// printf("igrng called, xsize=%f, ysize=%f\n",xsize,ysize);
8918e700 482 gHigz->Range(0,0,xsize,ysize);
fe4da5cc 483}
484
485//_______________________________________________________________
486extern "C" void type_of_call igsa(Int_t &)
487{
488// printf("igsa called, iwk=%d\n",iwk);
489}
490
491//_______________________________________________________________
492#ifndef WIN32
493extern "C" void type_of_call igset(const char *name,Float_t &rval, const Int_t l1)
494#else
495extern "C" void type_of_call igset(const char *name, const Int_t l1,Float_t &rval)
496#endif
497{
498 strncpy(cpar,name,l1); cpar[l1] = 0;
499// printf("igset called, name=%s, rval=%f\n",cpar,rval);
8918e700 500 gHigz->Set(cpar,rval);
fe4da5cc 501}
502
503//_______________________________________________________________
504extern "C" void type_of_call igterm()
505{
506 printf("igterm called\n");
507}
508
509//_______________________________________________________________
510extern "C" void type_of_call iopwk(Int_t &iwkid,Int_t &iconid,Int_t &iwtypi)
511{
512 printf("iopwk called, iwkid=%d, iconid=%d, iwtypi=%d\n",iwkid,iconid,iwtypi);
513}
514
515//_______________________________________________________________
516extern "C" void type_of_call ipl(Int_t &n,Float_t *x,Float_t *y)
517{
518// printf("ipl called, n=%d, x[0]=%f,y[0]=%f, x[1]=%f, y[1]=%f\n",n,x[0],y[0],x[1],y[1]);
519 if (n <= 2) {
520 TLine *l = new TLine(x[0],y[0],x[1],y[1]);
8918e700 521 l->SetLineColor(gHigz->fPLCI);
522 l->SetLineStyle(gHigz->fLTYP);
523 l->SetLineWidth(Short_t(gHigz->fLWID));
fe4da5cc 524 l->Draw();
525 } else {
526 TPolyLine *pl = new TPolyLine(n,x,y);
8918e700 527 pl->SetLineColor(gHigz->fPLCI);
528 pl->SetLineStyle(gHigz->fLTYP);
529 pl->SetLineWidth(Short_t(gHigz->fLWID));
fe4da5cc 530 pl->Draw();
531 }
532}
533
534//_______________________________________________________________
535extern "C" void type_of_call ipm(Int_t &n,Float_t *x,Float_t *y)
536{
537 printf("ipm called, n=%d\n",n);
538 TPolyMarker *pm = new TPolyMarker(n,x,y);
8918e700 539 pm->SetMarkerColor(gHigz->fPMCI);
540 pm->SetMarkerStyle(gHigz->fMTYP);
541 pm->SetMarkerSize(gHigz->fMSCF);
fe4da5cc 542 pm->Draw();
543}
544
545//_______________________________________________________________
546extern "C" void type_of_call irqlc(Int_t&, Int_t&, Int_t&, Int_t&, Float_t&, Float_t&)
547
548{
549 printf("irqlc called\n");
550}
551
552//_______________________________________________________________
553extern "C" void type_of_call iscr(Int_t &,Int_t &ici,Float_t &r,Float_t &g,Float_t &b)
554{
555// printf("iscr called, ici=%d, r=%f, g=%f, b=%f\n",ici,r,g,b);
556 Int_t color = ici;
557// if (color > 10) color += 35;
558 TColor *col = gROOT->GetColor(color);
559 if (!col) {
560 col = new TColor(color,r,g,b);
561 return;
562 } else {
563 col->SetRGB(r,g,b);
564 }
565}
566
567//_______________________________________________________________
568extern "C" void type_of_call isfaci(Int_t &col)
569{
570// printf("isfaci called, col=%d\n",col);
571 Int_t color = col%1000;
572// if (color > 10) color += 35;
8918e700 573 gHigz->fFACI = color;
fe4da5cc 574}
575
576//_______________________________________________________________
577extern "C" void type_of_call isfais(Int_t &is)
578{
579// printf("isfais called, is=%d\n",is);
8918e700 580 gHigz->fFAIS = is;
fe4da5cc 581}
582
583//_______________________________________________________________
584extern "C" void type_of_call isln(Int_t &ln)
585{
586// printf("isln called, ln=%d\n",ln);
8918e700 587 gHigz->fLTYP = ln;
fe4da5cc 588}
589
590//_______________________________________________________________
591extern "C" void type_of_call ismk(Int_t &mk)
592{
593// printf("ismk called, mk=%d\n",mk);
8918e700 594 gHigz->fMTYP = mk;
fe4da5cc 595}
596
597//_______________________________________________________________
598extern "C" void type_of_call islwsc(Float_t &wl)
599{
600// printf("islwsc called, wl=%f\n",wl);
8918e700 601 gHigz->fLWID = wl;
fe4da5cc 602}
603
604//_______________________________________________________________
605extern "C" void type_of_call isplci(Int_t &col)
606{
607// printf("isplci called, col=%d\n",col);
608 Int_t color = col%1000;
609// if (color > 10) color += 35;
8918e700 610 gHigz->fPLCI = color;
fe4da5cc 611}
612
613//_______________________________________________________________
614extern "C" void type_of_call ispmci(Int_t &col)
615{
616// printf("ispmci called, col=%d\n",col);
617 Int_t color = col%1000;
618// if (color > 10) color += 35;
8918e700 619 gHigz->fPMCI = color;
fe4da5cc 620}
621
622//_______________________________________________________________
623extern "C" void type_of_call istxci(Int_t &col)
624{
625// printf("istxci called, col=%d\n",col);
626 Int_t color = col%1000;
627// if (color > 10) color += 35;
8918e700 628 gHigz->fTXCI = color;
fe4da5cc 629}
630
631//_______________________________________________________________
632extern "C" void type_of_call isvp(Int_t &,Float_t &,Float_t &,Float_t &,Float_t &)
633{
634// printf("isvp called, nt=%d, x1=%f, y1=%f, x2=%f, y2=%f\n",nt,x1,y1,x2,y2);
635}
636
637//_______________________________________________________________
638extern "C" void type_of_call iswn(Int_t &,Float_t &x1,Float_t &x2,Float_t &y1,Float_t &y2)
639
640{
641// printf("iswn called, nt=%d, x1=%f, y1=%f, x2=%f, y2=%f\n",nt,x1,y1,x2,y2);
8918e700 642 gHigz->Range(x1,y1,x2,y2);
fe4da5cc 643}
644
645//_______________________________________________________________
646extern "C" void type_of_call itx(Float_t &x,Float_t &y,const char *ptext, const Int_t l1p)
647{
8918e700 648 if (gHigz->fPname == "Tree") return;
fe4da5cc 649 Int_t l1=l1p;
650 strncpy(cpar,ptext,l1); cpar[l1] = 0;
651//printf("itx called, x=%f, y=%f, text=%s, l1=%d\n",x,y,cpar,l1);
652 while(l1) {
653 if (cpar[l1-1] != ' ' && cpar[l1-1] != '$') break;
654 l1--;
655 cpar[l1] = 0;
656 }
657 char *small = strstr(cpar,"<");
658 while(small && *small) {
659 small[0] = tolower(small[1]);
660 small++;
661 }
662 TText *text = new TText(x,y,cpar);
8918e700 663 text->SetTextColor(gHigz->fTXCI);
664 text->SetTextSize(gHigz->fCHHE);
665 text->SetTextFont(gHigz->fTXFP);
666 text->SetTextAlign(gHigz->fTXAL);
667 text->SetTextAngle(gHigz->fTANG);
fe4da5cc 668 text->Draw();
669}
670
671//_______________________________________________________________
672extern "C" void type_of_call hplint(Int_t &)
673{
674 printf("hplint called\n");
675 new THIGZ(600);
676}
677
678//_______________________________________________________________
679extern "C" void type_of_call hplend()
680{
681 printf("hplend called\n");
682}
683
684//_______________________________________________________________
685extern "C" void type_of_call hplfra(Float_t &x1,Float_t &x2,Float_t &y1, Float_t &y2,const char *, const Int_t)
686{
687// printf("hplfra called, x1=%f, y1=%f, x2=%f, y2=%f\n",x1,y1,x2,y2);
8918e700 688 gHigz->Clear();
689 gHigz->Range(x1,y1,x2,y2);
fe4da5cc 690}
691
692//_______________________________________________________________
693extern "C" void type_of_call igmeta(Int_t &, Int_t &)
694{
695 printf("igmeta called\n");
696}
697
698//_______________________________________________________________
699extern "C" void type_of_call iselnt(Int_t &)
700{
701// printf("iselnt called, nt=%d\n",nt);
702}
703
704//_______________________________________________________________
705extern "C" Int_t type_of_call igiwty(Int_t &)
706{
707// printf("igiwty called, wid=%d\n",wid);
708 return 1;
709}
710
711//_______________________________________________________________
712extern "C" void type_of_call igqwk(Int_t &, const char *name, Float_t &rval, const Int_t l1)
713{
714 strncpy(cpar,name,l1); cpar[l1] = 0;
715// printf("igqwk called, wid=%d, pname=%s\n",wid,cpar);
8918e700 716 rval = gHigz->Get(cpar);
fe4da5cc 717}
718