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

TrigTOFT Class Reference

#include <TrigTOFT.h>

List of all members.

Public Member Functions

int getBTofHitMap (int index, int win) const
int getBTofHitMap (int index, int win) const
int getEETofHitMap (int index, int win) const
int getEETofHitMap (int index, int win) const
const std::string & getName () const
const std::string & getName () const
unsigned int getTimeWindow () const
unsigned int getTimeWindow () const
int getTofTrigCondi (int index, int win) const
int getTofTrigCondi (int index, int win) const
int getWETofHitMap (int index, int win) const
int getWETofHitMap (int index, int win) const
void initialize ()
void initialize ()
void setTOFTTrigData (uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)
void setTOFTTrigData (uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)
 TrigTOFT (char *name)
 TrigTOFT (char *name)
virtual ~TrigTOFT ()
virtual ~TrigTOFT ()

Private Attributes

int m_btofHitMap [176][21]
int m_eetofHitMap [48][21]
std::string m_name
int m_tofTrigCondi [6][21]
int m_wetofHitMap [48][21]
unsigned int m_window


Constructor & Destructor Documentation

TrigTOFT::TrigTOFT char *  name  ) 
 

00005 {
00006   m_name = name;
00007 }

virtual TrigTOFT::~TrigTOFT  )  [inline, virtual]
 

00011 {}

TrigTOFT::TrigTOFT char *  name  ) 
 

virtual TrigTOFT::~TrigTOFT  )  [inline, virtual]
 

00011 {}


Member Function Documentation

int TrigTOFT::getBTofHitMap int  index,
int  win
const [inline]
 

00022 { return m_btofHitMap[index][win]; }

int TrigTOFT::getBTofHitMap int  index,
int  win
const [inline]
 

00022 { return m_btofHitMap[index][win]; }

int TrigTOFT::getEETofHitMap int  index,
int  win
const [inline]
 

00025 { return m_eetofHitMap[index][win]; }

int TrigTOFT::getEETofHitMap int  index,
int  win
const [inline]
 

00025 { return m_eetofHitMap[index][win]; }

const std::string& TrigTOFT::getName  )  const [inline]
 

00017 { return m_name; }

const std::string& TrigTOFT::getName  )  const [inline]
 

00017 { return m_name; }

unsigned int TrigTOFT::getTimeWindow  )  const [inline]
 

00019 { return m_window; }

unsigned int TrigTOFT::getTimeWindow  )  const [inline]
 

00019 { return m_window; }

int TrigTOFT::getTofTrigCondi int  index,
int  win
const [inline]
 

00021 { return m_tofTrigCondi[index][win]; }

int TrigTOFT::getTofTrigCondi int  index,
int  win
const [inline]
 

00021 { return m_tofTrigCondi[index][win]; }

int TrigTOFT::getWETofHitMap int  index,
int  win
const [inline]
 

00024 { return m_wetofHitMap[index][win]; }

int TrigTOFT::getWETofHitMap int  index,
int  win
const [inline]
 

00024 { return m_wetofHitMap[index][win]; }

void TrigTOFT::initialize  ) 
 

void TrigTOFT::initialize  ) 
 

00010 {
00011   for(int i = 0; i < 176; i++) 
00012     for(int j = 0; j < 21; j++) {
00013     if(i < 6) m_tofTrigCondi[i][j] = 0;
00014     if(i < 48) {
00015       m_wetofHitMap[i][j] = 0;
00016       m_eetofHitMap[i][j] = 0;
00017     }
00018     m_btofHitMap[i][j] = 0;
00019   }
00020 }

void TrigTOFT::setTOFTTrigData uint32_t  boardId,
uint32_t  window,
uint32_t  datasize,
const uint32_t *  data
 

void TrigTOFT::setTOFTTrigData uint32_t  boardId,
uint32_t  window,
uint32_t  datasize,
const uint32_t *  data
 

00022                                                                                                           {
00023 
00024   if(boardId != 0xDA) std::cerr << "ERROR: You set the wrong board data to TrigTOFT!!!" << std::endl;
00025 
00026   m_window = window; 
00027 
00028   for (uint32_t i = 0; i < datasize; i++) {
00029     int winId = int (i/14);
00030     //int id = (i-winId*14)%14;
00031     //DW4 trigger conditions
00032     if(i==(1+winId*14)) {
00033       for(uint32_t condId = 1,loop = 0; loop < 6; condId <<=1,loop++) {
00034         if(data[i] & condId) m_tofTrigCondi[loop][winId] = 1;
00035       }
00036     }
00037 
00038     //DW9-DW12 for inner layer hit, DW13--DW16 outer layer hit
00039     if(i >= (6+winId*14) && i <= (13+winId*14)) {
00040       if(i == (6+winId*14) || i == (10+winId*14)) {
00041         for(uint32_t btofId = 1,loop = 0; loop < 16; btofId <<=1,loop++) {
00042           if(data[i] & btofId) {
00043             if(i == (6+winId*14))  m_btofHitMap[loop+72][winId] = 1;
00044             if(i == (10+winId*14)) m_btofHitMap[loop+72+88][winId] = 1;
00045           }
00046         }
00047       }
00048       else {
00049         for(uint32_t btofId = 1,loop = 0; loop < 24; btofId <<=1,loop++) {
00050           if(data[i] & btofId) {
00051             if(i >= (7+winId*14) && i <= (9+winId*14)) m_btofHitMap[loop+(9+winId*14-i)*24][winId] = 1;
00052             else m_btofHitMap[loop+(13+winId*14-i)*24+88][winId] = 1;
00053           }
00054         }
00055       }
00056     }
00057 
00058     //DW7-DW8 for east end cap hits
00059     if(i>=(4+winId*14) && i<=(5+winId*14)) {
00060       for(uint32_t eetofId = 1,loop = 0; loop < 24; eetofId <<=1,loop++) {
00061         if(data[i] & eetofId)  m_eetofHitMap[loop+(5+winId*14-i)*24][winId] = 1; 
00062       }
00063     }
00064 
00065     //DW5-DW6 for east end cap hits
00066     if(i>=(2+winId*14) && i<=(3+winId*14)) {
00067       for(uint32_t wetofId = 1,loop = 0; loop < 24; wetofId <<=1,loop++) {
00068         if(data[i] & wetofId) m_wetofHitMap[loop+(3+winId*14-i)*24][winId] = 1;
00069       }
00070     }
00071   }
00072 }


Member Data Documentation

int TrigTOFT::m_btofHitMap [private]
 

int TrigTOFT::m_eetofHitMap [private]
 

std::string TrigTOFT::m_name [private]
 

int TrigTOFT::m_tofTrigCondi [private]
 

int TrigTOFT::m_wetofHitMap [private]
 

unsigned int TrigTOFT::m_window [private]
 


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