CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SiPixelTrackerMap Class Reference

#include <SiPixelTrackerMap.h>

Inheritance diagram for SiPixelTrackerMap:
TrackerMap

Public Member Functions

void drawModule (TmModule *mod, int key, int nlay, bool print_total)
 
void print (bool print_total=true, std::string TKType="Averages", float minval=0., float maxval=0.)
 
 SiPixelTrackerMap (std::string s=" ", int xsize1=340, int ysize1=200)
 
 ~SiPixelTrackerMap (void)
 
- Public Member Functions inherited from TrackerMap
void addPixel (bool addPixelfl)
 
void build ()
 
void defcwindow (int num_crate)
 
void deffecwindow (int num_crate)
 
void defpsuwindow (int num_rack)
 
void defwindow (int num_lay)
 
void drawApvPair (int crate, int numfed_incrate, bool total, TmApvPair *apvPair, std::ofstream *file, bool useApvPairValue)
 
void drawCcu (int crate, int numfed_incrate, bool total, TmCcu *ccu, std::ofstream *file, bool useCcuValue)
 
void drawHV2 (int rack, int numcrate_inrack, bool print_total, TmPsu *psu, std::ofstream *svgfile, bool usePsuValue)
 
void drawHV3 (int rack, int numcrate_inrack, bool print_total, TmPsu *psu, std::ofstream *svgfile, bool usePsuValue)
 
void drawModule (TmModule *mod, int key, int layer, bool total, std::ofstream *file)
 
void drawPalette (std::ofstream *file, int xoffset=3660, int yoffset=1540)
 
void drawPsu (int rack, int numcrate_inrack, bool print_total, TmPsu *psu, std::ofstream *svgfile, bool usePsuValue)
 
void fill (int layer, int ring, int nmod, float x)
 
void fill (int idmod, float qty)
 
void fill_all_blank ()
 
void fill_current_val (int idmod, float current_val)
 
void fill_current_val_fed_channel (int fedId, int fedCh, float current_val)
 
void fill_fec_channel (int crate, int slot, int ring, int addr, float qty)
 
void fill_fed_channel (int fedId, int fedCh, float qty)
 
void fill_fed_channel (int modId, float qty)
 
void fill_hv_channel2 (int rack, int crate, int board, float qty)
 
void fill_hv_channel3 (int rack, int crate, int board, float qty)
 
void fill_lv_channel (int rack, int crate, int board, float qty)
 
void fillc (int idmod, int RGBcode)
 
void fillc (int idmod, int red, int green, int blue)
 
void fillc (int layer, int ring, int nmod, int red, int green, int blue)
 
void fillc_all_blank ()
 
void fillc_fec_channel (int crate, int slot, int ring, int addr, int red, int green, int blue)
 
void fillc_fed_channel (int fedId, int fedCh, int red, int green, int blue)
 
void fillc_hv_channel2 (int rack, int crate, int board, int red, int green, int blue)
 
void fillc_hv_channel3 (int rack, int crate, int board, int red, int green, int blue)
 
void fillc_lv_channel (int rack, int crate, int board, int red, int green, int blue)
 
int find_layer (int ix, int iy)
 
std::ifstream * findfile (std::string filename)
 
std::pair< float, float > getAutomaticRange ()
 
int getcolor (float value, int palette)
 
int getlayerCount (int subdet, int partdet)
 
int getmoduleCount (int subdet, int partdet, int layer, int ring)
 
int getNumMod ()
 
int getringCount (int subdet, int partdet, int layer)
 
int getxsize ()
 
int getysize ()
 
void init ()
 
std::string layername (int layer)
 
void load (std::string s="tmap.svg")
 
int module (int fedId, int fedCh)
 
int nlayer (int det, int part, int lay)
 
void onlyPixel (bool onlyPixelfl)
 
double phival (double x, double y)
 
