Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 #include "ByteStreamBranchDecoder.h"
002 
003 #include "TriggerTower.h"
004 #include "TTPosition.h"
005 #include "TTMapping.h"
006 
007 #ifdef WIN32
008  #include <Riostream.h>
009 #else
010  #include <iostream.h>
011 #endif
012 
013 #include <vector>
014 #include <string>
015 #include <sstream>
016 
017 #include "TGLabel.h"
018 #include <TGNumberEntry.h>
019 
020 using std::cout;
021 using std::cerr;
022 using std::endl;
023 
024 ByteStreamBranchDecoder::ByteStreamBranchDecoder(void)
025 {
026 
027         //m_stTree = new ByteStreamTreeStruct();

028 
029         // initialise the branch-name map

030         m_mapBranchName["Energy"] = eEnergy;
031         m_mapBranchName["Peak"] = ePeak;
032         m_mapBranchName["ADCPeak"] = eADCPeak;
033         m_mapBranchName["Error"] = eError;
034         m_mapBranchName["BCID"] = eBCID;
035         m_mapBranchName["Saturated"] = eSaturated;
036         m_mapBranchName["nADC"] = eNADC;
037         m_mapBranchName["nLUT"] = eNLUT;
038 
039         m_eSelectedBranch = eUndefined;
040 }
041 
042 ByteStreamBranchDecoder::~ByteStreamBranchDecoder(void)
043 {
044         //delete m_stTree;

045 }
046 
047 void ByteStreamBranchDecoder::setBranchAdresses(TTree* ptree) {
048         if(ptree) {
049                 ptree->SetBranchAddress("ntt",&m_stTree.ntt);
050                 ptree->SetBranchAddress("eta", m_stTree.eta);
051                 ptree->SetBranchAddress("phi", m_stTree.phi);
052                 ptree->SetBranchAddress("emPeak",m_stTree.emPeak);
053                 ptree->SetBranchAddress("emADCPeak",m_stTree.emADCPeak);
054                 ptree->SetBranchAddress("hadPeak",m_stTree.hadPeak);
055                 ptree->SetBranchAddress("hadADCPeak",m_stTree.hadADCPeak);
056 
057                 ptree->SetBranchAddress("nEmADC",m_stTree.nEmADC);
058                 ptree->SetBranchAddress("nEmLUT",m_stTree.nEmLUT);
059 
060                 ptree->SetBranchAddress("nHadADC",m_stTree.nHadADC);
061                 ptree->SetBranchAddress("nHadLUT",m_stTree.nHadLUT);
062 
063                 ptree->SetBranchAddress("emADC",  m_stTree.emADC);
064                 ptree->SetBranchAddress("hadADC", m_stTree.hadADC);
065                 ptree->SetBranchAddress("emLUT",  m_stTree.emLUT);
066                 ptree->SetBranchAddress("hadLUT", m_stTree.hadLUT);
067 
068                 ptree->SetBranchAddress("emEnergy",  m_stTree.emEnergy);
069                 ptree->SetBranchAddress("hadEnergy", m_stTree.hadEnergy);
070 
071                 ptree->SetBranchAddress("emBCIDvec",  m_stTree.emBCIDvec);
072                 ptree->SetBranchAddress("emBCIDext",  m_stTree.emBCIDext);
073                 ptree->SetBranchAddress("hadBCIDvec", m_stTree.hadBCIDvec);
074                 ptree->SetBranchAddress("hadBCIDext", m_stTree.hadBCIDext);
075 
076                 ptree->SetBranchAddress("emError",  m_stTree.emError);
077                 ptree->SetBranchAddress("hadError", m_stTree.hadError);
078 
079                 ptree->SetBranchAddress("emBCID",  m_stTree.emBCID);
080                 ptree->SetBranchAddress("hadBCID", m_stTree.hadBCID);
081 
082                 ptree->SetBranchAddress("emIsFilled",  m_stTree.emIsFilled);
083                 ptree->SetBranchAddress("hadIsFilled", m_stTree.hadIsFilled);
084 
085         }
086 }
087 
088 void ByteStreamBranchDecoder::selectBranch(std::string branch) {
089         cout<<"ByteStreamBranchDecoder::selectBranch(string branch)"<<endl;
090         BranchNameMap::iterator it = m_mapBranchName.find(branch);
091         if(it==m_mapBranchName.end()) {
092                 cerr << "ByteStreamBranchDecoder::selectBranch(string branch) - Could not find branch name "<< branch << "in BranchNameMap" << endl;
093                 exit(EXIT_FAILURE);             
094         }
095         m_eSelectedBranch = it->second;
096 }
097 
098 TriggerTowerContainer* ByteStreamBranchDecoder::makeTTContainer() {
099         cout<<"ByteStreamBranchDecoder::makeTTContainer()"<<endl;
100         if(m_eSelectedBranch==eUndefined) {
101                 cerr << "ByteStreamBranchDecoder::makeTTContainer() - No branch selected, use selectBranch(string branch) first" << endl;
102                 exit(EXIT_FAILURE);
103         }
104         TriggerTowerContainer* ttContainer = new TriggerTowerContainer();
105         int ntt = m_stTree.ntt;
106 
107         if(ntt>maxTT) {
108                 cerr << "ByteStreamBranchDecoder::makeTTContainer() - The number of trigger towers exceeds maxtt (ntt:" << ntt << ")" << endl;
109                 exit(EXIT_FAILURE);
110         }
111         
112         TriggerTower* pTriggerTower = 0;
113         for (int itt=0; itt<ntt; ++itt) {
114                 
115                 // create position

116                 //TTPosition::eDetectorType eDetType = ( (m_stTree.det[itt] == 0) ? TTPosition::EM : TTPosition::HAD );

117                 TTPosition emTTPosition  = TTMapping().makeTTPosition(m_stTree.eta[itt], m_stTree.phi[itt], TTPosition::EM);
118                 TTPosition hadTTPosition = TTMapping().makeTTPosition(m_stTree.eta[itt], m_stTree.phi[itt], TTPosition::HAD);
119                 
120                 // choose value

121                 double emValue;
122                 double hadValue;
123 
124                 switch(m_eSelectedBranch) {
125 
126                         case eEnergy:
127                                 emValue  = m_stTree.emEnergy[itt];
128                                 hadValue = m_stTree.hadEnergy[itt];
129                                 break;
130                         case ePeak:
131                                 emValue  = m_stTree.emPeak[itt];
132                                 hadValue = m_stTree.hadPeak[itt];
133                                 break;
134                         case eADCPeak:
135                                 emValue  = m_stTree.emADCPeak[itt];
136                                 hadValue = m_stTree.hadADCPeak[itt];
137                                 break;
138                         case eError:
139                                 emValue  = m_stTree.emError[itt];
140                                 hadValue = m_stTree.hadError[itt];
141                                 break;
142                         case eBCID:
143                                 emValue  = m_stTree.emBCID[itt];
144                                 hadValue = m_stTree.hadBCID[itt];
145                                 break;
146                         case eSaturated:
147                                 emValue  = m_stTree.emIsSaturated[itt];
148                                 hadValue = m_stTree.hadIsSaturated[itt];
149                                 break;
150                         case eNADC:
151                                 emValue  = m_stTree.nEmADC[itt];
152                                 hadValue = m_stTree.nHadADC[itt];
153                                 break;
154                         case eNLUT:
155                                 emValue  = m_stTree.nEmLUT[itt];
156                                 hadValue = m_stTree.nHadLUT[itt];
157                                 break;
158                         default:
159                                 cerr << "ByteStreamBranchDecoder::makeTTContainer() - The number of trigger towers exceeds maxtt (ntt:" << ntt << ")" << endl;
160                                 exit(EXIT_FAILURE);
161                 }
162                 
163                 // create trigger towers

164                 if(m_stTree.emIsFilled[itt]) ttContainer->push_back(TriggerTower(itt, emTTPosition, emValue));
165                 if(m_stTree.hadIsFilled[itt]) ttContainer->push_back(TriggerTower(itt, hadTTPosition, hadValue));
166                 
167                 //cout<<m_stTree.eta[itt]<<" "<<m_stTree.phi[itt]<<" "<< emValue <<endl;

168         }
169         return ttContainer;
170 }
171 
172 std::vector<std::string> ByteStreamBranchDecoder::getBranchesName() {
173         std::vector<std::string> vNames;
174         BranchNameMap::const_iterator it = m_mapBranchName.begin();
175         for(;it!=m_mapBranchName.end();++it) {
176                 vNames.push_back(it->first);
177         }
178         return vNames;
179 }
180 
181 void ByteStreamBranchDecoder::dumpTT2Frame(TGTransientFrame* frame, int ttIndex) const {
182 
183         TGHorizontalFrame* pHFrame = 0;
184         TGLabel* pLabel = 0;
185         TGGroupFrame* pCGroup = 0;
186         TGTextEntry* pTextEntry;
187         int entryWidth = 120;
188         std::stringstream ss;
189         std::ostringstream oss;
190         std::string str;
191 
192         TGLayoutHints* pEntryLayout = new TGLayoutHints(kLHintsRight ,2,0,0,0);
193         TGLayoutHints* pTextLayout = new TGLayoutHints(kLHintsLeft ,0,0,3,0);
194         TGLayoutHints* pGroupLayout = new TGLayoutHints(kLHintsLeft |kLHintsExpandX , 0,0,0,-2);
195         TGLayoutHints* pSubFrameLayout = new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 0,0,0,0);
196         
197         // general part

