#include <DigitText.h>
Public Member Functions | |
| DigitText (GuiTextView *gtv) | |
| virtual | ~DigitText () |
| void | Clear () |
| void | AddLine (const char *line) |
| void | AddText (const char *text) |
| void | AddCandDigitText (const CandDigitHandle &inDigit) |
| void | AddPlexSEIdAltLItemText (const PlexSEIdAltLItem &inItem) |
| void | AddStripIdText (const PlexStripEndId &inStrip) |
| void | AddPixelSpotIdText (const PlexPixelSpotId &inStrip) |
| GuiTextView * | GetTextView () |
Private Member Functions | |
| DigitText (const DigitText &rhs) | |
| DigitText & | operator= (const DigitText &rhs) |
Private Attributes | |
| GuiTextView * | fText |
Definition at line 26 of file DigitText.h.
| DigitText::DigitText | ( | GuiTextView * | gtv | ) |
Definition at line 14 of file DigitText.cxx.
References fText.
00015 : fText(gtv) 00016 { 00017 const_cast<TGWindow*>(fText->GetParent())->Resize(460,180); 00018 }
| DigitText::~DigitText | ( | ) | [virtual] |
| DigitText::DigitText | ( | const DigitText & | rhs | ) | [private] |
| void DigitText::AddCandDigitText | ( | const CandDigitHandle & | inDigit | ) |
Definition at line 56 of file DigitText.cxx.
References RawChannelId::AsString(), VldContext::AsString(), Form(), fText, CandDigitListHandle::GetAbsTime(), CandDigitHandle::GetChannelId(), CandDigitHandle::GetCharge(), CandHandle::GetMother(), PlexSEIdAltL::GetPlane(), CandDigitHandle::GetPlexSEIdAltL(), CandHandle::GetVldContext(), and CalDigitType::kNone.
Referenced by GfxStripList::ExecuteEvent(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), and GfxStripList::ExecuteEventStrip().
00057 { 00058 const PlexSEIdAltL& altl = cdh.GetPlexSEIdAltL(); 00059 00060 const VldContext* vld = cdh.GetVldContext(); 00061 const CandDigitListHandle* cdlh; 00062 00063 00064 fText->AddLine(Form("Context: %s",vld->AsString())); 00065 cdlh = dynamic_cast<const CandDigitListHandle*>(cdh.GetMother()); 00066 if (cdlh) 00067 fText->AddLine(Form("AbsTime: %12.9f",cdlh->GetAbsTime())); 00068 fText->AddLine(Form("Plane: %d",altl.GetPlane())); 00069 fText->AddLine(Form("Charge: %.1f",cdh.GetCharge())); 00070 fText->AddLine(Form("Charge (no cal): %.1f",cdh.GetCharge(CalDigitType::kNone))); 00071 fText->AddLine(Form("Channel: %s",cdh.GetChannelId().AsString("e"))); 00072 }
| void DigitText::AddLine | ( | const char * | line | ) |
Definition at line 31 of file DigitText.cxx.
References fText.
Referenced by TridModel::PrintToDigitText().
00032 { 00033 if (!line) return; 00034 fText->AddLine(line); 00035 }
| void DigitText::AddPixelSpotIdText | ( | const PlexPixelSpotId & | inStrip | ) |
Definition at line 92 of file DigitText.cxx.
References PlexPixelSpotId::AsString(), Form(), and fText.
Referenced by AddPlexSEIdAltLItemText().
| void DigitText::AddPlexSEIdAltLItemText | ( | const PlexSEIdAltLItem & | inItem | ) |
Definition at line 74 of file DigitText.cxx.
References AddPixelSpotIdText(), AddStripIdText(), Form(), fText, PlexSEIdAltLItem::GetPE(), PlexSEIdAltLItem::GetPixelSpotId(), PlexSEIdAltLItem::GetSEId(), PlexSEIdAltLItem::GetTime(), PlexSEIdAltLItem::GetWeight(), and Munits::ns.
00075 { 00076 AddStripIdText(item.GetSEId()); 00077 AddPixelSpotIdText(item.GetPixelSpotId()); 00078 fText->AddLine(Form("Weight: %f",item.GetWeight())); 00079 fText->AddLine(Form("Charge (PE): %.1f pe",item.GetPE())); 00080 fText->AddLine(Form("Time (ns): %.1f ns",item.GetTime()/Munits::ns)); 00081 }
| void DigitText::AddStripIdText | ( | const PlexStripEndId & | inStrip | ) |
Definition at line 83 of file DigitText.cxx.
References PlaneView::AsString(), StripEnd::AsString(), PlexStripEndId::AsString(), Form(), fText, PlexStripEndId::GetEnd(), PlexPlaneId::GetPlane(), PlexPlaneId::GetPlaneView(), and PlexStripEndId::GetStrip().
Referenced by AddPlexSEIdAltLItemText().
00084 { 00085 fText->AddLine(Form("Strip ID: %s",strip.AsString())); 00086 fText->AddLine(Form("Plane: %d",strip.GetPlane())); 00087 fText->AddLine(Form("Strip: %d",strip.GetStrip())); 00088 fText->AddLine(Form("Strip end: %s",StripEnd::AsString(strip.GetEnd()))); 00089 fText->AddLine(Form("View: %s",PlaneView::AsString(strip.GetPlaneView()))); 00090 }
| void DigitText::AddText | ( | const char * | text | ) |
Definition at line 37 of file DigitText.cxx.
References fText.
00038 { 00039 if (!text) return; 00040 00041 // Break up text into lines. 00042 const char* linestart = text; 00043 const char* ptr = text; 00044 while ((*ptr) != '\0') { 00045 if (*ptr == '\n') { 00046 int length = ptr-linestart; 00047 char* line = new char[length+1]; 00048 strncpy(line,linestart,length-1); // Omit the return char. 00049 fText->AddLine(line); 00050 } 00051 ++ptr; 00052 } 00053 }
| void DigitText::Clear | ( | ) |
Definition at line 26 of file DigitText.cxx.
References fText.
Referenced by GfxStripList::ExecuteEvent(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), GfxStripList::ExecuteEventStrip(), and TridModel::PrintToDigitText().
00027 { 00028 fText->Clear(); 00029 }
| GuiTextView* DigitText::GetTextView | ( | ) |
GuiTextView* DigitText::fText [private] |
Definition at line 50 of file DigitText.h.
Referenced by AddCandDigitText(), AddLine(), AddPixelSpotIdText(), AddPlexSEIdAltLItemText(), AddStripIdText(), AddText(), Clear(), DigitText(), and ~DigitText().
1.4.7