GfxDigitList Class Reference

#include <GfxDigitList.h>

Inheritance diagram for GfxDigitList:

GfxBase GfxBase List of all members.

Public Member Functions

 GfxDigitList ()
 ~GfxDigitList ()
void Init (PageDisplay &pd, EVD &mp)
void Configure (Mint &mint)
void Draw (Option_t *option="")
void ExecuteEvent (int, int, int, GfxDigit *hit)
void ExecuteEvent (int, int, int)
GfxDigitListCfgGetCfg ()
RangeDoubleGetColorRange ()
bool DigitMasked (const CandDigitHandle &csh) const
bool DigitMasked (const CandDigitHandle &csh, const PlexSEIdAltLItem &itm) const
int GetDigitColor (const CandDigitHandle &csh) const
int GetDigitColor (const CandDigitHandle &csh, const PlexSEIdAltLItem &itm) const
MintGetMint ()
void HideDigits (bool hide=true)
bool DigitsHidden ()
EVDGetEVD ()
 GfxDigitList ()
 ~GfxDigitList ()
void Init (PageDisplay &pd, MultiPage &mp)
void Configure (Mint &mint)
void Draw (Option_t *option="")
void ExecuteEventDigit (int event, int px, int py, GfxDigit *hit)
GfxDigitListCfgGetCfg ()
RangeDoubleGetColorRange ()
bool DigitMasked (const CandDigitHandle &csh) const
bool DigitMasked (const CandDigitHandle &csh, const PlexSEIdAltLItem &itm) const
int GetDigitColor (const CandDigitHandle &csh) const
int GetDigitColor (const CandDigitHandle &csh, const PlexSEIdAltLItem &itm) const
MintGetMint ()
void HideDigits (bool hide=true)
bool DigitsHidden ()

Private Types

typedef std::vector< GfxDigit * > GfxDigitVector_t
typedef std::vector< GfxDigit * > GfxDigitVector_t

Private Member Functions

void ReConfigure (void)
void ClearDigitList ()
void ReConfigure (void)
void ClearDigitList ()

Private Attributes

GfxDigitListCfgfCfg
SigC::Ptr< RangeDoublefColorRange
PageDisplayfPageDisplay
EVDfEVD
MintfMint
TClonesArray * fDigitCA
GfxDigitVector_t fDigits
bool fHideDigits
GfxDigitListCfgfCfg
SigC::Ptr< RangeDoublefColorRange
PageDisplayfPageDisplay
MultiPagefMultiPage
MintfMint
TClonesArray * fDigitCA

Detailed Description

Id
GfxDigitList.h,v 1.4 2003/10/23 19:50:21 musser Exp

Definition at line 36 of file EventDisplay/GfxDigitList.h.


Member Typedef Documentation

typedef std::vector<GfxDigit*> GfxDigitList::GfxDigitVector_t [private]

Definition at line 80 of file Midad/MultiPage/GfxDigitList.h.

typedef std::vector<GfxDigit*> GfxDigitList::GfxDigitVector_t [private]

Definition at line 84 of file EventDisplay/GfxDigitList.h.


Constructor & Destructor Documentation

GfxDigitList::GfxDigitList (  ) 

GfxDigitList

Definition at line 54 of file EventDisplay/GfxDigitList.cxx.

References MuELoss::a, fCfg, fDigitCA, 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 }

GfxDigitList::~GfxDigitList (  ) 

Definition at line 68 of file EventDisplay/GfxDigitList.cxx.

References MuELoss::a, fDigitCA, and RecArrayAllocator::Instance().

00069 {
00070    RecArrayAllocator& a = RecArrayAllocator::Instance();
00071    if (fDigitCA) {a.ReleaseArray(fDigitCA); fDigitCA = 0;}
00072 }

GfxDigitList::GfxDigitList (  ) 

GfxDigitList::~GfxDigitList (  ) 


Member Function Documentation

void GfxDigitList::ClearDigitList (  )  [private]

void GfxDigitList::ClearDigitList (  )  [private]

