Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Mint Class Reference

Main interface to libMidad. More...

#include <Mint.h>

List of all members.

Public Types

typedef void(Mint::* MintMoveMeth_t )()
typedef std::vector< const
CandDigitHandle * > 
DigitVector_t
typedef std::vector< const
CandStripHandle * > 
StripVector_t
typedef std::vector< const
CandTrackHandle * > 
TrackVector_t
typedef std::vector< const
CandShowerHandle * > 
ShowerVector_t

Public Member Functions

 Mint (JobC &jc)
virtual ~Mint ()
JobCGetJobC () const
 Convenience routine to get back JC.
MCintGetMCint () const
PageDisplaySpawnDisplay (int width=1000, int height=500, const PageDisplayConfig *cfg=0)
 Create a new display of given size.
PageDisplayGetDisplay (int which=0)
 Get A previously existing display.
void Next ()
void NextPass ()
void Prev ()
void GoTo (int run, int snarl)
void SetFreeRunning (bool tf=true)
void SetPause (Long_t ms=0)
void DumpMom ()
UgliGeomHandle GetUgliGeomHandle ()
RegistryGetCandidateLookup ()
CandDigitListHandleGetDigits () const
CandStripListHandleGetStrips () const
CandTrackListHandleGetTracks () const
CandShowerListHandleGetShowers () const
Detector::Detector_t GetDetector () const
 Return the type of detector this data came from.
Detector::Detector_t GetDetectorType () const
 Obsolete interface.
JintGetJint ()
RangeDoubleGetTimeRange ()
 Get the range control for the time range and extreama.
RangeDoubleGetTimeExtrema ()
RangeDoubleGetChargeRange ()
 Get the range control for the charge range and extreama.
RangeDoubleGetChargeExtrema ()
void SetSelectedDigits (DigitVector_t dv)
DigitVector_t GetSelectedDigits (void) const
void SetSelectedStrips (StripVector_t dv)
StripVector_t GetSelectedStrips (void) const
const CandDigitHandleGetPickedDigit () const
void SetPickedDigit (const CandDigitHandle &cdh)
void SetPickedDigit (const CandDigitHandle &cdh, const PlexSEIdAltLItem &itm)
const CandStripHandleGetPickedStrip () const
void SetPickedStrip (const CandStripHandle &cdh)
void NewMom ()

Public Attributes

SigC::Signal0< void > digits_selected
SigC::Signal0< void > strips_selected
SigC::Signal0< void > digit_picked
SigC::Signal0< void > strip_picked

Private Member Functions

 Mint (const Mint &rhs)
Mintoperator= (const Mint &rhs)
void UpdateStripRanges ()
void UpdateDigitRanges ()
void DoMovement (MintMoveMeth_t move)

Private Attributes

Jint fJint
SigC::Ptr< RangeDoublefTimeRange
SigC::Ptr< RangeDoublefTimeExtrema
SigC::Ptr< RangeDoublefChargeRange
SigC::Ptr< RangeDoublefChargeExtrema
std::vector< PageDisplay * > fDisplays
const CandDigitHandlefPickedDigit
const CandStripHandlefPickedStrip
DigitVector_t fSelectedDigits
StripVector_t fSelectedStrips
MCintfMCint
bool fFreeRunning
Long_t fPause
TTimer * fTimer
Registry fCandidateLookup


Detailed Description

Main interface to libMidad.

Id
Mint.h,v 1.16 2007/11/11 07:13:47 rhatcher Exp

Midad

Contact: bv@bnl.gov

Created on: Fri Jan 18 14:58:02 2002

Definition at line 51 of file Mint.h.


Member Typedef Documentation

typedef std::vector<const CandDigitHandle*> Mint::DigitVector_t
 

Definition at line 113 of file Mint.h.

Referenced by GetSelectedDigits().

typedef void(Mint::* Mint::MintMoveMeth_t)()
 

Definition at line 70 of file Mint.h.

typedef std::vector<const CandShowerHandle*> Mint::ShowerVector_t
 

Definition at line 116 of file Mint.h.

typedef std::vector<const CandStripHandle*> Mint::StripVector_t
 

