BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
TofElecData.cxx
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/CalibData/src/Tof/TofElecData.cxx,v 1.1 2009/09/22 07:28:05 huangb Exp $
2
3/** @class Mdctxpar
4 * Implementation of Mdcspres calibration TCDS class
5 */
6
7
8#include "GaudiKernel/MsgStream.h"
9#include "CalibData/Tof/TofElecData.h"
10namespace CalibData {
11
12 TofElecData::TofElecData(std::vector<BarrelElec>* bTofCal,std::vector<EndcapElec>* eTofCal){
13 if(bTofCal){
14 m_bTofElecData = new std::vector<BarrelElec>(*bTofCal);
15 }
16 if(eTofCal){
17 m_eTofElecData = new std::vector<EndcapElec>(*eTofCal);
18 }
19 }
20
21 StatusCode TofElecData::update(CalibBase1& other, MsgStream* log)
22 {
23 TofElecData& other1 = dynamic_cast<TofElecData& >(other);
24 std::cout<<"========================================"<<"\n"<<"here is the update in the TofElecData"<<"\n"<<"=================================================="<<std::endl;
25 CalibBase1::update(other, log);
26 delete m_bTofElecData;
27 m_bTofElecData = new std::vector<BarrelElec>(*(other1.m_bTofElecData));
28 delete m_eTofElecData;
29 m_eTofElecData = new std::vector<EndcapElec>(*(other1.m_eTofElecData));
30 return StatusCode::SUCCESS;
31}
32
34 // if(!m_bTofElecData->empty()) delete m_bTofElecData;
35 if(m_bTofElecData) delete m_bTofElecData;
36 m_bTofElecData = new std::vector<BarrelElec>(*(other1->m_bTofElecData));
37 if(m_eTofElecData) delete m_eTofElecData;
38 m_eTofElecData = new std::vector<EndcapElec>(*(other1->m_eTofElecData));
39}
40
41 //get the CalibData
42
44 std::vector<BarrelElec>::iterator it = m_bTofElecData->begin();
45 for(int i=0;i!=cnt;i++,it++)
46 {
47 }
48 return *it;
49 }
50
51
53 std::vector<EndcapElec>::iterator it = m_eTofElecData->begin();
54 for(int i=0;i!=cnt;i++,it++)
55 {
56 }
57 return *it;
58 }
59
60 }
61
62
virtual StatusCode update(CalibBase1 &obj, MsgStream *)
Definition: CalibBase1.cxx:33
virtual StatusCode update(CalibBase1 &other, MsgStream *log)
Definition: TofElecData.cxx:21
void sim(TofElecData *other1)
Definition: TofElecData.cxx:33
EndcapElec getETof(int cnt) const
Definition: TofElecData.cxx:52
BarrelElec getBTof(int cnt) const
Definition: TofElecData.cxx:43