Definition at line 183 of file EventDisplay/GfxDigitList.cxx.

References fDigitCA, and fDigits.

Referenced by Configure().

00184 {
00185     fDigits.clear();
00186     fDigitCA->Clear("C");
00187 }

void GfxDigitList::Configure ( Mint mint  )  [virtual]

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.

void GfxDigitList::Configure ( Mint mint  )  [virtual]

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, fHideDigits, fMint, fPageDisplay, Mint::GetDigits(), GfxBase::GetGraphicsView(), RangeControl< TYPE >::GetRange(), GuiSlider::GetRangeCtrl(), PageDisplay::GetTimeSlider(), GfxBase::GetViewState(), PlexSEIdAltLItem::IsZeroWeight(), GraphicsView::kUV, Msg::kVerbose, GraphicsView::kXY, MSG, ReConfigure(), 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 }

bool GfxDigitList::DigitMasked ( const CandDigitHandle csh,
const PlexSEIdAltLItem itm 
) const

bool GfxDigitList::DigitMasked ( const CandDigitHandle csh  )  const

bool GfxDigitList::DigitMasked ( const CandDigitHandle csh,
const PlexSEIdAltLItem itm 
) const

Definition at line 313 of file EventDisplay/GfxDigitList.cxx.

References DisplayOptions::ChargeType(), ViewState::color_is_charge, ViewState::color_is_time, fColorRange, fEVD, fMint, CandDigitHandle::GetCharge(), EVD::GetDisplayOptions(), PlexSEIdAltLItem::GetPE(), PlexSEIdAltLItem::GetSigCorr(), PlexSEIdAltLItem::GetSigLin(), PlexSEIdAltLItem::GetTime(), Mint::GetTimeRange(), CalDigitType::kPE, CalDigitType::kSigCorr, CalDigitType::kSigLin, and Range< TYPE >::Min().

00315 {
00316     if (!fColorRange) return false;
00317 
00318     double val=0;
00319     bool ret;
00320     switch (this->GetViewState()->GetColorSemantic()) {
00321     case ViewState::color_is_time:
00322       val = itm.GetTime()-fMint->GetTimeRange().Min();
00323       ret = fColorRange->InRange(val);
00324       return !ret;
00325     case ViewState::color_is_charge:
00326       val =cdh.GetCharge();
00327       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kPE)
00328         val=itm.GetPE();
00329       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigLin)
00330         val=itm.GetSigLin();
00331       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigCorr)
00332         val=itm.GetSigCorr();      
00333       ret = val>fColorRange->Min();
00334       return !ret;
00335     default:
00336       return false;
00337       break;
00338     }
00339 }

bool GfxDigitList::DigitMasked ( const CandDigitHandle csh  )  const

Definition at line 289 of file EventDisplay/GfxDigitList.cxx.

References DisplayOptions::ChargeType(), ViewState::color_is_charge, ViewState::color_is_time, fColorRange, fEVD, fMint, PlexSEIdAltL::GetBestItem(), CandDigitHandle::GetCharge(), EVD::GetDisplayOptions(), PlexSEIdAltLItem::GetPE(), CandDigitHandle::GetPlexSEIdAltL(), PlexSEIdAltLItem::GetSigCorr(), PlexSEIdAltLItem::GetSigLin(), CandDigitHandle::GetTime(), Mint::GetTimeRange(), CalDigitType::kPE, CalDigitType::kSigCorr, CalDigitType::kSigLin, and Range< TYPE >::Min().

00290 {
00291     if (!fColorRange) return false;
00292     const PlexSEIdAltLItem& itm = cdh.GetPlexSEIdAltL().GetBestItem();
00293     double val=0;
00294     bool ret;
00295     switch (this->GetViewState()->GetColorSemantic()) {
00296     case ViewState::color_is_time:
00297       val = cdh.GetTime()-fMint->GetTimeRange().Min();
00298       ret = fColorRange->InRange(val);
00299       return !ret;
00300     case ViewState::color_is_charge:
00301        val =cdh.GetCharge();
00302        if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kPE)val=itm.GetPE();
00303        if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigLin)val=itm.GetSigLin();
00304        if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigCorr)val=itm.GetSigCorr();
00305        ret = val>fColorRange->Min();
00306        return !ret;     
00307     default:
00308         return false;
00309         break;
00310     }
00311 }