198         pCGroup = new TGGroupFrame(frame,"Common", kVerticalFrame);
199                 pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
200                         pLabel = new TGLabel(pHFrame,"eta:");
201                         pLabel->SetTextJustify(36);
202                         str.clear(); ss.clear();
203                         ss << m_stTree.eta[ttIndex]; ss >> str;
204                         pTextEntry = new TGTextEntry(pHFrame,str.c_str());
205                         pTextEntry->SetWidth(entryWidth);
206                         entryWidth = pTextEntry->GetWidth();
207                         pTextEntry->SetEnabled(kFALSE);
208 
209                         pHFrame->AddFrame(pLabel, pTextLayout);
210                         pHFrame->AddFrame(pTextEntry, pEntryLayout);
211                 pCGroup->AddFrame(pHFrame, pSubFrameLayout);
212 
213                 pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
214                         pLabel = new TGLabel(pHFrame,"phi:");
215                         pLabel->SetTextJustify(36);
216                         str.clear(); ss.clear();
217                         ss << m_stTree.phi[ttIndex]; ss >> str;
218                         pTextEntry = new TGTextEntry(pHFrame,str.c_str());
219                         pTextEntry->SetWidth(entryWidth);
220                         pTextEntry->SetEnabled(kFALSE);
221 
222                         pHFrame->AddFrame(pLabel, pTextLayout);
223                         pHFrame->AddFrame(pTextEntry, pEntryLayout);
224                 pCGroup->AddFrame(pHFrame, pSubFrameLayout);
225 
226         frame->AddFrame(pCGroup, pGroupLayout);
227 
228         if(m_stTree.emIsFilled[ttIndex]){
229                 // EM part

230                 pCGroup = new TGGroupFrame(frame,"Em", kVerticalFrame);
231                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
232                                 pLabel = new TGLabel(pHFrame,"emEnergy:");
233                                 pLabel->SetTextJustify(36);
234                                 str.clear(); ss.clear();
235                                 ss << m_stTree.emEnergy[ttIndex]; ss >> str;
236                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
237                                 pTextEntry->SetWidth(entryWidth);
238                                 entryWidth = pTextEntry->GetWidth();
239                                 pTextEntry->SetEnabled(kFALSE);
240 
241                                 pHFrame->AddFrame(pLabel, pTextLayout);
242                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
243                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
244 
245                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
246                                 pLabel = new TGLabel(pHFrame,"nADC:");
247                                 pLabel->SetTextJustify(36);
248                                 str.clear(); ss.clear();
249                                 ss << m_stTree.nEmADC[ttIndex]; ss >> str;
250                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
251                                 pTextEntry->SetWidth(entryWidth);
252                                 pTextEntry->SetEnabled(kFALSE);
253 
254                                 pHFrame->AddFrame(pLabel, pTextLayout);
255                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
256                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
257 
258                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
259                                 pLabel = new TGLabel(pHFrame,"ADC:");
260                                 pLabel->SetTextJustify(36);
261                                 str.clear(); ss.clear(); oss.str("");
262 
263                                 for(int i=0;i<m_stTree.nEmADC[ttIndex];++i) {
264                                         oss << m_stTree.emADC[ttIndex][i]<<" ";
265                                 }
266                                 pTextEntry = new TGTextEntry(pHFrame,oss.str().c_str());
267                                 pTextEntry->SetWidth(entryWidth);
268                                 entryWidth = pTextEntry->GetWidth();
269                                 pTextEntry->SetEnabled(kFALSE);
270 
271                                 pHFrame->AddFrame(pLabel, pTextLayout);
272                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
273                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
274 
275                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
276                                 pLabel = new TGLabel(pHFrame,"ADC peak pos.:");
277                                 pLabel->SetTextJustify(36);
278                                 str.clear(); ss.clear();
279                                 ss << m_stTree.emADCPeak[ttIndex]; ss >> str;
280                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
281                                 pTextEntry->SetWidth(entryWidth);
282                                 entryWidth = pTextEntry->GetWidth();
283                                 pTextEntry->SetEnabled(kFALSE);
284 
285                                 pHFrame->AddFrame(pLabel, pTextLayout);
286                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
287                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
288 
289                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
290                                 pLabel = new TGLabel(pHFrame,"nLUT:");
291                                 pLabel->SetTextJustify(36);
292                                 str.clear(); ss.clear();
293                                 ss << m_stTree.nEmLUT[ttIndex]; ss >> str;
294                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
295                                 pTextEntry->SetWidth(entryWidth);
296                                 pTextEntry->SetEnabled(kFALSE);
297 
298                                 pHFrame->AddFrame(pLabel, pTextLayout);
299                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
300                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
301 
302                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
303                                 pLabel = new TGLabel(pHFrame,"LUT:");
304                                 pLabel->SetTextJustify(36);
305                                 str.clear(); ss.clear(); oss.str("");
306 
307                                 for(int i=0;i<m_stTree.nEmLUT[ttIndex];++i) {
308                                         oss << m_stTree.emLUT[ttIndex][i]<<" ";
309                                 }
310                                 pTextEntry = new TGTextEntry(pHFrame,oss.str().c_str());
311                                 pTextEntry->SetWidth(entryWidth);
312                                 entryWidth = pTextEntry->GetWidth();
313                                 pTextEntry->SetEnabled(kFALSE);
314 
315                                 pHFrame->AddFrame(pLabel, pTextLayout);
316                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
317                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
318 
319                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
320                                 pLabel = new TGLabel(pHFrame,"LUT peak pos.:");
321                                 pLabel->SetTextJustify(36);
322                                 str.clear(); ss.clear();
323                                 ss << m_stTree.emPeak[ttIndex]; ss >> str;
324                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
325                                 pTextEntry->SetWidth(entryWidth);
326                                 entryWidth = pTextEntry->GetWidth();
327                                 pTextEntry->SetEnabled(kFALSE);
328 
329                                 pHFrame->AddFrame(pLabel, pTextLayout);
330                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
331                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
332 
333                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
334                                 pLabel = new TGLabel(pHFrame,"BCID:");
335                                 pLabel->SetTextJustify(36);
336                                 str.clear(); ss.clear(); oss.str("");
337 
338                                 for(int i=0;i<m_stTree.nEmADC[ttIndex];++i) {
339                                         oss << m_stTree.emBCIDvec[ttIndex][i]<<" ";
340                                 }
341                                 pTextEntry = new TGTextEntry(pHFrame,oss.str().c_str());
342                                 pTextEntry->SetWidth(entryWidth);
343                                 entryWidth = pTextEntry->GetWidth();
344                                 pTextEntry->SetEnabled(kFALSE);
345 
346                                 pHFrame->AddFrame(pLabel, pTextLayout);
347                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
348                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
349 
350                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
351                                 pLabel = new TGLabel(pHFrame,"BCID@peak:");
352                                 pLabel->SetTextJustify(36);
353                                 str.clear(); ss.clear();
354                                 ss << m_stTree.emBCID[ttIndex]; ss >> str;
355                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
356                                 pTextEntry->SetWidth(entryWidth);
357                                 entryWidth = pTextEntry->GetWidth();
358                                 pTextEntry->SetEnabled(kFALSE);
359 
360                                 pHFrame->AddFrame(pLabel, pTextLayout);
361                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
362                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
363                         
364                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
365                                 pLabel = new TGLabel(pHFrame,"extBCID:");
366                                 pLabel->SetTextJustify(36);
367                                 str.clear(); ss.clear(); oss.str("");
368 
369                                 for(int i=0;i<m_stTree.nEmADC[ttIndex];++i) {
370                                         oss << m_stTree.emBCIDext[ttIndex][i]<<" ";
371                                 }
372                                 pTextEntry = new TGTextEntry(pHFrame,oss.str().c_str());
373                                 pTextEntry->SetWidth(entryWidth);
374                                 entryWidth = pTextEntry->GetWidth();
375                                 pTextEntry->SetEnabled(kFALSE);
376 
377                                 pHFrame->AddFrame(pLabel, pTextLayout);
378                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
379                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
380 
381                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
382                                 pLabel = new TGLabel(pHFrame,"Error:");
383                                 pLabel->SetTextJustify(36);
384                                 str.clear(); ss.clear();
385                                 ss << m_stTree.emError[ttIndex]; ss >> str;
386                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
387                                 pTextEntry->SetWidth(entryWidth);
388                                 entryWidth = pTextEntry->GetWidth();
389                                 pTextEntry->SetEnabled(kFALSE);
390 
391                                 pHFrame->AddFrame(pLabel, pTextLayout);
392                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
393                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
394 
395                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
396                                 pLabel = new TGLabel(pHFrame,"isSaturated:");
397                                 pLabel->SetTextJustify(36);
398                                 str.clear(); ss.clear();
399                                 ss << m_stTree.emIsSaturated[ttIndex]; ss >> str;
400                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
401                                 pTextEntry->SetWidth(entryWidth);
402                                 entryWidth = pTextEntry->GetWidth();
403                                 pTextEntry->SetEnabled(kFALSE);
404 
405                                 pHFrame->AddFrame(pLabel, pTextLayout);
406                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
407                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
408 
409                 frame->AddFrame(pCGroup, pGroupLayout);
410         }
411 
412         // HAD part

