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 Member Functions | Private Attributes
SiPixelTrackerMapCreator Class Reference

#include <SiPixelTrackerMapCreator.h>

Public Member Functions

void create (DQMStore *bei)
 (Documentation under construction). More...
 
 SiPixelTrackerMapCreator (std::string themEName, std::string theTKType, bool offlineXMLfile)
 
 ~SiPixelTrackerMapCreator ()
 

Private Member Functions

bool exploreBeiStructure (DQMStore *bei)
 
MonitorElementgetTkMapMe (DQMStore *bei, std::string &me_name, int ndet)
 
void paintTkMap (MonitorElement *mE)
 

Private Attributes

SiPixelInformationExtractorinfoExtractor_
 
std::string mEName
 
bool offlineXMLfile_
 
std::string TKType
 
SiPixelTrackerMaptrackerMap
 

Detailed Description

Definition at line 14 of file SiPixelTrackerMapCreator.h.

Constructor & Destructor Documentation

SiPixelTrackerMapCreator::SiPixelTrackerMapCreator ( std::string  themEName,
std::string  theTKType,
bool  offlineXMLfile 
)

Definition at line 21 of file SiPixelTrackerMapCreator.cc.

References indexGen::title.

24 {
25 // cout << ACYellow << ACBold
26 // << "[SiPixelTrackerMapCreator::SiPixelTrackerMapCreator()]"
27 // << ACPlain << " ctor" << endl ;
28 
29  mEName = themEName ;
30  TKType = theTKType ;
31 //cout<<"ME and type for new TrackerMap are: "<<themEName<<" , "<<theTKType<<endl;
32  stringstream title ;
33  title.str("") ;
34  title << themEName ;
35 
36  trackerMap = new SiPixelTrackerMap(title.str());
38 }
SiPixelInformationExtractor * infoExtractor_
SiPixelTrackerMapCreator::~SiPixelTrackerMapCreator ( )

Definition at line 43 of file SiPixelTrackerMapCreator.cc.

44 {
45 // if (trackerMap) delete trackerMap;
46 // if (infoExtractor_) delete infoExtractor_;
47 // cout << ACYellow << ACBold
48 // << "[SiPixelTrackerMapCreator::~SiPixelTrackerMapCreator()]"
49 // << ACPlain << " dtor" << endl ;
50 }

Member Function Documentation

void SiPixelTrackerMapCreator::create ( DQMStore bei)

(Documentation under construction).

Definition at line 56 of file SiPixelTrackerMapCreator.cc.

References ACBold, ACCyan, ACPlain, ACRed, gather_cfg::cout, dbtoconf::out, and reco::return().

Referenced by SiPixelActionExecutor::createTkMap().