Definition at line 114 of file Mint.h.

Referenced by GetSelectedStrips().

typedef std::vector<const CandTrackHandle*> Mint::TrackVector_t
 

Definition at line 115 of file Mint.h.


Constructor & Destructor Documentation

Mint::Mint JobC jc  ) 
 

Definition at line 42 of file Mint.cxx.

References gMint, LoadMinosPDG(), and NewMom().

00043     : fJint(jc)
00044     , fMCint(0)
00045     , fFreeRunning(false)
00046     , fPause(0)
00047     , fTimer(0)
00048 {
00049     fTimeRange = manage(new Range<double>());
00050     fTimeExtrema = manage(new Range<double>());
00051     fChargeRange = manage(new Range<double>());
00052     fChargeExtrema = manage(new Range<double>());
00053     gMint = this;
00054     fMCint = new MCint(*this);
00055     fJint.mom_modified.connect(slot_class(*this,&Mint::NewMom));
00056 
00057     fCandidateLookup.UnLockValues();
00058     fCandidateLookup.Set("CandDigitList","");
00059     fCandidateLookup.Set("CandStripList","");
00060     fCandidateLookup.Set("CandTrackList","");
00061     fCandidateLookup.Set("CandShowerList","");
00062 
00063     // get the TDatabasePDG initialized and populated
00064     LoadMinosPDG();
00065 }

Mint::~Mint  )  [virtual]
 

Definition at line 67 of file Mint.cxx.

00068 {
00069 }

Mint::Mint const Mint rhs  )  [private]
 


Member Function Documentation

void Mint::DoMovement MintMoveMeth_t  move  )  [private]
 

Definition at line 134 of file Mint.cxx.

References fDisplays, fPause, and PageDisplay::ProcessEvents().

Referenced by Next(), NextPass(), and Prev().

00135 {
00136     if (fFreeRunning) {
00137         for (unsigned int ind = 0; ind < fDisplays.size(); ++ind) 
00138             fDisplays[ind]->ProcessEvents();
00139 
00140         if (fFreeRunning) {     // still?
00141             if (fPause <= 0)  { (this->*move)(); }
00142             else { 
00143                 MyTimer* mt = new MyTimer(this,move); // launch timer
00144                 mt->Start(fPause, kTRUE);
00145             }
00146         }
00147     }
00148     
00149 }

void Mint::DumpMom  ) 
 

Definition at line 197 of file Mint.cxx.

References fJint, CandRecord::GetCandHandleList(), MomNavigator::GetFragment(), and Jint::GetMom().

Referenced by NewMom().

00198 {
00199     const MomNavigator* mom = fJint.GetMom();
00200     if (!mom) {
00201         cerr << "Mint::DumpMom: no MOM!\n";
00202         return;
00203     }
00204 
00205     CandRecord* crec = dynamic_cast<CandRecord*>
00206         (mom->GetFragment("CandRecord", "PrimaryCandidateRecord"));
00207     if (!crec) {
00208         cerr << "Mint::DumpMom: no CandRecord\n";
00209         return;
00210     }
00211 
00212     const TObjArray oa = crec->GetCandHandleList();
00213     int last = oa.GetLast();
00214     cerr << "Contents of PrimaryCandidateRecord:\n";
00215     for (int i = 0; i <= last; ++i) {
00216         TObject* o = oa.At(i);
00217         if (!o) continue;
00218         CandHandle* ch = dynamic_cast<CandHandle*>(o);
00219         if (!ch) {
00220             cerr << "\t" << o->ClassName() << " not a CandHandle\n";
00221             continue;
00222         }
00224 //        if (!ch->GetCandBase()) {
00225 //            cerr << "\t" << 0->ClassName() << " doesn't have a CandBase!!!\n";
00226 //            continue;
00227 //        }
00228         cerr << "\t" << o->ClassName() << "::" << o->GetName()<< endl;
00229     }
00230     
00231 }

Registry& Mint::GetCandidateLookup  )  [inline]
 

Definition at line 91 of file Mint.h.

Referenced by apply_reg_gui(), and PageDisplay::CandidateNames().