bool GfxDigitList::DigitsHidden (  )  [inline]

Definition at line 64 of file Midad/MultiPage/GfxDigitList.h.

References fHideDigits.

00064 { return fHideDigits; }

bool GfxDigitList::DigitsHidden (  )  [inline]

Definition at line 67 of file EventDisplay/GfxDigitList.h.

References fHideDigits.

Referenced by GfxDigit::Paint().

00067 { return fHideDigits; }

void GfxDigitList::Draw ( Option_t *  option = ""  ) 

void GfxDigitList::Draw ( Option_t *  option = ""  ) 

Definition at line 163 of file EventDisplay/GfxDigitList.cxx.

References done(), fDigits, GetEVD(), and EVD::GetGhostColor().

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 }

void GfxDigitList::ExecuteEvent ( int  ,
int  ,
int   
) [inline]

Definition at line 50 of file EventDisplay/GfxDigitList.h.

00050 {;}

void GfxDigitList::ExecuteEvent ( int  ,
int  ,
int  ,
GfxDigit hit 
)

Definition at line 189 of file EventDisplay/GfxDigitList.cxx.

References DigitText::AddCandDigitText(), PlexStripEndId::AsString(), DisplayOptions::ChargeType(), DigitText::Clear(), fEVD, fMint, Form(), fPageDisplay, TruthHelper::GetBestNeuMatch(), 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(), CalDigitType::kNone, CalDigitType::kPE, CalDigitType::kSigCorr, CalDigitType::kSigLin, JobC::Mom, PlexSEIdAltL::Next(), PlexSEIdAltL::SetFirst(), Mint::SetPickedDigit(), and GfxBase::text_info.

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 }

void GfxDigitList::ExecuteEventDigit ( int  event,
int  px,
int  py,
GfxDigit hit 
)

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(), Munits::ns, PlexSEIdAltL::SetFirst(), Mint::SetPickedDigit(), and GfxBase::text_info.

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 }

GfxDigitListCfg& GfxDigitList::GetCfg (  )  [inline, virtual]

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.

References fCfg.

00049 { return *fCfg; }

GfxDigitListCfg& GfxDigitList::GetCfg (  )  [inline, virtual]

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.

References fCfg.

Referenced by GfxDigit::ConfigGui(), GfxDigit::Configure(), GfxDigit::ModifyCoords(), and GfxDigit::Paint().

00052 { return *fCfg; }

RangeDouble& GfxDigitList::GetColorRange (  )  [inline]

Definition at line 51 of file Midad/MultiPage/GfxDigitList.h.

References fColorRange.

00051 { return *fColorRange; }

RangeDouble& GfxDigitList::GetColorRange (  )  [inline]

Definition at line 54 of file EventDisplay/GfxDigitList.h.

References fColorRange.

00054 { return *fColorRange; }

int GfxDigitList::GetDigitColor ( const CandDigitHandle csh,
const PlexSEIdAltLItem itm 
) const

int GfxDigitList::GetDigitColor ( const CandDigitHandle csh  )  const

int GfxDigitList::GetDigitColor ( const CandDigitHandle csh,
const PlexSEIdAltLItem itm 
) const

Definition at line 370 of file EventDisplay/GfxDigitList.cxx.

References DisplayOptions::ChargeType(), ViewState::color_is_charge, ViewState::color_is_time, fColorRange, fEVD, fMint, CandDigitHandle::GetCharge(), EVD::GetDisplayOptions(), PlexSEIdAltLItem::GetPE(), Rainbow::GetRelativeColor(), PlexSEIdAltLItem::GetSigCorr(), PlexSEIdAltLItem::GetSigLin(), PlexSEIdAltLItem::GetTime(), Mint::GetTimeRange(), CalDigitType::kPE, CalDigitType::kSigCorr, CalDigitType::kSigLin, and Range< TYPE >::Min().