void print (bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap")
 
void printall (bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap", int width=6000, int height=3200)
 
void printlayers (bool print_total=true, float minval=0., float maxval=0., std::string s="layer")
 
void printonline ()
 
void reset ()
 
void save (bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
 
void save_as_fectrackermap (bool print_total=true, float minval=0., float maxval=0., std::string s="fec_svgmap.svg", int width=1500, int height=800)
 
void save_as_fedtrackermap (bool print_total=true, float minval=0., float maxval=0., std::string s="fed_svgmap.svg", int width=YFEDOFFSET+(YFEDCSIZE+YFEDOFFSET)*NUMFEDCRATE_INROW+300, int height=XFEDOFFSET+(XFEDCSIZE+XFEDOFFSET)*NUMFEDCRATE_INCOLUMN+300)
 
void save_as_HVtrackermap (bool print_total=true, float minval=0., float maxval=0., std::string s="psu_svgmap.svg", int width=1500, int height=800)
 
void save_as_psutrackermap (bool print_total=true, float minval=0., float maxval=0., std::string s="psu_svgmap.svg", int width=YPSUOFFSET+(YPSURSIZE+YPSUOFFSET)*NUMPSURACK_INROW+300, int height=XPSUOFFSET+(XPSURSIZE+XPSUOFFSET)*NUMPSURACK_INCOLUMN+300)
 
void setPalette (int numpalette)
 
void setRange (float min, float max)
 
void setText (int idmod, std::string s)
 
void setText (int layer, int ring, int nmod, std::string s)
 
void setTitle (std::string s)
 
void showPalette (bool printflag1)
 
 TrackerMap (std::string s=" ", int xsize1=340, int ysize1=200)
 
 TrackerMap (const edm::ParameterSet &iConfig)
 
 TrackerMap (const edm::ParameterSet &iConfig, const SiStripFedCabling *tkFed)
 
double xdpixel (double x)
 
double xdpixelc (double x)
 
double xdpixelfec (double x)
 
double xdpixelpsu (double x)
 
double ydpixel (double y)
 
double ydpixelc (double y)
 
double ydpixelfec (double y)
 
double ydpixelpsu (double y)
 
 ~TrackerMap ()
 default destructor More...
 

Private Attributes

int dummy
 
std::string title
 

Additional Inherited Members

- Public Types inherited from TrackerMap
typedef std::multimap< TmCcu
*, TmModule * > 
FecModule
 
typedef std::map< const int,
TmModule * > 
ImoduleMap
 
typedef std::map< const int,
TmCcu * > 
MapCcu
 
typedef std::map< const int,
TmPsu * > 
MapPsu
 
typedef std::multimap< const
int, TmApvPair * > 
ModApvPair
 
typedef std::multimap< TmPsu
*, TmModule * > 
PsuModule
 
typedef std::map< const int,
TmModule * > 
SmoduleMap
 
typedef std::map< const int,
TmApvPair * > 
SvgApvPair
 
typedef std::map< const int, int > SvgFed
 
- Static Public Member Functions inherited from TrackerMap
static bool isRingStereo (int key)
 
static int layerno (int subdet, int leftright, int layer)
 
- Public Attributes inherited from TrackerMap
SvgApvPair apvMap
 
ModApvPair apvModuleMap
 
MapCcu ccuMap
 
bool enableFecProcessing
 
bool enableFedProcessing
 
bool enableHVProcessing
 
bool enableLVProcessing
 
FecModule fecModuleMap
 
SvgFed fedMap
 
int firstRing [43]
 
ImoduleMap imoduleMap
 
std::string infilename
 
std::string jsfilename
 
std::string jsPath
 
int ndet
 
int npart
 
int ntotRing [43]
 
int palette
 
bool printflag
 
bool psetAvailable
 
MapPsu psuMap
 
PsuModule psuModuleMap
 
bool saveGeoTrackerMap
 
bool saveWebInterface
 
SvgFed slotMap
 
SmoduleMap smoduleMap
 
std::string title
 
bool tkMapLog
 
std::vector< TColor * > vc
 
- Protected Attributes inherited from TrackerMap
std::ifstream * ccufile
 
bool firstcall
 
int firstcrate
 
float gmaxvalue
 
float gminvalue
 
std::ifstream * inputfile
 
int ix
 
int iy
 
std::ifstream * jsfile
 
float maxvalue
 
float minvalue
 
int ncrates
 
int nfeccrates
 
int nlay
 
int npsuracks
 
int number_modules
 
bool posrel
 
std::ofstream * savefile
 
std::ofstream * svgfile
 
bool temporary_file
 
double xmax
 
double xmin
 
int xsize
 
double ymax
 
double ymin
 
int ysize
 

Detailed Description

Definition at line 23 of file SiPixelTrackerMap.h.

Constructor & Destructor Documentation

SiPixelTrackerMap::SiPixelTrackerMap ( std::string  s = " ",
int  xsize1 = 340,
int  ysize1 = 200 
)

Definition at line 33 of file SiPixelTrackerMap.cc.

References alignCSCRings::s, and title.

33  : TrackerMap(s,xsize1,ysize1)
34 {
35 // cout << ACBlue << ACBold
36 // << "[SiPixelTrackerMap::SiPixelTrackerMap()]"
37 // << endl ;
38  title = s ;
39  // cout<<"created a new Tracker Map! the title is: "<<s<<endl;
40 }
TrackerMap(std::string s=" ", int xsize1=340, int ysize1=200)
Definition: TrackerMap.cc:411
SiPixelTrackerMap::~SiPixelTrackerMap ( void  )
inline

Definition at line 30 of file SiPixelTrackerMap.h.

30 {;}

Member Function Documentation

void SiPixelTrackerMap::drawModule ( TmModule mod,
int  key,
int  nlay,
bool  print_total 
)

Definition at line 43 of file SiPixelTrackerMap.cc.

References funct::cos(), edm::false, TmModule::idex, TmModule::idModule, TrackerMap::isRingStereo(), j, gen::k, TmModule::length, M_PI, edm::moduleName(), TmModule::name, np, phi, TrackerMap::phival(), TrackerMap::posrel, TmModule::posx, TmModule::posy, TmModule::posz, alignCSCRings::r, reco::return(), TmModule::ring, funct::sin(), mathSSE::sqrt(), TrackerMap::svgfile, TmModule::text, TmModule::width, TmModule::widthAtHalfLength, TrackerMap::xdpixel(), and TrackerMap::ydpixel().

Referenced by print().

44 {
45  //int x,y;
46  double phi,r,dx,dy, dy1;
47  double xp[4],yp[4],xp1,yp1;
48  double vhbot,vhtop,vhapo;
49  double rmedio[]={0.041,0.0701,0.0988,0.255,0.340,0.430,0.520,0.610,0.696,0.782,0.868,0.965,1.080};
50  double xt1,yt1,xs1=0.,ys1=0.,xt2,yt2,xs2,ys2,pv1,pv2;
51 // int green = 0;
52  double xd[4],yd[4];
53  int np = 4;
54  //int numrec=0;
55  int numod=0;
56  phi = phival(mod->posx,mod->posy);
57  r = sqrt(mod->posx*mod->posx+mod->posy*mod->posy);
58  vhbot = mod->width;
59  vhtop=mod->width;
60  vhapo=mod->length;
61  if(nlay < 31){ //endcap
62  vhbot = mod->widthAtHalfLength/2.-(mod->width/2.-mod->widthAtHalfLength/2.);
63  vhtop=mod->width/2.;
64  vhapo=mod->length/2.;
65  if(nlay >12 && nlay <19){
66  if(posrel)r = r+r;
67  xp[0]=r-vhtop;yp[0]=-vhapo;
68  xp[1]=r+vhtop;yp[1]=-vhapo;
69  xp[2]=r+vhtop;yp[2]=vhapo;
70  xp[3]=r-vhtop;yp[3]=vhapo;
71  }else{
72  if(posrel)r = r + r/3.;
73  xp[0]=r-vhapo;yp[0]=-vhbot;
74  xp[1]=r+vhapo;yp[1]=-vhtop;
75  xp[2]=r+vhapo;yp[2]=vhtop;
76  xp[3]=r-vhapo;yp[3]=vhbot;
77  }
78  for(int j=0;j<4;j++){
79  xp1 = xp[j]*cos(phi)-yp[j]*sin(phi);
80  yp1 = xp[j]*sin(phi)+yp[j]*cos(phi);
81  xp[j] = xp1;yp[j]=yp1;
82  }
83  } else { //barrel
84  numod=mod->idModule;if(numod>100)numod=numod-100;
85  int vane = mod->ring;
86  if(posrel){
87  dx = vhapo;
88  phi=M_PI;
89  xt1=rmedio[nlay-31]; yt1=-vhtop/2.;
90  xs1 = xt1*cos(phi)-yt1*sin(phi);
91  ys1 = xt1*sin(phi)+yt1*cos(phi);
92  xt2=rmedio[nlay-31]; yt2=vhtop/2.;
93  xs2 = xt2*cos(phi)-yt2*sin(phi);
94  ys2 = xt2*sin(phi)+yt2*cos(phi);
95  dy=phival(xs2,ys2)-phival(xs1,ys1);
96  dy1 = dy;
97  if(nlay==31)dy1=0.39;
98  if(nlay==32)dy1=0.23;
99  if(nlay==33)dy1=0.16;
100  xp[0]=vane*(dx+dx/8.);yp[0]=numod*(dy1);
101  xp[1]=vane*(dx+dx/8.)+dx;yp[1]=numod*(dy1);
102  xp[2]=vane*(dx+dx/8.)+dx;yp[2]=numod*(dy1)+dy;
103  xp[3]=vane*(dx+dx/8.);yp[3]=numod*(dy1)+dy;
104  }else{
105  xt1=r; yt1=-vhtop/2.;
106  xs1 = xt1*cos(phi)-yt1*sin(phi);
107  ys1 = xt1*sin(phi)+yt1*cos(phi);
108  xt2=r; yt2=vhtop/2.;
109  xs2 = xt2*cos(phi)-yt2*sin(phi);
110  ys2 = xt2*sin(phi)+yt2*cos(phi);
111  pv1=phival(xs1,ys1);
112  pv2=phival(xs2,ys2);
113  if(fabs(pv1-pv2)>M_PI && numod==1)pv1=pv1-2.*M_PI;
114  if(fabs(pv1-pv2)>M_PI && numod!=1)pv2=pv2+2.*M_PI;
115  xp[0]=mod->posz-vhapo/2.;yp[0]=4.2*pv1;
116  xp[1]=mod->posz+vhapo/2.;yp[1]=4.2*pv1;
117  xp[2]=mod->posz+vhapo/2. ;yp[2]=4.2*pv2;
118  xp[3]=mod->posz-vhapo/2.;yp[3]=4.2*pv2;
119  }
120  }
121  if(isRingStereo(key))
122  {
123  np = 3;
124  if(mod->idModule>100 ){for(int j=0;j<3;j++){
125  xd[j]=xdpixel(xp[j]);yd[j]=ydpixel(yp[j]);
126  }
127  }else {
128  xd[0]=xdpixel(xp[2]);yd[0]=ydpixel(yp[2]);
129  xd[1]=xdpixel(xp[3]);yd[1]=ydpixel(yp[3]);
130  xd[2]=xdpixel(xp[0]);yd[2]=ydpixel(yp[0]);
131  }
132  } else {
133  for(int j=0;j<4;j++){
134  xd[j]=xdpixel(xp[j]);yd[j]=ydpixel(yp[j]);
135  }
136  }
137  char buffer [20];
138  sprintf(buffer,"%X",mod->idex);
139 
140 //cout<<"drawModule: xp= "<<xp<<" , yp= "<<yp<<endl;
141  bool FPIX_M_1 = false ;
142  bool FPIX_M_2 = false ;
143  bool FPIX_P_1 = false ;
144  bool FPIX_P_2 = false ;
145  bool BPIX_L_1 = false ;
146  bool BPIX_L_2 = false ;
147  bool BPIX_L_3 = false ;
148  string moduleName = mod->name;
149  if(moduleName.find("PixelEndcap")!=string::npos || moduleName.find("PixelBarrel")!=string::npos) {
150  FPIX_M_1 = false ;
151  FPIX_M_2 = false ;
152  FPIX_P_1 = false ;
153  FPIX_P_2 = false ;
154  BPIX_L_1 = false ;
155  BPIX_L_2 = false ;
156  BPIX_L_3 = false ;
157  if( moduleName.find("PixelEndcap 3")!=string::npos ) {FPIX_M_1 = true;}
158  if( moduleName.find("PixelEndcap 4")!=string::npos ) {FPIX_M_2 = true;}
159  if( moduleName.find("PixelEndcap 1")!=string::npos ) {FPIX_P_1 = true;}
160  if( moduleName.find("PixelEndcap 2")!=string::npos ) {FPIX_P_2 = true;}
161  if( moduleName.find("PixelBarrel 1")!=string::npos ) {BPIX_L_1 = true;}
162  if( moduleName.find("PixelBarrel 2")!=string::npos ) {BPIX_L_2 = true;}
163  if( moduleName.find("PixelBarrel 3")!=string::npos ) {BPIX_L_3 = true;}
164  //}
165  *svgfile << " <svg:polygon detid=\""
166  << mod->idex
167  << "\" id=\""
168  << mod->idex
169  << "\" onclick=\"SvgMap.showData(evt);\" onmouseover=\"SvgMap.showData(evt);\" onmouseout=\"SvgMap.showData(evt);\" entries=\""
170  << mod->text
171  << "\" POS=\""
172  << mod->name
173  << " Id "
174  << mod->idex
175  << " \" fill=\"rgb("
176  << 146
177  << ","
178  << 0
179  << ","
180  << 255
181  << ")\" points=\"";
182  for(int k=0;k<np;k++)
183  {
184  if( FPIX_M_1 )
185  {
186  xd[k] = xd[k] * 1.8 - 60 ;
187  yd[k] = yd[k] * 2.0 - 30 ;
188  }
189  if( FPIX_M_2 )
190  {
191  xd[k] = xd[k] * 1.8 - 60 ;
192  yd[k] = yd[k] * 2.0 - 60 ;
193  }
194  if( FPIX_P_1 )
195  {
196  xd[k] = xd[k] * 1.8 - 1020 ;
197  yd[k] = yd[k] * 2.0 - 30 ;
198  }
199  if( FPIX_P_2 )
200  {
201  xd[k] = xd[k] * 1.8 - 1020 ;
202  yd[k] = yd[k] * 2.0 - 60 ;
203  }
204  if( BPIX_L_1 )
205  {
206  xd[k] = xd[k] * 1.2 - 130 ;
207  }
208  if( BPIX_L_2 )
209  {
210  xd[k] = xd[k] * 1.2 - 30 ;
211  }
212  if( BPIX_L_3 )
213  {
214  xd[k] = xd[k] * 1.2 - 240 ;
215  yd[k] = yd[k] - 5 ;
216  }
217  *svgfile << xd[k] << "," << yd[k] << " " ;
218  }
219  *svgfile <<"\" />" <<endl;
220  return ;
221  }
222 
223 }
int idModule
Definition: TmModule.h:26
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
float posz
Definition: TmModule.h:9
float posx
Definition: TmModule.h:9
bool posrel
Definition: TrackerMap.h:491
double phival(double x, double y)
Definition: TrackerMap.h:173
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
unsigned int idex
Definition: TmModule.h:29
int np
Definition: AMPTWrapper.h:33
std::string text
Definition: TmModule.h:14
float posy
Definition: TmModule.h:9
T sqrt(T t)
Definition: SSEVec.h:48
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
int j
Definition: DBlmapReader.cc:9
std::ofstream * svgfile
Definition: TrackerMap.h:493
double ydpixel(double y)
Definition: TrackerMap.h:241
#define M_PI
float width
Definition: TmModule.h:10
int k[5][pyjets_maxn]
float widthAtHalfLength
Definition: TmModule.h:10
return(e1-e2)*(e1-e2)+dp *dp
double xdpixel(double x)
Definition: TrackerMap.h:235
list key
Definition: combine.py:13
volatile std::atomic< bool > shutdown_flag false
static bool isRingStereo(int key)
Definition: TrackerMap.h:440
int ring
Definition: TmModule.h:27
float length
Definition: TmModule.h:10
std::string name
Definition: TmModule.h:15
Definition: DDAxes.h:10
void SiPixelTrackerMap::print ( bool  print_total = true,
std::string  TKType = "Averages",
float  minval = 0.,
float  maxval = 0. 
)

Definition at line 229 of file SiPixelTrackerMap.cc.

References SiPixelContinuousPalette::b, TmModule::count, TrackerMap::defwindow(), drawModule(), TrackerMap::firstRing, SiPixelContinuousPalette::g, i, recoMuon::in, j, TrackerMap::jsfile, combine::key, geometryCSVtoXML::line, TrackerMap::maxvalue, TrackerMap::minvalue, mod(), TrackerMap::module(), TrackerMap::nlay, TmModule::notInUse(), TrackerMap::ntotRing, dbtoconf::out, SiPixelContinuousPalette::r, relativeConstraints::ring, TrackerMap::smoduleMap, TrackerMap::svgfile, title, TmModule::value, and relativeConstraints::value.

230 {
231 //cout<<"Entering SiPixelTrackerMap::print: "<<endl;
232 
233  minvalue=minval; maxvalue=maxval;
234  svgfile = new std::ofstream("svgmap.xml",ios::out);
235  jsfile = new std::ifstream("TrackerMapHeader.txt",ios::in);
236 
237  //copy javascript interface from trackermap.txt file
238  string line;
239  while (getline( *jsfile, line ))
240  {
241  *svgfile << line << endl;
242  }
243  //
244 
245  if(!print_total)
246  {
247  for (int layer=1; layer < 44; layer++)
248  {
249  for (int ring=firstRing[layer-1]; ring < ntotRing[layer-1]+firstRing[layer-1];ring++)
250  {
251  for (int module=1;module<200;module++)
252  {
253  int key=layer*100000+ring*1000+module;
254  TmModule * mod = smoduleMap[key];
255  if(mod !=0 && !mod->notInUse())
256  {
257  mod->value = mod->value / mod->count;
258  }
259  }
260  }
261  }
262  }
263 
264  if(minvalue>=maxvalue)
265  {
266  minvalue=9999999.;
267  maxvalue=-9999999.;
268  for (int layer=1; layer < 44; layer++)
269  {
270  for (int ring=firstRing[layer-1]; ring < ntotRing[layer-1]+firstRing[layer-1];ring++)
271  {
272  for (int module=1;module<200;module++)
273  {
274  int key=layer*100000+ring*1000+module;
275  TmModule * mod = smoduleMap[key];
276  if(mod !=0 && !mod->notInUse())
277  {
278  if (minvalue > mod->value)minvalue=mod->value;
279  if (maxvalue < mod->value)maxvalue=mod->value;
280  }
281  }
282  }
283  }
284  }
285 
286  for (int layer=1; layer < 44; layer++)
287  {
288  nlay=layer;
289  defwindow(nlay);
290  for (int ring=firstRing[layer-1]; ring < ntotRing[layer-1]+firstRing[layer-1];ring++)
291  {
292  for (int module=1;module<200;module++)
293  {
294  int key=layer*100000+ring*1000+module;
295  TmModule * mod = smoduleMap[key];
296  if(mod !=0 && !mod->notInUse())
297  {
298  drawModule(mod,key,layer,print_total);
299  }
300  }
301  }
302  }
303 
304 /* cout << ACYellow << ACBold
305  << "[SiPixelTrackerMap::print()] "
306  << ACPlain
307  << "TKType: |"
308  << TKType
309  << "|"
310  << endl ;
311 */
312  *svgfile << " " << endl ;
313 
314  if( TKType == "Averages" || TKType == "Entries")
315  {
316  *svgfile << " <svg:g id=\"theColorMap\" transform=\"translate(0, 0)\" style=\"visibility: visible;\">" << endl ;
317  } else {
318  *svgfile << " <svg:g id=\"theColorMap\" transform=\"translate(0, 0)\" style=\"visibility: hidden;\">" << endl ;
319  }
320 
321  // this is the color scale on the right hand side of the tracker map:
322  int px = 1370 ;
323  int dx = 25 ;
324  int py = 50 ;
325  int dy = 6 ;
326  int j = 5 ;
327  for( int i=99; i>=0; i--)
328  {
329  *svgfile << " <svg:polygon id=\"map\" fill=\"rgb("
331  << ","
333  << ","
335  << ")\" points=\""
336  << px
337  << ","
338  << py
339  << " "
340  << px+dx
341  << ","
342  << py
343  << " "
344  << px+dx
345  << ","
346  << py+dy
347  << " "
348  << px
349  << ","
350  << py+dy
351  << "\" />"
352  << endl ;
353  if( i == 0 || i==20 || i==40 || i==60 || i==80 || i==99)
354  {
355  *svgfile << " " << endl ;
356  *svgfile << " <svg:text id=\"colorCodeMark"
357  << j--
358  << "\" class=\"normalText\" x=\""
359  << px+dx+5
360  << "\" y=\""
361  << py + 3
362  << "\" font-size=\"20\">"
363  << i
364  << "%</svg:text>"
365  << endl;
366  *svgfile << " " << endl ;
367  }
368  py += dy + 1;
369 
370  // cout<<"inside the polygon loop: i= "<<i<<" , r= "<<SiPixelContinuousPalette::r[i]<<" , g= "<<SiPixelContinuousPalette::g[i]<<" , b= "<<SiPixelContinuousPalette::b[i]<<" , px= "<<px<<" , py= "<<py<<endl;
371  }
372  *svgfile << " </svg:g>" << endl ;
373 
374  if( TKType == "Alarms" )
375  {
376  *svgfile << " <svg:g id=\"theAlarmMap\" transform=\"translate(0, 0)\" style=\"visibility: visible;\">" << endl ;
377  } else {
378  *svgfile << " <svg:g id=\"theAlarmMap\" transform=\"translate(0, 0)\" style=\"visibility: hidden;\">" << endl ;
379  }
380  *svgfile << " " << endl ;
381  *svgfile << " <svg:polygon id=\"map\" fill =\"rgb(255,0,0)\" points=\"1300,300 1325,300 1325,320 1300,320\" />" << endl ;
382  *svgfile << " <svg:text id=\"ERROR\" class=\"normalText\" x=\"1334\" y=\"317\" font-size=\"20\">ERROR </svg:text>" << endl ;
383  *svgfile << " " << endl ;
384  *svgfile << " <svg:polygon id=\"map\" fill =\"rgb(0,255,0)\" points=\"1300,330 1325,330 1325,350 1300,350\" />" << endl ;
385  *svgfile << " <svg:text id=\"OK\" class=\"normalText\" x=\"1334\" y=\"347\" font-size=\"20\">OK </svg:text>" << endl ;
386  *svgfile << " " << endl ;
387  *svgfile << " <svg:polygon id=\"map\" fill =\"rgb(255,255,0)\" points=\"1300,360 1325,360 1325,380 1300,380\" />" << endl ;
388  *svgfile << " <svg:text id=\"WARNING\" class=\"normalText\" x=\"1334\" y=\"377\" font-size=\"20\">WARNING </svg:text>" << endl ;
389  *svgfile << " " << endl ;
390  *svgfile << " <svg:polygon id=\"map\" fill =\"rgb(0,0,255)\" points=\"1300,390 1325,390 1325,410 1300,410\" />" << endl ;
391  *svgfile << " <svg:text id=\"OTHER\" class=\"normalText\" x=\"1334\" y=\"407\" font-size=\"20\">OTHER </svg:text>" << endl ;
392  *svgfile << " " << endl ;
393  *svgfile << " <svg:polygon id=\"map\" fill =\"rgb(255,255,255)\" points=\"1300,420 1325,420 1325,440 1300,440\" />" << endl ;
394  *svgfile << " <svg:text id=\"UNDEFINED\" class=\"normalText\" x=\"1334\" y=\"437\" font-size=\"20\">UNDEFINED</svg:text>" << endl ;
395  *svgfile << " " << endl ;
396  *svgfile << " </svg:g>" << endl ;
397 
398  *svgfile << " " << endl ;
399 
400  *svgfile << " <svg:text id=\"colorCodeME\" class=\"normalText\" x=\"1000\" y=\"4000\">"
401  << title
402  << "</svg:text>"
403  << endl;
404  delete jsfile ;
405  jsfile = new std::ifstream("TrackerMapTrailer.txt",ios::in);
406  while (getline( *jsfile, line ))
407  {
408  *svgfile << line << endl;
409  }
410  delete jsfile ;
411 
412  svgfile->close() ;
413 /* cout << ACYellow << ACBold
414  << "[SiPixelTrackerMap::print( )] "
415  << ACPlain
416  << "svgmap.xml file just closed..."
417  << endl ;
418 */
419  delete svgfile ;
420 }
int i
Definition: DBlmapReader.cc:9
float minvalue
Definition: TrackerMap.h:499
float value
Definition: TmModule.h:12
SmoduleMap smoduleMap
Definition: TrackerMap.h:140
int module(int fedId, int fedCh)
Definition: TrackerMap.cc:2687
void defwindow(int num_lay)
Definition: TrackerMap.h:328
void drawModule(TmModule *mod, int key, int nlay, bool print_total)
int firstRing[43]
Definition: TrackerMap.h:479
int j
Definition: DBlmapReader.cc:9
std::ofstream * svgfile
Definition: TrackerMap.h:493
int count
Definition: TmModule.h:13
tuple out
Definition: dbtoconf.py:99
bool notInUse()
Definition: TmModule.h:24
list key
Definition: combine.py:13
float maxvalue
Definition: TrackerMap.h:499
std::ifstream * jsfile
Definition: TrackerMap.h:495
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
Definition: vlib.h:208
int ntotRing[43]
Definition: TrackerMap.h:478

Member Data Documentation

int SiPixelTrackerMap::dummy
private

Definition at line 43 of file SiPixelTrackerMap.h.

std::string SiPixelTrackerMap::title
private