00091 { return fCandidateLookup; }

RangeDouble& Mint::GetChargeExtrema  )  [inline]
 

Definition at line 111 of file Mint.h.

References RangeDouble.

00111 { return *fChargeExtrema; }

RangeDouble& Mint::GetChargeRange  )  [inline]
 

Get the range control for the charge range and extreama.

Definition at line 110 of file Mint.h.

References RangeDouble.

Referenced by MultiPage::ColorSemanticHandler(), GfxStrip::GetRelativeValue(), GfxDigit::GetRelativeValue(), and PmtPixels::Refresh().

00110 { return *fChargeRange; }

Detector::Detector_t Mint::GetDetector  )  const
 

Return the type of detector this data came from.

Definition at line 270 of file Mint.cxx.

References DataUtil::GetDetector().

Referenced by PmtPixels::BuildImp(), EVD::DrawVS(), MultiPage::FullZoom(), EVD::FullZoom(), EVD::SetChargeRange(), EVD::Update(), EVD::UpdateChargeHists(), UpdateDigitRanges(), PageDisplay::UpdateDisplay(), UpdateStripRanges(), EVD::UpdateSummary(), and EVD::UpdateView().

00271 {
00272     Detector::Detector_t dt = 
00273         DataUtil::GetDetector(this->GetJobC().Mom);
00274     return dt;
00275 }

Detector::Detector_t Mint::GetDetectorType  )  const [inline]
 

Obsolete interface.

Definition at line 101 of file Mint.h.

References DataUtil::GetDetector().

00102     { return GetDetector(); }

CandDigitListHandle * Mint::GetDigits  )  const
 

Definition at line 240 of file Mint.cxx.

References fCandidateLookup, Registry::Get(), GetJobC(), and JobC::Mom.

Referenced by GfxDigitList::Configure(), UserHist::Refresh(), TimeHist::Refresh(), AltTimeHist::Refresh(), EVD::SetChargeRange(), HistPage::Update(), EVD::UpdateChargeHists(), and UpdateDigitRanges().

00241 {
00242     const char* name = 0;
00243     fCandidateLookup.Get("CandDigitList",name);
00244     return DataUtil::GetCandidate<CandDigitListHandle>
00245         (&(this->GetJobC().Mom),"CandDigitListHandle",name);
00246 }

PageDisplay * Mint::GetDisplay int  which = 0  ) 
 

Get A previously existing display.

Definition at line 105 of file Mint.cxx.

References fDisplays.

Referenced by UserDisplayModule::BuildDisplay(), ParticleDisplay::BuildDisplay(), and NueDisplayModule::BuildDisplay().

00106 {
00107     int ndisps = fDisplays.size();
00108 
00109     if (which < 0 || which >= ndisps) {
00110         cerr << "Can't get display #" << which 
00111              << ", (have " << ndisps << ")\n";
00112         return 0;
00113     }
00114     return fDisplays[which];
00115 }

Jint& Mint::GetJint  )  [inline]
 

Definition at line 104 of file Mint.h.

Referenced by GfxMCVecList::Configure(), EVD::GetNumEvents(), EVD::GetNumSlices(), TridPageDisplay::JumpEntryHandler(), EVD::NextEvent(), EVD::NextSlice(), EVD::PrevEvent(), EVD::PrevSlice(), EVD::ReadCandEvent(), EVD::ReadCandSlice(), RunSnarlEntry::RSEntryHandler(), RunSnarlEntry::RunningEntryHandler(), TridPageDisplay::RunSnarlEntryHandler(), TestMCTree::SpawnMCTree(), TridSetup(), UserCanvas::Update(), MCVectors::Update(), MCTree::Update(), MCText::Update(), CheezyPage::Update(), and EVD::UpdateSummary().

00104 { return fJint; }

JobC & Mint::GetJobC  )  const
 

Convenience routine to get back JC.

Definition at line 71 of file Mint.cxx.

References fJint, and Jint::GetJobC().

