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

CDMapMaker Class Reference

#include <CDMapMaker.h>

List of all members.

Public Member Functions

 CDMapMaker ()
 CDMapMaker (CandDigitListHandle *)
 CDMapMaker (CandStripListHandle *)
std::map< int, CandDigitHandleGetDigitMap ()
std::map< int, CandStripHandleGetStripMap ()
int SetDigitList (CandDigitListHandle *)
int SetStripList (CandStripListHandle *)

Private Attributes

CandDigitListHandlefcdlh
CandStripListHandlefcslh


Constructor & Destructor Documentation

CDMapMaker::CDMapMaker  ) 
 

Definition at line 22 of file CDMapMaker.cxx.

References fcdlh, and fcslh.

00023 {   
00024   //default constructor
00025   fcdlh=0;  
00026   fcslh=0;
00027 }

CDMapMaker::CDMapMaker CandDigitListHandle  ) 
 

Definition at line 31 of file CDMapMaker.cxx.

References MSG, and SetDigitList().

00032 {  
00033   if(!this->SetDigitList(cdlh)){
00034     MSG("CDMapMaker",Msg::kFatal)
00035       << "No Digit List" <<endl;
00036   }
00037 }

CDMapMaker::CDMapMaker CandStripListHandle  ) 
 

Definition at line 41 of file CDMapMaker.cxx.

References MSG, and SetStripList().

00042 {  
00043   if(!this->SetStripList(cslh)){
00044     MSG("CDMapMaker",Msg::kFatal)
00045       << "No Strip List" <<endl;
00046   }
00047 }


Member Function Documentation

map< int, CandDigitHandle > CDMapMaker::GetDigitMap  ) 
 

Definition at line 51 of file CDMapMaker.cxx.

References digit(), fcdlh, PlexSEIdAltL::GetBestSEId(), CandDigitHandle::GetChannelId(), CandHandle::GetDaughterIterator(), RawChannelId::GetElecType(), CandDigitHandle::GetPlexSEIdAltL(), and MSG.

00052 {  
00053   map<int,CandDigitHandle> digitmap;
00054 
00055   //check that list handle is real
00056   if (fcdlh==0){
00057     MSG("CDMapMaker",Msg::kFatal)
00058       << "No digit list set" <<endl;
00059     return digitmap;
00060   }
00061 
00062   TIter cdhItr(fcdlh->GetDaughterIterator());
00063   while (CandDigitHandle *digit=
00064          dynamic_cast<CandDigitHandle*>(cdhItr())){
00065     
00066     int theKey = digit->GetPlexSEIdAltL().GetBestSEId().
00067       BuildPlnStripEndKey();
00068     
00069     if(digit->GetChannelId().GetElecType()==ElecType::kQIE){
00070       MSG("CDMapMaker",Msg::kVerbose) << "Got a QIE digit" << std::endl;
00071       if(digitmap.find(theKey)==digitmap.end()) {
00072         digitmap[theKey] = *digit;
00073       }
00074     }
00075     else {
00076       digitmap[theKey] = *digit;
00077     }
00078   }
00079 
00080   return digitmap;
00081 }

map< int, CandStripHandle > CDMapMaker::GetStripMap  ) 
 

Definition at line 85 of file CDMapMaker.cxx.

References PlexStripEndId::Build18BitPlnStripKey(), fcslh, CandHandle::GetDaughterIterator(), CandStripHandle::GetStripEndId(), and MSG.

Referenced by CDTrackerModule::Ana().

00086 {
00087   //This method makes the map and returns it
00088   map<int,CandStripHandle> stripmap;
00089 
00090   //check that list handle is real
00091   if (fcslh==0){
00092     MSG("CDMapMaker",Msg::kFatal)
00093       << "No strip list set" <<endl;
00094     return stripmap;
00095   }
00096   
00097   TIter cshItr(fcslh->GetDaughterIterator());
00098   
00099   //loop over all the candStrips
00100   while (CandStripHandle *csh=dynamic_cast<CandStripHandle*>(cshItr())){
00101     int theKey = -1;
00102     //theKey=csh->GetStripEndId().BuildPlnStripEndKey();
00103     theKey=csh->GetStripEndId().Build18BitPlnStripKey();
00104 
00105     //store key and associated csh in map
00106     if (theKey!=-1) stripmap[theKey]=*csh;    
00107     else MSG("CDTracker",Msg::kWarning)<<"Bad StripEndKey"<<endl;
00108   }
00109   return stripmap;  
00110 }

int CDMapMaker::SetDigitList CandDigitListHandle  ) 
 

Definition at line 114 of file CDMapMaker.cxx.

References fcdlh.

Referenced by CDMapMaker().

00115 {
00116   if(cdlh!=0){
00117     fcdlh=cdlh;
00118     return 1;
00119   }
00120   else return 0;
00121 }

int CDMapMaker::SetStripList CandStripListHandle  ) 
 

Definition at line 125 of file CDMapMaker.cxx.

References fcslh.

Referenced by CDMapMaker().

00126 {
00127   if(cslh!=0){
00128     fcslh=cslh;
00129     return 1;
00130   }
00131   else return 0;
00132 }


Member Data Documentation

CandDigitListHandle* CDMapMaker::fcdlh [private]
 

Definition at line 37 of file CDMapMaker.h.

Referenced by CDMapMaker(), GetDigitMap(), and SetDigitList().

CandStripListHandle* CDMapMaker::fcslh [private]
 

Definition at line 38 of file CDMapMaker.h.

Referenced by CDMapMaker(), GetStripMap(), and SetStripList().


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