/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Calibration/CalibData/CalibData-00-01-18/src/Tof/TofElecData.cxx

Go to the documentation of this file.
00001 // $Header: /bes/bes/BossCvs/Calibration/CalibData/src/Tof/TofElecData.cxx,v 1.1 2009/09/22 07:28:05 huangb Exp $
00002 
00008 #include "GaudiKernel/MsgStream.h"
00009 #include "CalibData/Tof/TofElecData.h"
00010 namespace CalibData {
00011 
00012   TofElecData::TofElecData(std::vector<BarrelElec>* bTofCal,std::vector<EndcapElec>* eTofCal){
00013     if(bTofCal){
00014       m_bTofElecData = new std::vector<BarrelElec>(*bTofCal);
00015     }
00016     if(eTofCal){
00017       m_eTofElecData = new std::vector<EndcapElec>(*eTofCal);
00018     }
00019   }
00020      
00021   StatusCode TofElecData::update(CalibBase1& other, MsgStream* log)
00022   {
00023     TofElecData& other1 = dynamic_cast<TofElecData& >(other);
00024     std::cout<<"========================================"<<"\n"<<"here is the update in the TofElecData"<<"\n"<<"=================================================="<<std::endl;
00025     CalibBase1::update(other, log);
00026     delete m_bTofElecData;
00027     m_bTofElecData = new std::vector<BarrelElec>(*(other1.m_bTofElecData));
00028     delete m_eTofElecData;
00029     m_eTofElecData = new std::vector<EndcapElec>(*(other1.m_eTofElecData));
00030     return StatusCode::SUCCESS;  
00031 }       
00032 
00033 void TofElecData::sim(TofElecData* other1){
00034  //  if(!m_bTofElecData->empty()) delete m_bTofElecData;
00035    if(m_bTofElecData) delete m_bTofElecData;
00036    m_bTofElecData = new std::vector<BarrelElec>(*(other1->m_bTofElecData));
00037    if(m_eTofElecData) delete m_eTofElecData;
00038    m_eTofElecData = new std::vector<EndcapElec>(*(other1->m_eTofElecData));
00039 }
00040 
00041   //get the CalibData
00042 
00043   BarrelElec TofElecData::getBTof(int cnt) const{
00044     std::vector<BarrelElec>::iterator it = m_bTofElecData->begin();
00045     for(int i=0;i!=cnt;i++,it++)
00046       {  
00047       }
00048     return *it;
00049   }
00050 
00051 
00052   EndcapElec TofElecData::getETof(int cnt) const{
00053     std::vector<EndcapElec>::iterator it = m_eTofElecData->begin();
00054     for(int i=0;i!=cnt;i++,it++)
00055       {  
00056       }
00057     return *it;
00058   }
00059 
00060  }
00061 
00062 

Generated on Tue Nov 29 22:57:48 2016 for BOSS_7.0.2 by  doxygen 1.4.7