Referenced by UserDisplayModule::Ana(), ParticleDisplay::Ana(), NueDisplayModule::Ana(), UserDisplayModule::BuildDisplay(), ParticleDisplay::BuildDisplay(), NueDisplayModule::BuildDisplay(), GfxTrackList::Configure(), TridUVPage::CreateModels(), TridPmtPage::CreateModels(), TridPageSlice::CreateModels(), TridPageDetector::CreateModels(), TridCratePage::CreateModels(), GfxStripList::ExecuteEvent(), GfxDigitList::ExecuteEvent(), NueDisplayModule::GetBasicInfo(), MCint::GetData(), GetDigits(), GetShowers(), GetStrips(), GetTracks(), NueDisplayModule::IntRecoCalc(), PageDisplay::OpenFile(), EVD::PrintCanvas(), UserHist::Refresh(), TridPage::Update(), RunSnarlEntry::Update(), EVD::Update(), EVD::UpdateChargeHists(), ParticleDisplay::UpdateDisplay(), NueDisplayModule::UpdateDisplay(), EVD::UpdateSummary(), EVD::UpdateTime(), and EventInfoPage::WriteInfo().

00072 {
00073     return fJint.GetJobC();
00074 }

MCint & Mint::GetMCint  )  const
 

Definition at line 75 of file Mint.cxx.

Referenced by MCDisp::Update().

00076 {
00077     return *fMCint;
00078 }

const CandDigitHandle * Mint::GetPickedDigit  )  const
 

Definition at line 404 of file Mint.cxx.

Referenced by PmtPixels::Refresh().

00405 {
00406     return fPickedDigit;
00407 }

const CandStripHandle * Mint::GetPickedStrip  )  const
 

Definition at line 424 of file Mint.cxx.

00425 {
00426     return fPickedStrip;
00427 }

Mint::DigitVector_t Mint::GetSelectedDigits void   )  const
 

Definition at line 389 of file Mint.cxx.

References DigitVector_t.

00390 {
00391     return fSelectedDigits;
00392 }

Mint::StripVector_t Mint::GetSelectedStrips void   )  const
 

Definition at line 415 of file Mint.cxx.

References StripVector_t.

00416 {
00417     return fSelectedStrips;
00418 }

CandShowerListHandle * Mint::GetShowers  )  const
 

Definition at line 261 of file Mint.cxx.

References fCandidateLookup, Registry::Get(), GetJobC(), and JobC::Mom.

Referenced by GfxShowerList::Configure(), RecoText::Update(), EVD::UpdateChargeHists(), and EVD::UpdateSummary().

00262 {
00263     const char* name = 0;
00264     fCandidateLookup.Get("CandShowerList",name);
00265     return DataUtil::GetCandidate<CandShowerListHandle>
00266         (&(this->GetJobC().Mom),"CandShowerListHandle",name);
00267 }

CandStripListHandle * Mint::GetStrips  )  const
 

Definition at line 247 of file Mint.cxx.

References fCandidateLookup, Registry::Get(), GetJobC(), and JobC::Mom.

Referenced by GfxStripList::Configure(), and UpdateStripRanges().

00248 {
00249     const char* name = 0;
00250     fCandidateLookup.Get("CandStripList",name);
00251     return DataUtil::GetCandidate<CandStripListHandle>
00252         (&(this->GetJobC().Mom),"CandStripListHandle",name);
00253 }

RangeDouble& Mint::GetTimeExtrema  )  [inline]
 

Definition at line 108 of file Mint.h.

References RangeDouble.

Referenced by PageDisplay::SetupSliders().

00108 { return *fTimeExtrema; }

RangeDouble& Mint::GetTimeRange  )  [inline]
 

Get the range control for the time range and extreama.

Definition at line 107 of file Mint.h.

References RangeDouble.

Referenced by MultiPage::ColorSemanticHandler(), EVD::ColorSemanticHandler(), GfxDigitList::DigitMasked(), GfxDigitList::GetDigitColor(), GfxStrip::GetRelativeValue(), GfxDigit::GetRelativeValue(), TimeHist::Refresh(), AltTimeHist::Refresh(), TimeHist::SetMint(), AltTimeHist::SetMint(), PageDisplay::SetupSliders(), EVD::Update(), and EVD::ZoomTimetoSlice().

