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

Public Member Functions | |
| GfxShowerList () | |
| ~GfxShowerList () | |
| void | Init (PageDisplay &pd, EVD &mp) |
| void | Configure (Mint &mint) |
| GfxShowerListCfg & | GetCfg () |
| void | Draw (Option_t *option="") |
| void | ExecuteEvent (int event, int, int, GfxShower *shower) |
| void | ExecuteEvent (int, int, int) |
| EVD * | GetEVD () |
| void | HideShowers (bool hide=true) |
| bool | ShowersHidden () |
Private Types | |
| typedef std::list< GfxShower * > | ShowerList_t |
Private Member Functions | |
| GfxShowerList (const GfxShowerList &rhs) | |
| GfxShowerList & | operator= (const GfxShowerList &rhs) |
| void | ReConfigure () |
| void | ClearShowerList () |
Private Attributes | |
| GfxShowerListCfg * | fCfg |
| SigC::Connection | fCon |
| bool | fHideShowers |
| EVD * | fEVD |
| PageDisplay * | fPageDisplay |
| TClonesArray * | fShowerCA |
| ShowerList_t | fShowers |
Contact: bv@bnl.gov
Created on: Wed Oct 2 15:40:07 2002
Definition at line 29 of file GfxShowerList.h.
|
|
Definition at line 66 of file GfxShowerList.h. |
|
|
Definition at line 28 of file GfxShowerList.cxx. References fCfg, fShowerCA, RecArrayAllocator::GetArray(), RecArrayAllocator::Instance(), GfxCfg::modified_signal, and ReConfigure(). 00029 :fCfg(0) 00030 ,fHideShowers(false) 00031 { 00032 fCfg = new GfxShowerListCfg(); 00033 fCfg->modified_signal.connect 00034 (SigC::slot_class(*this,&GfxShowerList::ReConfigure)); 00035 RecArrayAllocator& a = RecArrayAllocator::Instance(); 00036 fShowerCA = a.GetArray("GfxShower"); 00037 }
|
|
|
Definition at line 39 of file GfxShowerList.cxx. References fShowerCA, RecArrayAllocator::Instance(), and RecArrayAllocator::ReleaseArray(). 00040 {
00041 RecArrayAllocator& a = RecArrayAllocator::Instance();
00042 if (fShowerCA) {a.ReleaseArray(fShowerCA); fShowerCA = 0;}
00043 }
|
|
|
|
|
|
Definition at line 112 of file GfxShowerList.cxx. References fShowerCA, and fShowers. 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. Definition at line 55 of file GfxShowerList.cxx. References ClearShowerList(), fPageDisplay, fShowerCA, fShowers, EVD::GetCandEvent(), CandRecoHandle::GetCandSlice(), EVD::GetCandSlice(), GetEVD(), CandEventHandle::GetLastShower(), EVD::GetNumSlices(), RangeControl< TYPE >::GetRange(), GuiSlider::GetRangeCtrl(), CandEventHandle::GetShower(), Mint::GetShowers(), PageDisplay::GetTimeSlider(), Range< TYPE >::InRange(), CandHandle::IsCloneOf(), RangeDouble, ReConfigure(), and time_range(). 00056 {
00057
00058
00059 this->ClearShowerList();
00060 const CandShowerListHandle* ctlh = mint.GetShowers();
00061 if (!ctlh) return;
00062
00063 Mint::ShowerVector_t tv = CDL2STLvector<CandShowerHandle>(*ctlh);
00064 RangeDouble& time_range =
00065 fPageDisplay->GetTimeSlider().GetRangeCtrl().GetRange();
00066
00067 if (fShowers.size()) this->ClearShowerList();
00068
00069 int siz = tv.size();
00070 for (int ind = 0; ind < siz; ++ind) {
00071
00072 const CandShowerHandle & csh=*tv[ind];
00073 bool addshower=true;
00074 if(GetEVD()->GetCandSlice()){
00075 CandSliceHandle slc1 = *(GetEVD()->GetCandSlice());
00076 CandSliceHandle slc2;
00077 if(csh.GetCandSlice()) slc2=*(csh.GetCandSlice());
00078 if(slc1!=slc2 && !slc1.IsCloneOf(slc2)){
00079 addshower=false;
00080 }
00081 }
00082 else if(GetEVD()->GetCandEvent()){
00083 addshower=false;
00084 for( Int_t ishower=0;ishower<=GetEVD()->GetCandEvent()->GetLastShower();ishower++){
00085 const CandShowerHandle *evshower = dynamic_cast<const CandShowerHandle *>(GetEVD()->GetCandEvent()->GetShower(ishower));
00086 if (*evshower==csh){
00087 addshower=true;
00088 break;
00089 }
00090 }
00091 }
00092
00093 int last = fShowerCA->GetLast()+1;
00094 if(addshower && time_range.InRange(tv[ind]->GetVtxT())|| GetEVD()->GetNumSlices()<2){
00095 new ((*fShowerCA)[last]) GfxShower(*tv[ind],*this);
00096 GfxShower* gs = dynamic_cast<GfxShower*>(fShowerCA->UncheckedAt(last));
00097 fShowers.push_back( gs);
00098 }
00099 }
00100
00101 this->ReConfigure();
00102
00103 }
|
|
|
Definition at line 119 of file GfxShowerList.cxx. References fShowers, and option. 00120 {
00121 // cerr << "GfxShowerList::Draw("<<option<<")\n";
00122 Int_t nshower =0;
00123 for (ShowerList_t::iterator it=fShowers.begin(); it != fShowers.end(); ++it) {
00124 (*it)->Draw(option);
00125 nshower ++;
00126 }
00127 }
|
|
||||||||||||||||
|
Definition at line 43 of file GfxShowerList.h. 00043 {;}
|
|
||||||||||||||||||||
|
Definition at line 129 of file GfxShowerList.cxx. References Form(), CandRecoHandle::GetCharge(), CandShowerHandle::GetEnergy(), CandHandle::GetNDaughters(), and GfxShower::GetShower(). Referenced by GfxShower::ExecuteEvent(). 00130 {
00131 switch (event) {
00132 case kMouseEnter: {
00133
00134
00135 const CandShowerHandle & csh = shower->GetShower();
00136
00137 text_info.emit(Form("%s: %d strips, PE sum=%.1f Energy=%.1f",
00138 "shower", csh.GetNDaughters(),
00139 csh.GetCharge(CalStripType::kPE),
00140 csh.GetEnergy()));
00141 break;
00142 }
00143 default: // nothing
00144 break;
00145 }
00146
00147 }
|
|
|
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 39 of file GfxShowerList.h. 00039 { return *fCfg; }
|
|
|
Definition at line 44 of file GfxShowerList.h. Referenced by GfxShower::BuildDiscreteImp(), GfxShower::BuildRealImp(), and Configure(). 00044 {return fEVD;}
|
|
|
Definition at line 149 of file GfxShowerList.cxx. References fEVD, fHideShowers, GfxBase::GetGraphicsView(), ReConfigure(), and EVD::UpdateCanvas(). 00150 {
00151 fHideShowers = hide;
00152 this->ReConfigure();
00153 if(GetGraphicsView()==GraphicsView::kXY)fEVD->UpdateCanvas();
00154 }
|
|
||||||||||||
|
Reimplemented from GfxBase. Definition at line 46 of file GfxShowerList.cxx. References fEVD, fPageDisplay, GfxBase::GetViewState(), ReConfigure(), and ViewState::spatial_metric. 00047 {
00048
00049 fEVD= ∓
00050 fPageDisplay= &pd;
00051 ViewState* vs = this->GetViewState();
00052 vs->spatial_metric.connect(slot_class(*this,&GfxShowerList::ReConfigure));
00053 }
|
|
|
|
|
|
Definition at line 104 of file GfxShowerList.cxx. References fShowers. Referenced by Configure(), GfxShowerList(), HideShowers(), and Init(). 00105 {
00106 for (ShowerList_t::iterator it=fShowers.begin(); it != fShowers.end(); ++it) {
00107 if (fHideShowers) return;
00108 (*it)->Configure();
00109 }
00110 }
|
|
|
Definition at line 47 of file GfxShowerList.h. 00047 { return fHideShowers; }
|
|
|
Definition at line 58 of file GfxShowerList.h. Referenced by GfxShowerList(). |
|
|
Definition at line 59 of file GfxShowerList.h. |
|
|
Definition at line 62 of file GfxShowerList.h. Referenced by HideShowers(), and Init(). |
|
|
Definition at line 60 of file GfxShowerList.h. Referenced by HideShowers(). |
|
|
Definition at line 63 of file GfxShowerList.h. Referenced by Configure(), and Init(). |
|
|
Definition at line 65 of file GfxShowerList.h. Referenced by ClearShowerList(), Configure(), GfxShowerList(), and ~GfxShowerList(). |
|
|
Definition at line 67 of file GfxShowerList.h. Referenced by ClearShowerList(), Configure(), Draw(), and ReConfigure(). |
1.3.9.1