57 {
58 // cout << ACYellow << ACBold
59 // << "[SiPixelTrackerMapCreator::create()] "
60 // << ACPlain
61 // << " Creating tracker map for ME: "
62 // << mEName
63 // << endl;
64 
65  vector<MonitorElement*> mEList ;
66  map<string, int> mEHash ;
67 
68  infoExtractor_->selectMEList(bei, mEName, mEList) ;
69  infoExtractor_->getMEList( bei, mEHash) ;
70 
71  int nImages = mEHash.size() ;
72 
73  for(vector<MonitorElement*>::iterator it=mEList.begin(); it!=mEList.end(); it++)
74  {
75  paintTkMap(*it);
76  }
77 
78  trackerMap->print(true, TKType);
79 //cout<<"Going to create inner frame now! Still in TMC::create"<<endl;
80  std::ofstream innerFrame ;
81 
82  innerFrame.open( "rightEmbedded.html", ios::out );
83 
84  if( !innerFrame )
85  {
86  cout << ACRed << ACBold
87  << "[SiPixelTrackerMapCreator::create()] "
88  << ACCyan << ACBold
89  << "Could not open rightEmbedded.html"
90  << ACPlain
91  << endl ;
92  return ;
93  }
94 
95  innerFrame << "<html> " << "\n"
96  << "<!-- " << "\n"
97  << " Author: D. Menasce " << "\n"
98  << " Pixel Tracker Map " << "\n"
99  << "--> " << "\n"
100  << " " << "\n"
101  << "<meta http-equiv='pragma' " << "\n"
102  << " content ='no-cache'> " << "\n"
103  << " " << "\n"
104  << "<head> " << "\n"
105  << " <link rel = 'stylesheet' " << "\n"
106  << " type = 'text/css' " << "\n"
107  << " href = 'css_files/wz_dragdrop.css>' " << "\n"
108  << " <link rel = 'stylesheet' " << "\n"
109  << " type = 'text/css' " << "\n"
110  << " href = 'css_files/magnifier.css'> " << "\n"
111  << " <script type = 'text/javascript' " << "\n"
112  << " src = 'js_files/magnifier.js'> " << "\n"
113  << " </script> " << "\n"
114  << " <script type = 'text/javascript' " << "\n"
115  << " src = 'js_files/wz_dragdrop.js'> " << "\n"
116  << " </script> " << "\n"
117  << " <script type = 'text/javascript' " << "\n"
118  << " src = 'js_files/DMLibrary.js'> " << "\n"
119  << " </script> " << "\n"
120  << " " << "\n"
121  << "</head> " << "\n"
122  << " " << "\n"
123  << "<body bgcolor='#414141'> " << "\n"
124  << " " << "\n"
125  << " <center> " << "\n"
126  << " " << endl ;
127  for( int img=1; img<=nImages; img++)
128  {
129  stringstream sId, sNm ;
130  sId.str(""); sId << "binding" << img ;
131  sNm.str(""); sNm << "baseImage" << img ;
132  string sid = sId.str() ;
133  string snm = sNm.str() ;
134  innerFrame << " <div id = 'binding' " << "\n"
135  << " name = '" << sid << "'> " << "\n"
136  << " <img id = '" << snm << "' " << "\n"
137  << " name = '" << snm << "' " << "\n"
138  << " src = 'images/EmptyPlot.png' " << "\n"
139  << " alt = 'picture geometry:800x600' " << "\n"
140  << " onload = 'RightEmbedded.innerLoading(\"" << sid << "\",\"" << snm << "\")'" << "\n"
141  << " onclick = 'RightEmbedded.innerTransport(event)' " << "\n"
142  << " onmouseover = 'this.T_SHADOWWIDTH=4; " << "\n"
143  << " this.T_OPACITY =70; " << "\n"
144  << " this.T_FONTCOLOR =\"#000000\"; " << "\n"
145  << " this.T_WIDTH =200; " << "\n"
146  << " return escape(\"Click to send to pan/zoom area\")' " << "\n"
147  << " width = '267' " << "\n"
148  << " height = '200' /> " << "\n"
149  << " </div> " << endl ;
150  }
151  innerFrame << " " << "\n"
152  << "</center> " << "\n"
153  << " " << "\n"
154  << "<script type = 'text/javascript' " << "\n"
155  << " src = 'js_files/rightEmbedded.js'> " << "\n"
156  << "</script> " << "\n"
157  << " " << "\n"
158  << "<script type='text/javascript' " << "\n"
159  << " src ='js_files/wz_tooltip.js'> " << "\n"
160  << "</script> " << "\n"
161  << "</html> " << endl ;
162  innerFrame.close() ;
163 // cout<<"leaving TMC::create."<<endl;
164 }
#define ACRed
Definition: ANSIColors.h:15
SiPixelInformationExtractor * infoExtractor_
void getMEList(DQMStore *bei, std::map< std::string, int > &mEHash)
(Documentation under construction).
void paintTkMap(MonitorElement *mE)
void selectMEList(DQMStore *bei, std::string &name, std::vector< MonitorElement * > &mes)
(Documentation under construction).
tuple out
Definition: dbtoconf.py:99
#define ACCyan
Definition: ANSIColors.h:14
return(e1-e2)*(e1-e2)+dp *dp
void print(bool print_total=true, std::string TKType="Averages", float minval=0., float maxval=0.)
tuple cout
Definition: gather_cfg.py:121
#define ACPlain
Definition: ANSIColors.h:28
#define ACBold
Definition: ANSIColors.h:29
bool SiPixelTrackerMapCreator::exploreBeiStructure ( DQMStore bei)
private