00107 { return *fTimeRange; }

CandTrackListHandle * Mint::GetTracks  )  const
 

Definition at line 254 of file Mint.cxx.

References fCandidateLookup, Registry::Get(), GetJobC(), and JobC::Mom.

Referenced by GfxTrackList::Configure(), UserHist::Refresh(), RecoText::Update(), EVD::UpdateChargeHists(), UserDisplayModule::UpdateDisplay(), and EVD::UpdateSummary().

00255 {
00256     const char* name = 0;
00257     fCandidateLookup.Get("CandTrackList",name);
00258     return DataUtil::GetCandidate<CandTrackListHandle>
00259         (&(this->GetJobC().Mom),"CandTrackListHandle",name);
00260 }

UgliGeomHandle Mint::GetUgliGeomHandle  ) 
 

Return UgliGeomHandle for current record. WARNING: Check IsValid(). You have been warned.

Definition at line 233 of file Mint.cxx.

References DataUtil::GetUgliGeomHandle().

Referenced by UserDisplayModule::AddTrack(), UserDisplayModule::BuildDisplay(), NueDisplayModule::BuildDisplay(), PageDisplay::DrawGeometry(), EVD::DrawVS(), MultiPage::FullZoom(), EVD::FullZoom(), NueDisplayModule::GetEvent(), HistPage::Setup(), MCDisp::Update(), HistPage::Update(), and EVD::UpdateView().

00234 {
00235     return DataUtil::GetUgliGeomHandle(&(this->GetJobC().Mom));
00236 }

void Mint::GoTo int  run,
int  snarl
 

Definition at line 166 of file Mint.cxx.

References fJint, Jint::GoTo(), and run().

Referenced by ParticleDisplay::NextSelEvt(), NueDisplayModule::NextSelEvt(), ParticleDisplay::PrevSelEvt(), and NueDisplayModule::PrevSelEvt().

00167 {
00168     fJint.GoTo(run,snarl);
00169 }

void Mint::NewMom  ) 
 

Definition at line 187 of file Mint.cxx.

References DumpMom(), fMCint, fPickedDigit, MCint::Update(), and UpdateDigitRanges().

Referenced by Mint().

00188 {
00189     this->DumpMom();
00190 //    fSelectedDigits.clear();
00191     fPickedDigit = 0;
00192 //    this->UpdateStripRanges();
00193     this->UpdateDigitRanges();
00194     if (fMCint) fMCint->Update();
00195 }

void Mint::Next  ) 
 

Definition at line 151 of file Mint.cxx.

References DoMovement(), fJint, Next(), and Jint::Next().

Referenced by DoNext(), Next(), ParticleDisplay::NextEvent(), NueDisplayModule::NextEvent(), EVD::NextEvent(), EVD::NextSlice(), AutoEventTimer::Notify(), ParticleDisplay::UpdateDisplay(), and NueDisplayModule::UpdateDisplay().

00152 {
00153     fJint.Next();
00154     this->DoMovement(&Mint::Next);
00155 }

void Mint::NextPass  ) 
 

Definition at line 156 of file Mint.cxx.

References DoMovement(), fJint, NextPass(), and Jint::NextPass().

Referenced by NextPass().

00157 {
00158     fJint.NextPass();
00159     this->DoMovement(&Mint::NextPass);
00160 }

Mint& Mint::operator= const Mint rhs  )  [private]
 

void Mint::Prev  ) 
 

Definition at line 161 of file Mint.cxx.

References DoMovement(), fJint, Prev(), and Jint::Prev().

Referenced by DoPrev(), Prev(), ParticleDisplay::PrevEvent(), NueDisplayModule::PrevEvent(), EVD::PrevEvent(), EVD::PrevSlice(), ParticleDisplay::UpdateDisplay(), and NueDisplayModule::UpdateDisplay().

00162 {
00163     fJint.Prev();
00164     this->DoMovement(&Mint::Prev);
00165 }

void Mint::SetFreeRunning bool  tf = true  ) 
 

Definition at line 171 of file Mint.cxx.

