#include <GfxDigitList.h>
Inheritance diagram for GfxDigitList:

Contact: bv@bnl.gov
Created on: Wed Aug 21 17:00:47 2002
Definition at line 36 of file EventDisplay/GfxDigitList.h.
|
|
Definition at line 80 of file Midad/MultiPage/GfxDigitList.h. |
|
|
Definition at line 84 of file EventDisplay/GfxDigitList.h. |
|
|
GfxDigitList Definition at line 54 of file EventDisplay/GfxDigitList.cxx. References fCfg, fDigitCA, RecArrayAllocator::GetArray(), RecArrayAllocator::Instance(), GfxCfg::modified_signal, and ReConfigure(). 00055 : fCfg(0) 00056 , fColorRange(0) 00057 , fEVD(0) 00058 , fMint(0) 00059 , fHideDigits(false) 00060 { 00061 fCfg = new GfxDigitListCfg(); 00062 fCfg->modified_signal.connect 00063 (SigC::slot_class(*this,&GfxDigitList::ReConfigure)); 00064 RecArrayAllocator& a = RecArrayAllocator::Instance(); 00065 fDigitCA = a.GetArray("GfxDigit"); 00066 }
|
|
|
Definition at line 68 of file EventDisplay/GfxDigitList.cxx. References fDigitCA, RecArrayAllocator::Instance(), and RecArrayAllocator::ReleaseArray(). 00069 {
00070 RecArrayAllocator& a = RecArrayAllocator::Instance();
00071 if (fDigitCA) {a.ReleaseArray(fDigitCA); fDigitCA = 0;}
00072 }
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 183 of file EventDisplay/GfxDigitList.cxx. References fDigitCA, and fDigits. Referenced by Configure().
|
|
|
This is called every time the Mint object changes. The Gfx object should pull data from Mint to configure itself. Mint will exist for the lifetime of the Gfx object. Reimplemented from GfxBase. |
|
|
This is called every time the Mint object changes. The Gfx object should pull data from Mint to configure itself. Mint will exist for the lifetime of the Gfx object. Reimplemented from GfxBase. Definition at line 98 of file EventDisplay/GfxDigitList.cxx. References ClearDigitList(), count, fDigitCA, fDigits, fMint, fPageDisplay, PlexSEIdAltL::GetBestItem(), Mint::GetDigits(), GfxBase::GetGraphicsView(), RangeControl< TYPE >::GetRange(), GuiSlider::GetRangeCtrl(), PageDisplay::GetTimeSlider(), GfxBase::GetViewState(), PlexSEIdAltL::IsVetoShield(), PlexSEIdAltLItem::IsZeroWeight(), MSG, RangeDouble, ReConfigure(), s(), select_digit(), ViewState::ShowMultiplex(), and time_range(). 00099 {
00100
00101 fMint = &mint;
00102 this->ClearDigitList();
00103 if (fHideDigits) return;
00104 const CandDigitListHandle* cslh = mint.GetDigits();
00105 if (!cslh) return;
00106
00107 RangeDouble& time_range =
00108 fPageDisplay->GetTimeSlider().GetRangeCtrl().GetRange();
00109
00110 Mint::DigitVector_t sv = CDL2STLvector<const CandDigitHandle>(*cslh);
00111
00112 Mint::DigitVector_t::iterator it, first = sv.begin(), middle, last = sv.end();
00113
00114 Slot1<bool,const CandDigitHandle*> s =
00115 bind(slot(select_digit),this->GetPlaneView(),&time_range);
00116 middle = std::partition(first,last,s);
00117
00118 bool show_mux = this->GetViewState()->ShowMultiplex();
00119 int count = 0;
00120 for (it = first; it != middle; ++it) {
00121 const PlexSEIdAltL& altl = (*it)->GetPlexSEIdAltL();
00122 if(((GetGraphicsView()!=GraphicsView::kUV && GetGraphicsView()!=GraphicsView::kXY)&& !altl.IsVetoShield()) ||
00123 ((GetGraphicsView()==GraphicsView::kUV || GetGraphicsView()==GraphicsView::kXY) && altl.IsVetoShield())){
00124 if (show_mux || altl.IsVetoShield() ) {
00125 int siz = altl.size();
00126 for (int ind = 0; ind < siz; ++ind) {
00127 int last = fDigitCA->GetLast()+1;
00128 new ((*fDigitCA)[last]) GfxDigit(**it,altl[ind],*this);
00129 GfxDigit* gs = dynamic_cast<GfxDigit*>(fDigitCA->UncheckedAt(last));
00130 fDigits.push_back(gs);
00131 count++;
00132 }
00133 }
00134 else { // only show demuxed digits
00135 const PlexSEIdAltLItem& item = altl.GetBestItem();
00136 if (item.IsZeroWeight() && altl.size()>1) continue;
00137 int last = fDigitCA->GetLast()+1;
00138 new ((*fDigitCA)[last]) GfxDigit(**it,item,*this);
00139 GfxDigit* gs = dynamic_cast<GfxDigit*>(fDigitCA->UncheckedAt(last));
00140 fDigits.push_back(gs);
00141 count++;
00142 }
00143 }
00144 }
00145 MSG("Midad",Msg::kVerbose) << "Configure: Count = " << count << endl;
00146 this->ReConfigure();
00147 }
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
Definition at line 64 of file Midad/MultiPage/GfxDigitList.h. 00064 { return fHideDigits; }
|
|
|
Definition at line 67 of file EventDisplay/GfxDigitList.h. Referenced by GfxDigit::Paint(). 00067 { return fHideDigits; }
|
|
|
|
|
|
Loop over our list and Draw them Definition at line 163 of file EventDisplay/GfxDigitList.cxx. References done(), fDigits, EVD::GetDrawAll(), EVD::GetDrawGhosts(), GetEVD(), EVD::GetGhostColor(), and option. 00164 {
00165
00167 GfxDigitVector_t::iterator it, done = fDigits.end();
00168 Int_t ndig=0;
00169 for (it = fDigits.begin(); it != done; ++it) {
00170 if(GetEVD()->GetDrawAll() || GetEVD()->GetDrawGhosts() || (*it)->GetColor()!=GetEVD()->GetGhostColor() ){
00171
00172 if((*it)->GetDigit().GetPlexSEIdAltL().IsVetoShield()){
00173 (*it)->Draw("f");
00174 }
00175 (*it)->Draw(option);
00176 }
00177 ndig++;
00178 }
00179 }
|
|
||||||||||||||||
|
Definition at line 50 of file EventDisplay/GfxDigitList.h. 00050 {;}
|
|
||||||||||||||||||||
|
Definition at line 189 of file EventDisplay/GfxDigitList.cxx. References DigitText::AddCandDigitText(), PlexStripEndId::AsString(), DisplayOptions::ChargeType(), DigitText::Clear(), fEVD, fMint, Form(), fPageDisplay, PlexSEIdAltL::GetBestSEId(), CandDigitHandle::GetCharge(), PlexSEIdAltL::GetCurrentItem(), PlexSEIdAltL::GetCurrentSEId(), GfxDigit::GetDigit(), EVD::GetDigitText(), PageDisplay::GetDigitText(), EVD::GetDisplayOptions(), MomNavigator::GetFragment(), GfxDigit::GetItem(), Mint::GetJobC(), PlexSEIdAltLItem::GetPE(), PlexPlaneId::GetPlane(), CandDigitHandle::GetPlexSEIdAltL(), PlexSEIdAltLItem::GetSEId(), PlexSEIdAltLItem::GetSigCorr(), PlexSEIdAltLItem::GetSigLin(), PlexStripEndId::GetStrip(), PlexSEIdAltLItem::GetTime(), PlexSEIdAltL::IsValid(), JobC::Mom, PlexSEIdAltL::Next(), s(), PlexSEIdAltL::SetFirst(), and Mint::SetPickedDigit(). Referenced by GfxDigit::ExecuteEvent(). 00190 {
00191 switch (event) {
00192 case kMouseEnter: {
00193 PlexStripEndId seid;
00194 const PlexSEIdAltLItem* itm;
00195 const CandDigitHandle& cdh = gfx_digit->GetDigit();
00196 const PlexSEIdAltLItem& item = gfx_digit->GetItem();
00197
00198 itm = &item;
00199 if (itm) {
00200 seid = itm->GetSEId();
00201 }
00202 else {
00203 const PlexSEIdAltL& altl = cdh.GetPlexSEIdAltL();
00204 PlexStripEndId best = altl.GetBestSEId();
00205
00206 altl.SetFirst();
00207 while(altl.IsValid()) {
00208 seid = altl.GetCurrentSEId();
00209 if (seid == best) {
00210 const PlexSEIdAltLItem& curr = altl.GetCurrentItem();
00211 itm = &curr;
00212 }
00213 altl.Next();
00214 }
00215 }
00216 const char* s;
00217 SimSnarlRecord *ssr =
00218 dynamic_cast<SimSnarlRecord*>(fMint->GetJobC().Mom.GetFragment("SimSnarlRecord"));
00219 if (ssr){
00220 TruthHelper truthHelp(&(fMint->GetJobC().Mom));
00221 s = Form("Digit: (%s) strip=%d, plane=%d, charge=%.1f (PEs), t=%.1f ns best nue ID=%d",
00222 seid.AsString(),
00223 seid.GetStrip(),
00224 seid.GetPlane(),
00225 itm->GetPE(),
00226 itm->GetTime()*1e9,truthHelp.GetBestNeuMatch(cdh) );
00227
00228
00229 }
00230 else{
00231 if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kNone){
00232
00233
00234 s = Form("Digit: strip=%d, plane=%d, charge=%.1f (Raw), t=%.1f ns (%s)",
00235 seid.GetStrip(),
00236 seid.GetPlane(),
00237 cdh.GetCharge(),
00238 itm->GetTime()*1e9, seid.AsString());
00239 }
00240 else if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kPE){
00241 s = Form("Digit: strip=%d, plane=%d, charge=%.1f (PEs), t=%.1f ns (%s)",
00242 seid.GetStrip(),
00243 seid.GetPlane(),
00244 itm->GetPE(),
00245 itm->GetTime()*1e9, seid.AsString());
00246 }
00247 else if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigLin){
00248 s = Form("Digit: strip=%d, plane=%d, charge=%.1f (SigLin), t=%.1f ns (%s)",
00249 seid.GetStrip(),
00250 seid.GetPlane(),
00251 itm->GetSigLin(),
00252 itm->GetTime()*1e9, seid.AsString());
00253 }
00254 else if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigCorr){
00255 s = Form("Digit: strip=%d, plane=%d, charge=%.1f (SigCorr), t=%.1f ns (%s)",
00256 seid.GetStrip(),
00257 seid.GetPlane(),
00258 itm->GetSigCorr(),
00259 itm->GetTime()*1e9, seid.AsString());
00260 }
00261 }
00262
00263 text_info.emit(s);
00264
00265 DigitText* dt = fPageDisplay->GetDigitText();
00266 if (dt) {
00267 dt->Clear();
00268 dt->AddCandDigitText(cdh);
00269 }
00270
00271 if (fMint) {
00272 fMint->SetPickedDigit(cdh);
00273 }
00274
00275 DigitText* JAMdt = fEVD->GetDigitText();
00276 if (JAMdt) {
00277 JAMdt->Clear();
00278 JAMdt->AddCandDigitText(cdh);
00279 }
00280
00281
00282 break;
00283 }
00284 default: // nothing
00285 break;
00286 }
00287 }
|
|
||||||||||||||||||||
|
Definition at line 181 of file Midad/MultiPage/GfxDigitList.cxx. References DigitText::AddCandDigitText(), PlexStripEndId::AsString(), DigitText::Clear(), fMint, Form(), fPageDisplay, PlexSEIdAltL::GetBestSEId(), PlexSEIdAltL::GetCurrentItem(), PlexSEIdAltL::GetCurrentSEId(), GfxDigit::GetDigit(), PageDisplay::GetDigitText(), GfxDigit::GetItem(), PlexSEIdAltLItem::GetPE(), PlexPlaneId::GetPlane(), CandDigitHandle::GetPlexSEIdAltL(), PlexSEIdAltLItem::GetSEId(), PlexStripEndId::GetStrip(), PlexSEIdAltLItem::GetTime(), PlexSEIdAltL::IsValid(), PlexSEIdAltL::Next(), s(), PlexSEIdAltL::SetFirst(), and Mint::SetPickedDigit(). 00183 {
00184 switch (event) {
00185 case kMouseEnter: {
00186 PlexStripEndId seid;
00187 const PlexSEIdAltLItem* itm;
00188 const CandDigitHandle& cdh = gfx_digit->GetDigit();
00189 const PlexSEIdAltLItem& item = gfx_digit->GetItem();
00190
00191 itm = &item;
00192 if (itm) {
00193 seid = itm->GetSEId();
00194 }
00195 else {
00196 const PlexSEIdAltL& altl = cdh.GetPlexSEIdAltL();
00197 PlexStripEndId best = altl.GetBestSEId();
00198
00199 altl.SetFirst();
00200 while(altl.IsValid()) {
00201 seid = altl.GetCurrentSEId();
00202 if (seid == best) {
00203 const PlexSEIdAltLItem& curr = altl.GetCurrentItem();
00204 itm = &curr;
00205 }
00206 altl.Next();
00207 }
00208 }
00209
00210 const char* s = Form("Digit: strip=%d, plane=%d, charge=%.1f, t=%.1f ns (%s)",
00211 seid.GetStrip(),
00212 seid.GetPlane(),
00213 itm->GetPE(),
00214 itm->GetTime()/Munits::ns, seid.AsString());
00215 text_info.emit(s);
00216
00217 DigitText* dt = fPageDisplay->GetDigitText();
00218 if (dt) {
00219 dt->Clear();
00220 dt->AddCandDigitText(cdh);
00221 }
00222 if (fMint) {
00223 fMint->SetPickedDigit(cdh);
00224 }
00225
00226 break;
00227 }
00228 default: // nothing
00229 break;
00230 }
00231 }
|
|
|
Return the configurable associated with this Gfx. Some things may be set which are meaningless for a particular Gfx. The sub class MUST implement this because there is no way to create the base class CfgConfigurable. Implements GfxBase. Definition at line 49 of file Midad/MultiPage/GfxDigitList.h. 00049 { return *fCfg; }
|
|
|
Return the configurable associated with this Gfx. Some things may be set which are meaningless for a particular Gfx. The sub class MUST implement this because there is no way to create the base class CfgConfigurable. Implements GfxBase. Definition at line 52 of file EventDisplay/GfxDigitList.h. Referenced by GfxDigit::ConfigGui(), GfxDigit::Configure(), GfxDigit::ModifyCoords(), and GfxDigit::Paint(). 00052 { return *fCfg; }
|
|
|
Definition at line 51 of file Midad/MultiPage/GfxDigitList.h. References RangeDouble. 00051 { return *fColorRange; }
|
|
|
Definition at line 54 of file EventDisplay/GfxDigitList.h. References RangeDouble. 00054 { return *fColorRange; }
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
Definition at line 68 of file EventDisplay/GfxDigitList.h. Referenced by Draw(), and GfxDigit::SetColor(). 00068 {return fEVD;}
|
|
|
Definition at line 61 of file Midad/MultiPage/GfxDigitList.h. 00061 { return *fMint; }
|
|
|
Definition at line 64 of file EventDisplay/GfxDigitList.h. Referenced by GfxDigit::GetRelativeValue(). 00064 { return *fMint; }
|
|
|
|
|
|
Definition at line 400 of file EventDisplay/GfxDigitList.cxx. References fEVD, fHideDigits, GfxBase::GetGraphicsView(), ReConfigure(), and EVD::UpdateCanvas(). 00401 {
00402 fHideDigits = hide;
00403 this->ReConfigure();
00404 if(GetGraphicsView()==GraphicsView::kVZ)fEVD->UpdateCanvas();
00405 }
|
|
||||||||||||
|
Reimplemented from GfxBase. Definition at line 78 of file Midad/MultiPage/GfxDigitList.cxx. References ViewState::color_semantic, fColorRange, fMultiPage, fPageDisplay, MultiPage::GetColorRangeControl(), RangeControl< TYPE >::GetRange(), GfxBase::GetViewState(), ReConfigure(), and ViewState::spatial_metric. 00079 {
00080 fColorRange = &mp.GetColorRangeControl(this->GetPlaneView()).GetRange();
00081 ViewState* vs = this->GetViewState();
00082 vs->color_semantic.connect(slot_class(*this,&GfxDigitList::ReConfigure));
00083 vs->spatial_metric.connect(slot_class(*this,&GfxDigitList::ReConfigure));
00084 fPageDisplay = &pd;
00085 fMultiPage = ∓
00086 }
|
|
||||||||||||
|
Reimplemented from GfxBase. Definition at line 74 of file EventDisplay/GfxDigitList.cxx. References ViewState::color_semantic, fColorRange, fEVD, fPageDisplay, EVD::GetColorRangeControl(), RangeControl< TYPE >::GetRange(), GfxBase::GetViewState(), ReConfigure(), and ViewState::spatial_metric. 00075 {
00076 fColorRange = &mp.GetColorRangeControl(this->GetPlaneView()).GetRange();
00077 ViewState* vs = this->GetViewState();
00078 vs->color_semantic.connect(slot_class(*this,&GfxDigitList::ReConfigure));
00079 vs->spatial_metric.connect(slot_class(*this,&GfxDigitList::ReConfigure));
00080 fPageDisplay = &pd;
00081 fEVD = ∓
00082 }
|
|
|
|
|
|
Definition at line 149 of file EventDisplay/GfxDigitList.cxx. References count, done(), and fDigits. Referenced by Configure(), GfxDigitList(), HideDigits(), and Init(). 00150 {
00151 if (!fMint) return;
00152 if (fHideDigits) return;
00153
00154 // configure all GfxDigits
00155 int count = 0;
00156 GfxDigitVector_t::iterator it, done = fDigits.end();
00157 for (it = fDigits.begin(); it != done; ++it) {
00158 (*it)->Configure();
00159 count++;
00160 }
00161 }
|
|
|
Definition at line 72 of file Midad/MultiPage/GfxDigitList.h. |
|
|
Definition at line 76 of file EventDisplay/GfxDigitList.h. Referenced by GfxDigitList(). |
|
|
Definition at line 74 of file Midad/MultiPage/GfxDigitList.h. |
|
|
Definition at line 78 of file EventDisplay/GfxDigitList.h. Referenced by DigitMasked(), GetDigitColor(), and Init(). |
|
|
Definition at line 79 of file Midad/MultiPage/GfxDigitList.h. |
|
|
Definition at line 83 of file EventDisplay/GfxDigitList.h. Referenced by ClearDigitList(), Configure(), GfxDigitList(), and ~GfxDigitList(). |
|
|
Definition at line 81 of file Midad/MultiPage/GfxDigitList.h. Referenced by ClearDigitList(), Configure(), Draw(), and ReConfigure(). |
|
|
Definition at line 80 of file EventDisplay/GfxDigitList.h. Referenced by DigitMasked(), ExecuteEvent(), GetDigitColor(), HideDigits(), and Init(). |
|
|
Definition at line 83 of file Midad/MultiPage/GfxDigitList.h. Referenced by HideDigits(). |
|
|
Definition at line 77 of file Midad/MultiPage/GfxDigitList.h. |
|
|
Definition at line 81 of file EventDisplay/GfxDigitList.h. Referenced by Configure(), DigitMasked(), ExecuteEvent(), ExecuteEventDigit(), and GetDigitColor(). |
|
|
Definition at line 76 of file Midad/MultiPage/GfxDigitList.h. Referenced by Init(). |
|
|
Definition at line 75 of file Midad/MultiPage/GfxDigitList.h. |
|
|
Definition at line 79 of file EventDisplay/GfxDigitList.h. Referenced by Configure(), ExecuteEvent(), ExecuteEventDigit(), and Init(). |
1.3.9.1