Definition at line 179 of file SiPixelTrackerMapCreator.cc.

References ACBlue, ACBold, ACCyan, ACPlain, ACRed, ACReverse, DQMStore::cd(), gather_cfg::cout, DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), template_SiPixelHistoryDQMService_cfg::histoList, DQMStore::pwd(), and funct::true.

180 {
181  cout << ACCyan << ACBold
182  << "[SiPixelTrackerMapCreator::create()] "
183  << ACRed << ACReverse
184  << "List of histograms in"
185  << ACPlain
186  << " "
187  << ACBlue << ACBold
188  << bei->pwd()
189  << ACPlain << endl ;
190 
191 
192  vector<string> histoList = bei->getMEs();
193 
194  for (vector<string>::const_iterator it = histoList.begin(); it != histoList.end(); it++)
195  {
196  cout << ACCyan << ACBold
197  << "[SiPixelTrackerMapCreator::create()] "
198  << ACRed << ACReverse
199  << "Histogram:"
200  << ACPlain
201  << " "
202  << *it
203  << ACPlain << endl ;
204  }
205 
206  vector<string> subDirs = bei->getSubdirs();
207 
208  for (vector<string>::const_iterator it = subDirs.begin(); it != subDirs.end(); it++)
209  {
210  bei->cd(*it);
211  cout << ACCyan << ACBold
212  << "[SiPixelTrackerMapCreator::create()] "
213  << ACRed << ACBold
214  << "Moved down to"
215  << ACPlain
216  << " "
217  << ACBlue << ACBold
218  << bei->pwd()
219  << ACPlain << endl ;
220  exploreBeiStructure(bei);
221  bei->goUp();
222  cout << ACCyan << ACBold
223  << "[SiPixelTrackerMapCreator::create()] "
224  << ACRed << ACBold
225  << "Now back to"
226  << ACPlain
227  << " "
228  << ACBlue << ACBold
229  << bei->pwd()
230  << ACPlain << endl ;
231  }
232  return true ;
233 }
#define ACRed
Definition: ANSIColors.h:15
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1647
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:632
#define ACBlue
Definition: ANSIColors.h:12
bool exploreBeiStructure(DQMStore *bei)
#define ACReverse
Definition: ANSIColors.h:32
#define ACCyan
Definition: ANSIColors.h:14
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1670
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:666
tuple cout
Definition: gather_cfg.py:121
#define ACPlain
Definition: ANSIColors.h:28
#define ACBold
Definition: ANSIColors.h:29
const std::string & pwd(void) const
Definition: DQMStore.cc:627
MonitorElement* SiPixelTrackerMapCreator::getTkMapMe ( DQMStore bei,
std::string &  me_name,
int  ndet 
)
private
void SiPixelTrackerMapCreator::paintTkMap ( MonitorElement mE)
private

Definition at line 169 of file SiPixelTrackerMapCreator.cc.

170 {
171 // double sts;
172 // int rval, gval, bval, detId;
173 // cout<<"Inside SiPixelTrackerMapCreator::paintTkMap: me= "<<mE->getName()<<endl;
174 }

Member Data Documentation

SiPixelInformationExtractor* SiPixelTrackerMapCreator::infoExtractor_
private

Definition at line 33 of file SiPixelTrackerMapCreator.h.

std::string SiPixelTrackerMapCreator::mEName
private

Definition at line 36 of file SiPixelTrackerMapCreator.h.

bool SiPixelTrackerMapCreator::offlineXMLfile_
private

Definition at line 38 of file SiPixelTrackerMapCreator.h.

std::string SiPixelTrackerMapCreator::TKType
private

Definition at line 37 of file SiPixelTrackerMapCreator.h.

SiPixelTrackerMap* SiPixelTrackerMapCreator::trackerMap
private

Definition at line 34 of file SiPixelTrackerMapCreator.h.