References fFreeRunning.

Referenced by handle_free_run().

00172 {
00173     fFreeRunning = tf;
00174     if (fFreeRunning) 
00175         cerr << "Will free run - click Next/Prev button\n";
00176     else
00177         cerr << "Free run stopped after next event\n";
00178 }

void Mint::SetPause Long_t  ms = 0  ) 
 

Definition at line 180 of file Mint.cxx.

References fPause.

Referenced by handle_pause_entry().

00181 {
00182     fPause = ms;
00183     cerr << "SetPause(" << ms << ")\n";
00184 }

void Mint::SetPickedDigit const CandDigitHandle cdh,
const PlexSEIdAltLItem itm
 

Definition at line 398 of file Mint.cxx.

References digit_picked, and fPickedDigit.

00400 {
00401     fPickedDigit = &cdh;
00402     digit_picked.emit();
00403 }

void Mint::SetPickedDigit const CandDigitHandle cdh  ) 
 

Definition at line 393 of file Mint.cxx.

References digit_picked, and fPickedDigit.

Referenced by GfxDigitList::ExecuteEvent(), and GfxDigitList::ExecuteEventDigit().

00394 {
00395     fPickedDigit = &cdh;
00396     digit_picked.emit();
00397 }

void Mint::SetPickedStrip const CandStripHandle cdh  ) 
 

Definition at line 419 of file Mint.cxx.

References fPickedStrip, and strip_picked.

Referenced by GfxStripList::ExecuteEvent(), and GfxStripList::ExecuteEventStrip().

00420 {
00421     fPickedStrip = &cdh;
00422     strip_picked.emit();
00423 }

void Mint::SetSelectedDigits DigitVector_t  dv  ) 
 

Set a set of selected Digits. "digits_selected" signal is triggered when called. Use associated Get method to retrieve.

Definition at line 384 of file Mint.cxx.

References digits_selected, and fSelectedDigits.

Referenced by GfxStripList::ExecuteEvent(), and GfxStripList::ExecuteEventStrip().

00385 {
00386     fSelectedDigits = dv;
00387     digits_selected.emit();
00388 }

void Mint::SetSelectedStrips StripVector_t  dv  ) 
 

Definition at line 410 of file Mint.cxx.

References fSelectedStrips, and strips_selected.

00411 {
00412     fSelectedStrips = dv;
00413     strips_selected.emit();
00414 }

PageDisplay * Mint::SpawnDisplay int  width = 1000,
int  height = 500,
const PageDisplayConfig cfg = 0
 

Create a new display of given size.

Definition at line 79 of file Mint.cxx.

References GuiCompositeFrameBase::Add(), PageDisplay::close_window, GuiMainWindow::ConnectClose(), fDisplays, fJint, PageDisplay::Init(), Jint::mom_modified, and GuiMainWindow::ShowAll().

Referenced by UserDisplayModule::BuildDisplay(), ParticleDisplay::BuildDisplay(), and NueDisplayModule::BuildDisplay().

00081 {
00082 
00083     GuiMainWindow* gmw = new GuiMainWindow(width-1,height-1);
00084     gmw->SetWindowName("Midad");
00085 
00086     PageDisplay* pd = new PageDisplay(*gmw,this);
00087     PageDisplayConfig default_pdc;
00088     if (!cfg) cfg = &default_pdc;
00089     pd->Init(*cfg);
00090     pd->close_window.connect(slot(*gmw,&GuiMainWindow::SendCloseMessage));
00091     fJint.mom_modified.connect(slot(*pd,&PageDisplay::ClearDisplay));
00092     fJint.mom_modified.connect(slot(*pd,&PageDisplay::UpdateDisplay));
00093                                     
00094     gmw->Add(*pd);
00095 
00096     gmw->ShowAll();
00097 //    gmw->SetMinSize();
00098     gmw->Resize(width,height);
00099     gmw->ConnectClose(true);     // delete
00100 
00101     fDisplays.push_back(pd);
00102 
00103     return pd;
00104 }

void Mint::UpdateDigitRanges  )  [private]
 

Definition at line 321 of file Mint.cxx.

