TridModelList Class Reference

#include <TridModelList.h>

List of all members.

Public Member Functions

 TridModelList ()
 ~TridModelList ()
void Clear ()
void AddModel (TridModel *model)
void ClearAssociations ()
void AssociateModel (TridModel *model, UInt_t sketchNo)
TridModelItr GetIterator ()
TridModelItr GetIterator (Int_t key)
UInt_t GetSketchNumber (TridModel *model)
void GetSketchNumbers (TridModel *model, std::vector< UInt_t > &outVect)
TridModelGetModelFromSketch (UInt_t sketchNo)
UInt_t GetNumberOfModels ()

Private Types

typedef std::multimap
< TridModel *, UInt_t > 
tModelToSketches
typedef std::map< UInt_t,
TridModel * > 
tSketchToModel
typedef std::multimap< Int_t,
TridModel * > 
tKeyToModels

Private Attributes

tModelToSketches fModelToSketches
tSketchToModel fSketchToModel
tKeyToModels fKeyToModels

Friends

class TridModelItr

Detailed Description

Definition at line 13 of file TridModelList.h.


Member Typedef Documentation

typedef std::multimap< Int_t, TridModel* > TridModelList::tKeyToModels [private]

Definition at line 41 of file TridModelList.h.

typedef std::multimap< TridModel*, UInt_t > TridModelList::tModelToSketches [private]

Definition at line 39 of file TridModelList.h.

typedef std::map< UInt_t, TridModel* > TridModelList::tSketchToModel [private]

Definition at line 40 of file TridModelList.h.


Constructor & Destructor Documentation

TridModelList::TridModelList (  )  [inline]

Definition at line 18 of file TridModelList.h.

00018 {};

TridModelList::~TridModelList (  )  [inline]

Definition at line 19 of file TridModelList.h.

References Clear().

00019 { Clear(); }; 


Member Function Documentation

void TridModelList::AddModel ( TridModel model  ) 
void TridModelList::AssociateModel ( TridModel model,
UInt_t  sketchNo 
)

Definition at line 23 of file TridModelList.cxx.

References fModelToSketches, and fSketchToModel.

Referenced by TridPageSlice::CreateSketches(), TridCratePage::CreateSketches(), TridPageDetector::CreateSketches(), TridPmtPage::CreateSketches(), and TridUVPage::CreateSketches().

00024 {
00025   fSketchToModel[sketchNo] = model;
00026   fModelToSketches.insert(std::pair<TridModel*,UInt_t>(model,sketchNo));
00027 }

void TridModelList::Clear ( void   ) 
void TridModelList::ClearAssociations (  ) 
TridModelItr TridModelList::GetIterator ( Int_t  key  ) 

Definition at line 40 of file TridModelList.cxx.

References TridModelItr.

00041 {
00042   return TridModelItr(*this,key);
00043 }

TridModelItr TridModelList::GetIterator (  ) 
TridModel * TridModelList::GetModelFromSketch ( UInt_t  sketchNo  ) 

Definition at line 72 of file TridModelList.cxx.

References fSketchToModel, and it.

Referenced by TridPageDetector::ModifySketches(), TridPage::ModifySketches(), TridUVPage::ModifySketches(), TridPageSlice::ModifySketches(), TridPage::MouseClick(), and TridPage::MouseOver().

00073 {
00074   tSketchToModel::iterator it = fSketchToModel.find(sketchNo);
00075   if(it == fSketchToModel.end()) return NULL;
00076   return it->second;
00077 }

UInt_t TridModelList::GetNumberOfModels (  ) 

Definition at line 80 of file TridModelList.cxx.

References fKeyToModels.

00081 {
00082   return fKeyToModels.size();
00083 }

UInt_t TridModelList::GetSketchNumber ( TridModel model  ) 

Definition at line 45 of file TridModelList.cxx.

References fModelToSketches, and it.

Referenced by TridPmtPage::ModifySketches().

00046 {
00047   tModelToSketches::iterator it;
00048   it = fModelToSketches.find(model);
00049   if(it == fModelToSketches.end()) return 0;
00050   return it->second;
00051 }

void TridModelList::GetSketchNumbers ( TridModel model,
std::vector< UInt_t > &  outVect 
)

Definition at line 54 of file TridModelList.cxx.

References fModelToSketches, and it.

00055 {
00056   outVect.clear(); // Clear output
00057 
00058   tModelToSketches::iterator it;
00059 
00060   // Define a struct to hold the begin/end limits
00061   std::pair<tModelToSketches::iterator,tModelToSketches::iterator> p12;
00062 
00063   // Find the begin/end limits matching this model
00064   p12 = fModelToSketches.equal_range(model);
00065 
00066   for(it = p12.first; it!=p12.second; it++) {
00067     outVect.push_back(it->second);
00068   }
00069 }


Friends And Related Function Documentation

friend class TridModelItr [friend]

Definition at line 16 of file TridModelList.h.

Referenced by GetIterator().


Member Data Documentation

Definition at line 45 of file TridModelList.h.

Referenced by AddModel(), Clear(), GetNumberOfModels(), and TridModelItr::TridModelItr().

Definition at line 44 of file TridModelList.h.

Referenced by AssociateModel(), Clear(), ClearAssociations(), and GetModelFromSketch().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1