00372 {
00373     if (!fColorRange) return false;
00374 
00375     static Rainbow rainbow;
00376 
00377     if (this->DigitMasked(cdh,itm)) return 0;
00378 
00379     double val=0;
00380     switch (this->GetViewState()->GetColorSemantic()) {
00381     case ViewState::color_is_time:
00382        val = itm.GetTime()-fMint->GetTimeRange().Min();
00383         break;
00384     case ViewState::color_is_charge:
00385       val =cdh.GetCharge();
00386       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kPE)
00387         val=itm.GetPE();
00388       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigLin)
00389         val=itm.GetSigLin();
00390       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigCorr)
00391         val=itm.GetSigCorr();      
00392       break;
00393     default:
00394         return 0;
00395         break;
00396     }
00397 
00398     return rainbow.GetRelativeColor(fColorRange->Relative(val));
00399 }

int GfxDigitList::GetDigitColor ( const CandDigitHandle csh  )  const

Definition at line 341 of file EventDisplay/GfxDigitList.cxx.

References DisplayOptions::ChargeType(), ViewState::color_is_charge, ViewState::color_is_time, fColorRange, fEVD, fMint, PlexSEIdAltL::GetBestItem(), CandDigitHandle::GetCharge(), EVD::GetDisplayOptions(), PlexSEIdAltLItem::GetPE(), CandDigitHandle::GetPlexSEIdAltL(), Rainbow::GetRelativeColor(), PlexSEIdAltLItem::GetSigCorr(), PlexSEIdAltLItem::GetSigLin(), CandDigitHandle::GetTime(), Mint::GetTimeRange(), CalDigitType::kPE, CalDigitType::kSigCorr, CalDigitType::kSigLin, and Range< TYPE >::Min().

Referenced by GfxDigit::SetColor().

00342 {
00343     if (!fColorRange) return false;
00344     const PlexSEIdAltL &  alist = cdh.GetPlexSEIdAltL();
00345     const PlexSEIdAltLItem& itm = alist.GetBestItem();
00346     static Rainbow rainbow;
00347 
00348     if (this->DigitMasked(cdh)) return 0;
00349 
00350     double val=0;
00351     switch (this->GetViewState()->GetColorSemantic()) {
00352     case ViewState::color_is_time:
00353         val = cdh.GetTime()-fMint->GetTimeRange().Min();
00354         break;
00355     case ViewState::color_is_charge:
00356       val =cdh.GetCharge();
00357      
00358       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kPE) val=itm.GetPE();
00359       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigLin) val=itm.GetSigLin();
00360       if(fEVD->GetDisplayOptions()->ChargeType()==CalDigitType::kSigCorr) val=itm.GetSigCorr();
00361       break;
00362     default:
00363         return 0;
00364         break;
00365     }
00366 
00367     return rainbow.GetRelativeColor(fColorRange->Relative(val));
00368 }

EVD* GfxDigitList::GetEVD (  )  [inline]

Definition at line 68 of file EventDisplay/GfxDigitList.h.

References fEVD.

Referenced by Draw(), and GfxDigit::SetColor().

00068 {return fEVD;}

Mint& GfxDigitList::GetMint (  )  [inline]

Definition at line 61 of file Midad/MultiPage/GfxDigitList.h.

References fMint.

00061 { return *fMint; }

Mint& GfxDigitList::GetMint (  )  [inline]

Definition at line 64 of file EventDisplay/GfxDigitList.h.

References fMint.

Referenced by GfxDigit::GetRelativeValue().

00064 { return *fMint; }

void GfxDigitList::HideDigits ( bool  hide = true  ) 

void GfxDigitList::HideDigits ( bool  hide = true  ) 

Definition at line 400 of file EventDisplay/GfxDigitList.cxx.

References fEVD, fHideDigits, GfxBase::GetGraphicsView(), GraphicsView::kVZ, ReConfigure(), and EVD::UpdateCanvas().