References det, fChargeExtrema, fChargeRange, fTimeExtrema, fTimeRange, PlexSEIdAltL::GetCurrentItem(), GetDetector(), GetDigits(), PlexSEIdAltLItem::GetPE(), PlexSEIdAltL::GetPlaneView(), CandDigitHandle::GetPlexSEIdAltL(), PlexSEIdAltLItem::GetTime(), PlexSEIdAltL::IsValid(), PlexSEIdAltL::Next(), and PlexSEIdAltL::SetFirst().

Referenced by NewMom().

00322 {
00323     Detector::Detector_t det = this->GetDetector();
00324     if (det == Detector::kUnknown) return;
00325 
00326     const CandDigitListHandle* cslh = this->GetDigits();
00327     if (!cslh) return;
00328 
00329     vector<const CandDigitHandle*> dv = 
00330         DataUtil::CDL2STLvector<CandDigitHandle>(*cslh);
00331     int siz = dv.size();
00332     if (! siz) return;
00333 
00334     double tmin=0, tmax=0, qmin=0,qmax=0;
00335     bool first = true;
00336 
00337     for (int ind = 0; ind < siz; ++ind) {
00338         const CandDigitHandle* csh = dv[ind];
00339         const PlexSEIdAltL& altl = csh->GetPlexSEIdAltL();
00340         PlaneView::PlaneView_t pv = altl.GetPlaneView();
00341         if (det != Detector::kCalib && 
00342            pv != PlaneView::kU && pv != PlaneView::kV) continue;
00343 
00344         altl.SetFirst();
00345         while (altl.IsValid()) {
00346           double t = altl.GetCurrentItem().GetTime();
00347           double q = altl.GetCurrentItem().GetPE();
00348           if (first) {
00349               tmin = tmax = t;
00350               qmin = qmax = q;
00351               first=false;
00352               continue;
00353           }
00354           if (t < tmin) tmin = t;
00355           if (t > tmax) tmax = t;
00356           if (q < qmin) qmin = q;
00357           if (q > qmax) qmax = q;
00358           altl.Next();
00359         }
00360     }
00361     // give some buffer at either end...
00362     tmax +=  0.02*(tmax - tmin);
00363     tmin += -0.02*(tmax - tmin);
00364     qmax +=  0.02*(qmax - qmin);
00365     qmin += -0.02*(qmax - qmin);
00366 
00367     // cerr << endl; 
00368     // cerr << " tmin, tmax = " << tmin << "  " << tmax << endl;
00369     // cerr << " qmin, qmax = " << qmin << "  " << qmax << endl;
00370     if (!first) {
00371         // work around div by zero in TGDoubleSlider
00372         double eps = 1.0e-8;
00373         if (tmin == tmax) { tmin -= eps; tmax += eps; }
00374         if (qmin == qmax) { qmin -= eps; qmax += eps; }
00375 
00376         fTimeRange->Set(tmin,tmax);
00377         fTimeExtrema->Set(tmin,tmax);
00378         fChargeRange->Set(qmin,qmax);
00379         fChargeExtrema->Set(qmin,qmax);
00380     }
00381 }

void Mint::UpdateStripRanges  )  [private]
 

Definition at line 277 of file Mint.cxx.

References det, fChargeExtrema, fChargeRange, fTimeExtrema, fTimeRange, CandStripHandle::GetCharge(), GetDetector(), GetStrips(), and CandStripHandle::GetTime().

