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

TofHitCount Class Reference

#include <TofHitCount.h>

List of all members.

Public Member Functions

std::vector< int > & GetbarrelHit1 ()
std::vector< int > & GetbarrelHit1 ()
std::vector< int > & GetbarrelHit2 ()
std::vector< int > & GetbarrelHit2 ()
std::vector< int > & GetecapHit ()
std::vector< int > & GetecapHit ()
std::vector< int > & GetwcapHit ()
std::vector< int > & GetwcapHit ()
void setTofDigi (std::vector< int > &vtofHit)
void setTofDigi (std::vector< int > &vtofHit)
 TofHitCount ()
 TofHitCount ()
 ~TofHitCount ()
 ~TofHitCount ()

Static Public Member Functions

TofHitCountget_Tof (void)
TofHitCountget_Tof (void)

Private Attributes

std::vector< int > barrelHit1
std::vector< int > barrelHit1
std::vector< int > barrelHit2
std::vector< int > barrelHit2
std::vector< int > ecapHit
std::vector< int > ecapHit
BesGlobalTrigSvcm_pIBGT
BesGlobalTrigSvcm_pIBGT
IBesGlobalTrigSvcm_tmpSvc
IBesGlobalTrigSvcm_tmpSvc
std::vector< int > wcapHit
std::vector< int > wcapHit

Static Private Attributes

TofHitCounttof_Pointer
TofHitCounttof_Pointer = 0


Constructor & Destructor Documentation

TofHitCount::TofHitCount  ) 
 

00038 {
00039   ISvcLocator* svcLocator = Gaudi::svcLocator();
00040   StatusCode sc = svcLocator->service("BesGlobalTrigSvc", m_tmpSvc);
00041   m_pIBGT = dynamic_cast<BesGlobalTrigSvc* >(m_tmpSvc);
00042 }

TofHitCount::~TofHitCount  ) 
 

00044 {
00045 }

TofHitCount::TofHitCount  ) 
 

TofHitCount::~TofHitCount  ) 
 


Member Function Documentation

TofHitCount* TofHitCount::get_Tof void   )  [static]
 

TofHitCount * TofHitCount::get_Tof void   )  [static]
 

00032                                       {
00033   if(!tof_Pointer) tof_Pointer = new TofHitCount();
00034   return tof_Pointer;
00035 }

std::vector<int>& TofHitCount::GetbarrelHit1  )  [inline]
 

00015 { return barrelHit1; }

std::vector<int>& TofHitCount::GetbarrelHit1  )  [inline]
 

00015 { return barrelHit1; }

std::vector<int>& TofHitCount::GetbarrelHit2  )  [inline]
 

00016 { return barrelHit2; }

std::vector<int>& TofHitCount::GetbarrelHit2  )  [inline]
 

00016 { return barrelHit2; }

std::vector<int>& TofHitCount::GetecapHit  )  [inline]
 

00017 { return ecapHit; }

std::vector<int>& TofHitCount::GetecapHit  )  [inline]
 

00017 { return ecapHit; }

std::vector<int>& TofHitCount::GetwcapHit  )  [inline]
 

00018 { return wcapHit; }

std::vector<int>& TofHitCount::GetwcapHit  )  [inline]
 

00018 { return wcapHit; }

void TofHitCount::setTofDigi std::vector< int > &  vtofHit  ) 
 

void TofHitCount::setTofDigi std::vector< int > &  vtofHit  ) 
 

00047 {
00048   barrelHit1.clear();
00049   barrelHit2.clear();
00050   ecapHit.clear();
00051   wcapHit.clear();
00052 
00053   for(std::vector<int>::iterator iter = vtofHit.begin(); iter != vtofHit.end(); iter++) {
00054     int tofId = (*iter);
00055     int part, layer, im;
00056     part = int (tofId/10000.);
00057     layer = int ((tofId - part*10000)/1000.);
00058     im = int ((tofId - part*10000 - layer*1000)/10.);
00059     if(part == 0) {
00060       // east end cap: 0-47
00061       if(find(ecapHit.begin(),ecapHit.end(),im) == ecapHit.end()) { 
00062         ecapHit.push_back(im); 
00063       }
00064     }
00065     else if (part == 2) {
00066       // west end cap: 0-47
00067       if(find(wcapHit.begin(),wcapHit.end(),im) == wcapHit.end()) {
00068         wcapHit.push_back(im);    
00069       }
00070     }
00071     else {
00072       if(layer == 0) {
00073         //the 1st layer in barrel: 0-87
00074         if(find(barrelHit1.begin(),barrelHit1.end(),im) == barrelHit1.end()) {
00075           barrelHit1.push_back(im);
00076         }
00077       }
00078       if(layer == 1) {
00079         //the 2nd layer in barrel: 0-87
00080         if(find(barrelHit2.begin(),barrelHit2.end(),im) == barrelHit2.end()) {
00081           barrelHit2.push_back(im);
00082         }
00083       }
00084     }
00085   }
00086 }


Member Data Documentation

std::vector<int> TofHitCount::barrelHit1 [private]
 

std::vector<int> TofHitCount::barrelHit1 [private]
 

std::vector<int> TofHitCount::barrelHit2 [private]
 

std::vector<int> TofHitCount::barrelHit2 [private]
 

std::vector<int> TofHitCount::ecapHit [private]
 

std::vector<int> TofHitCount::ecapHit [private]
 

BesGlobalTrigSvc* TofHitCount::m_pIBGT [private]
 

BesGlobalTrigSvc* TofHitCount::m_pIBGT [private]
 

IBesGlobalTrigSvc* TofHitCount::m_tmpSvc [private]
 

IBesGlobalTrigSvc* TofHitCount::m_tmpSvc [private]
 

TofHitCount* TofHitCount::tof_Pointer [static, private]
 

TofHitCount * TofHitCount::tof_Pointer = 0 [static, private]
 

std::vector<int> TofHitCount::wcapHit [private]
 

std::vector<int> TofHitCount::wcapHit [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 18:58:53 2011 for BOSS6.5.5 by  doxygen 1.3.9.1