413         if(m_stTree.hadIsFilled[ttIndex]) {
414                 pCGroup = new TGGroupFrame(frame,"Had", kVerticalFrame);
415                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
416                                 pLabel = new TGLabel(pHFrame,"HadEnergy:");
417                                 pLabel->SetTextJustify(36);
418                                 str.clear(); ss.clear();
419                                 ss << m_stTree.hadEnergy[ttIndex]; ss >> str;
420                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
421                                 pTextEntry->SetWidth(entryWidth);
422                                 entryWidth = pTextEntry->GetWidth();
423                                 pTextEntry->SetEnabled(kFALSE);
424 
425                                 pHFrame->AddFrame(pLabel, pTextLayout);
426                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
427                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
428 
429                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
430                                 pLabel = new TGLabel(pHFrame,"nADC:");
431                                 pLabel->SetTextJustify(36);
432                                 str.clear(); ss.clear();
433                                 ss << m_stTree.nHadADC[ttIndex]; ss >> str;
434                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
435                                 pTextEntry->SetWidth(entryWidth);
436                                 pTextEntry->SetEnabled(kFALSE);
437 
438                                 pHFrame->AddFrame(pLabel, pTextLayout);
439                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
440                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
441 
442                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
443                                 pLabel = new TGLabel(pHFrame,"ADC:");
444                                 pLabel->SetTextJustify(36);
445                                 str.clear(); ss.clear(); oss.str("");;
446 
447                                 for(int i=0;i<m_stTree.nHadADC[ttIndex];++i) {
448                                         oss << m_stTree.hadADC[ttIndex][i]<<" ";
449                                 }
450                                 pTextEntry = new TGTextEntry(pHFrame,oss.str().c_str());
451                                 pTextEntry->SetWidth(entryWidth);
452                                 entryWidth = pTextEntry->GetWidth();
453                                 pTextEntry->SetEnabled(kFALSE);
454 
455                                 pHFrame->AddFrame(pLabel, pTextLayout);
456                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
457                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
458 
459                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
460                                 pLabel = new TGLabel(pHFrame,"ADC peak pos.:");
461                                 pLabel->SetTextJustify(36);
462                                 str.clear(); ss.clear();
463                                 ss << m_stTree.hadADCPeak[ttIndex]; ss >> str;
464                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
465                                 pTextEntry->SetWidth(entryWidth);
466                                 entryWidth = pTextEntry->GetWidth();
467                                 pTextEntry->SetEnabled(kFALSE);
468 
469                                 pHFrame->AddFrame(pLabel, pTextLayout);
470                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
471                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
472 
473                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
474                                 pLabel = new TGLabel(pHFrame,"nLUT:");
475                                 pLabel->SetTextJustify(36);
476                                 str.clear(); ss.clear();
477                                 ss << m_stTree.nHadLUT[ttIndex]; ss >> str;
478                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
479                                 pTextEntry->SetWidth(entryWidth);
480                                 pTextEntry->SetEnabled(kFALSE);
481 
482                                 pHFrame->AddFrame(pLabel, pTextLayout);
483                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
484                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
485 
486                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
487                                 pLabel = new TGLabel(pHFrame,"LUT:");
488                                 pLabel->SetTextJustify(36);
489                                 str.clear(); ss.clear(); oss.str("");
490 
491                                 for(int i=0;i<m_stTree.nHadLUT[ttIndex];++i) {
492                                         oss << m_stTree.hadLUT[ttIndex][i]<<" ";
493                                 }
494                                 pTextEntry = new TGTextEntry(pHFrame,oss.str().c_str());
495                                 pTextEntry->SetWidth(entryWidth);
496                                 entryWidth = pTextEntry->GetWidth();
497                                 pTextEntry->SetEnabled(kFALSE);
498 
499                                 pHFrame->AddFrame(pLabel, pTextLayout);
500                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
501                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
502 
503                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
504                                 pLabel = new TGLabel(pHFrame,"LUT peak pos.:");
505                                 pLabel->SetTextJustify(36);
506                                 str.clear(); ss.clear();
507                                 ss << m_stTree.hadPeak[ttIndex]; ss >> str;
508                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
509                                 pTextEntry->SetWidth(entryWidth);
510                                 entryWidth = pTextEntry->GetWidth();
511                                 pTextEntry->SetEnabled(kFALSE);
512 
513                                 pHFrame->AddFrame(pLabel, pTextLayout);
514                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
515                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
516 
517                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
518                                 pLabel = new TGLabel(pHFrame,"BCID:");
519                                 pLabel->SetTextJustify(36);
520                                 str.clear(); ss.clear(); oss.str("");
521 
522                                 for(int i=0;i<m_stTree.nHadADC[ttIndex];++i) {
523                                         oss << m_stTree.hadBCIDvec[ttIndex][i]<<" ";
524                                 }
525                                 pTextEntry = new TGTextEntry(pHFrame,oss.str().c_str());
526                                 pTextEntry->SetWidth(entryWidth);
527                                 entryWidth = pTextEntry->GetWidth();
528                                 pTextEntry->SetEnabled(kFALSE);
529 
530                                 pHFrame->AddFrame(pLabel, pTextLayout);
531                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
532                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
533 
534                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
535                                 pLabel = new TGLabel(pHFrame,"BCID@peak:");
536                                 pLabel->SetTextJustify(36);
537                                 str.clear(); ss.clear();
538                                 ss << m_stTree.hadBCID[ttIndex]; ss >> str;
539                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
540                                 pTextEntry->SetWidth(entryWidth);
541                                 entryWidth = pTextEntry->GetWidth();
542                                 pTextEntry->SetEnabled(kFALSE);
543 
544                                 pHFrame->AddFrame(pLabel, pTextLayout);
545                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
546                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
547                         
548                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
549                                 pLabel = new TGLabel(pHFrame,"extBCID:");
550                                 pLabel->SetTextJustify(36);
551                                 str.clear(); ss.clear(); oss.str("");
552 
553                                 for(int i=0;i<m_stTree.nHadADC[ttIndex];++i) {
554                                         oss << m_stTree.hadBCIDext[ttIndex][i]<<" ";
555                                 }
556                                 pTextEntry = new TGTextEntry(pHFrame,oss.str().c_str());
557                                 pTextEntry->SetWidth(entryWidth);
558                                 entryWidth = pTextEntry->GetWidth();
559                                 pTextEntry->SetEnabled(kFALSE);
560 
561                                 pHFrame->AddFrame(pLabel, pTextLayout);
562                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
563                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
564 
565                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
566                                 pLabel = new TGLabel(pHFrame,"Error:");
567                                 pLabel->SetTextJustify(36);
568                                 str.clear(); ss.clear();
569                                 ss << m_stTree.hadError[ttIndex]; ss >> str;
570                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
571                                 pTextEntry->SetWidth(entryWidth);
572                                 entryWidth = pTextEntry->GetWidth();
573                                 pTextEntry->SetEnabled(kFALSE);
574 
575                                 pHFrame->AddFrame(pLabel, pTextLayout);
576                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
577                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
578 
579                         pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );
580                                 pLabel = new TGLabel(pHFrame,"isSaturated:");
581                                 pLabel->SetTextJustify(36);
582                                 str.clear(); ss.clear();
583                                 ss << m_stTree.hadIsSaturated[ttIndex]; ss >> str;
584                                 pTextEntry = new TGTextEntry(pHFrame,str.c_str());
585                                 pTextEntry->SetWidth(entryWidth);
586                                 entryWidth = pTextEntry->GetWidth();
587                                 pTextEntry->SetEnabled(kFALSE);
588 
589                                 pHFrame->AddFrame(pLabel, pTextLayout);
590                                 pHFrame->AddFrame(pTextEntry, pEntryLayout);
591                         pCGroup->AddFrame(pHFrame, pSubFrameLayout);
592                 frame->AddFrame(pCGroup, pGroupLayout);
593         }
594 }
595 
596 
597 
598 /*

599         pCGroup = new TGGroupFrame(frame,"Common", kVerticalFrame);

600                 pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );                        

601                         str.clear(); ss.clear();

602                         ss << "eta: "<< m_stTree.eta[ttIndex]; ss >> str;

603                         pLabel = new TGLabel(pHFrame, str.c_str());

604                         pLabel->SetTextJustify(36);

605                         pHFrame->AddFrame(pLabel, pTextLayout);

606 

607                         str.clear(); ss.clear();

608                         ss << "phi: "<< m_stTree.phi[ttIndex]; ss >> str;

609                         pLabel = new TGLabel(pHFrame, str.c_str());

610                         pLabel->SetTextJustify(36);

611                         pHFrame->AddFrame(pLabel, pTextLayout);

612                 pCGroup->AddFrame(pHFrame, pSubFrameLayout);

613 

614                 pHFrame = new TGHorizontalFrame(pCGroup,0,0, kHorizontalFrame );

615                         str.clear(); ss.clear();

616                         ss << "nADC: "<< m_stTree.nADC; ss >> str;

617                         pLabel = new TGLabel(pHFrame, str.c_str());

618                         pLabel->SetTextJustify(36);

619                         pHFrame->AddFrame(pLabel, pTextLayout);

620 

621                         str.clear(); ss.clear();

622                         ss << "nLUT: "<< m_stTree.nLUT; ss >> str;

623                         pLabel = new TGLabel(pHFrame, str.c_str());

624                         pLabel->SetTextJustify(36);

625                         pHFrame->AddFrame(pLabel, pTextLayout);

626                 pCGroup->AddFrame(pHFrame, pSubFrameLayout);

627         frame->AddFrame(pCGroup, pGroupLayout);

628 */

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!