00401 {
00402     fHideDigits = hide;
00403     this->ReConfigure();
00404     if(GetGraphicsView()==GraphicsView::kVZ)fEVD->UpdateCanvas();
00405 }

void GfxDigitList::Init ( PageDisplay pd,
MultiPage mp 
) [virtual]

Reimplemented from GfxBase.

Definition at line 78 of file Midad/MultiPage/GfxDigitList.cxx.

References ViewState::color_semantic, fColorRange, fMultiPage, fPageDisplay, MultiPage::GetColorRangeControl(), 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 = &mp;
00086 }

void GfxDigitList::Init ( PageDisplay pd,
EVD mp 
) [virtual]

Reimplemented from GfxBase.

Definition at line 74 of file EventDisplay/GfxDigitList.cxx.

References ViewState::color_semantic, fColorRange, fEVD, fPageDisplay, EVD::GetColorRangeControl(), 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 = &mp;
00082 }

void GfxDigitList::ReConfigure ( void   )  [private]

void GfxDigitList::ReConfigure ( void   )  [private]

Definition at line 149 of file EventDisplay/GfxDigitList.cxx.

References count, done(), fDigits, fHideDigits, and fMint.

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 }


Member Data Documentation

GfxDigitListCfg* GfxDigitList::fCfg [private]

Definition at line 72 of file Midad/MultiPage/GfxDigitList.h.

GfxDigitListCfg* GfxDigitList::fCfg [private]

Definition at line 76 of file EventDisplay/GfxDigitList.h.

Referenced by GetCfg(), and GfxDigitList().

SigC::Ptr<RangeDouble> GfxDigitList::fColorRange [private]

Definition at line 74 of file Midad/MultiPage/GfxDigitList.h.

SigC::Ptr<RangeDouble> GfxDigitList::fColorRange [private]

Definition at line 78 of file EventDisplay/GfxDigitList.h.

Referenced by DigitMasked(), GetColorRange(), GetDigitColor(), and Init().

TClonesArray* GfxDigitList::fDigitCA [private]

Definition at line 79 of file Midad/MultiPage/GfxDigitList.h.

TClonesArray* GfxDigitList::fDigitCA [private]

Definition at line 83 of file EventDisplay/GfxDigitList.h.

Referenced by ClearDigitList(), Configure(), GfxDigitList(), and ~GfxDigitList().

GfxDigitVector_t GfxDigitList::fDigits [private]

Definition at line 85 of file EventDisplay/GfxDigitList.h.

Referenced by ClearDigitList(), Configure(), Draw(), and ReConfigure().

EVD* GfxDigitList::fEVD [private]

Definition at line 80 of file EventDisplay/GfxDigitList.h.

Referenced by DigitMasked(), ExecuteEvent(), GetDigitColor(), GetEVD(), HideDigits(), and Init().

bool GfxDigitList::fHideDigits [private]

Definition at line 87 of file EventDisplay/GfxDigitList.h.

Referenced by Configure(), DigitsHidden(), HideDigits(), and ReConfigure().

Mint* GfxDigitList::fMint [private]

Definition at line 77 of file Midad/MultiPage/GfxDigitList.h.

Mint* GfxDigitList::fMint [private]

Definition at line 81 of file EventDisplay/GfxDigitList.h.

Referenced by Configure(), DigitMasked(), ExecuteEvent(), ExecuteEventDigit(), GetDigitColor(), GetMint(), and ReConfigure().

MultiPage* GfxDigitList::fMultiPage [private]

Definition at line 76 of file Midad/MultiPage/GfxDigitList.h.

Referenced by Init().

PageDisplay* GfxDigitList::fPageDisplay [private]

Definition at line 75 of file Midad/MultiPage/GfxDigitList.h.

PageDisplay* GfxDigitList::fPageDisplay [private]

Definition at line 79 of file EventDisplay/GfxDigitList.h.

Referenced by Configure(), ExecuteEvent(), ExecuteEventDigit(), and Init().


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:51:13 2014 for loon by  doxygen 1.4.7