00278 {
00279     Detector::Detector_t det = this->GetDetector();
00280     if (det == Detector::kUnknown) return;
00281 
00282     const CandStripListHandle* cslh = this->GetStrips();
00283     if (!cslh) return;
00284 
00285     vector<const CandStripHandle*> dv = 
00286         DataUtil::CDL2STLvector<CandStripHandle>(*cslh);
00287     int siz = dv.size();
00288     if (! siz) return;
00289 
00290     double tmin=0, tmax=0, qmin=0,qmax=0;
00291     bool first = true;
00292     for (int ind = 0; ind < siz; ++ind) {
00293         const CandStripHandle* csh = dv[ind];
00294         double t = csh->GetTime();
00295         double q = csh->GetCharge();
00296         if (first) {
00297             tmin = tmax = t;
00298             qmin = qmax = q;
00299             first=false;
00300             continue;
00301         }
00302         if (t < tmin) tmin = t;
00303         if (t > tmax) tmax = t;
00304         if (q < qmin) qmin = q;
00305         if (q > qmax) qmax = q;
00306     }
00307 
00308     if (!first) {
00309         // work around div by zero in TGDoubleSlider
00310         double eps = 1.0e-10;
00311         if (tmin == tmax) { tmin -= eps; tmax += eps; }
00312         if (qmin == qmax) { qmin -= eps; qmax += eps; }
00313 
00314         fTimeRange->Set(tmin,tmax);
00315         fTimeExtrema->Set(tmin,tmax);
00316         fChargeRange->Set(qmin,qmax);
00317         fChargeExtrema->Set(qmin,qmax);
00318     }
00319 }


Member Data Documentation

SigC::Signal0<void> Mint::digit_picked
 

Definition at line 132 of file Mint.h.

Referenced by SetPickedDigit().

SigC::Signal0<void> Mint::digits_selected
 

Definition at line 122 of file Mint.h.

Referenced by PmtPixels::SetMint(), and SetSelectedDigits().

Registry Mint::fCandidateLookup [private]
 

Definition at line 168 of file Mint.h.

Referenced by GetDigits(), GetShowers(), GetStrips(), and GetTracks().

SigC::Ptr<RangeDouble> Mint::fChargeExtrema [private]
 

Definition at line 155 of file Mint.h.

Referenced by UpdateDigitRanges(), and UpdateStripRanges().

SigC::Ptr<RangeDouble> Mint::fChargeRange [private]
 

Definition at line 155 of file Mint.h.

Referenced by UpdateDigitRanges(), and UpdateStripRanges().

std::vector<PageDisplay*> Mint::fDisplays [private]
 

Definition at line 156 of file Mint.h.

Referenced by DoMovement(), GetDisplay(), and SpawnDisplay().

bool Mint::fFreeRunning [private]
 

Definition at line 165 of file Mint.h.

Referenced by SetFreeRunning().

Jint Mint::fJint [private]
 

Definition at line 153 of file Mint.h.

Referenced by DumpMom(), GetJobC(), GoTo(), Next(), NextPass(), Prev(), and SpawnDisplay().

MCint* Mint::fMCint [private]
 

Definition at line 163 of file Mint.h.

Referenced by NewMom().

Long_t Mint::fPause [private]
 

Definition at line 166 of file Mint.h.

Referenced by DoMovement(), and SetPause().

const CandDigitHandle* Mint::fPickedDigit [private]
 

Definition at line 158 of file Mint.h.

Referenced by NewMom(), and SetPickedDigit().

const CandStripHandle* Mint::fPickedStrip [private]
 

Definition at line 159 of file Mint.h.

Referenced by SetPickedStrip().

DigitVector_t Mint::fSelectedDigits [private]
 

Definition at line 160 of file Mint.h.

Referenced by SetSelectedDigits().

StripVector_t Mint::fSelectedStrips [private]
 

Definition at line 161 of file Mint.h.

Referenced by SetSelectedStrips().

SigC::Ptr<RangeDouble> Mint::fTimeExtrema [private]
 

Definition at line 154 of file Mint.h.

Referenced by UpdateDigitRanges(), and UpdateStripRanges().

TTimer* Mint::fTimer [private]
 

Definition at line 167 of file Mint.h.

SigC::Ptr<RangeDouble> Mint::fTimeRange [private]
 

Definition at line 154 of file Mint.h.

Referenced by UpdateDigitRanges(), and UpdateStripRanges().

SigC::Signal0<void> Mint::strip_picked
 

Definition at line 136 of file Mint.h.

Referenced by SetPickedStrip().

SigC::Signal0<void> Mint::strips_selected
 

Definition at line 126 of file Mint.h.

Referenced by SetSelectedStrips().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:36 2010 for loon by  doxygen 1.3.9.1