1#include "GaudiKernel/MsgStream.h"
3#include "CalibData/Tof/TofElecData.h"
4#include "CalibDataSvc/IInstrumentName.h"
11#include "GaudiKernel/CnvFactory.h"
12#include "GaudiKernel/IOpaqueAddress.h"
13#include "GaudiKernel/DataObject.h"
14#include "GaudiKernel/IAddressCreator.h"
15#include "GaudiKernel/IDataProviderSvc.h"
16#include "GaudiKernel/IConversionSvc.h"
17#include "GaudiKernel/GenericAddress.h"
19#include "CalibDataSvc/ICalibTreeSvc.h"
20#include "CalibDataSvc/ICalibMetaCnvSvc.h"
23#include "CalibData/CalibModel.h"
45 DataObject*& refpObject) {
47 MsgStream log(
msgSvc(),
"RootTofElecDataCnv");
48 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
51 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
54 TTree *BarBoardNum=(TTree*)
m_inFile -> Get(
"BarBoardNum");
55 TTree *EndBoardNum= (TTree*)
m_inFile -> Get(
"EndBoardNum");
56 TTree *QElecBarParEast = (TTree*)
m_inFile -> Get(
"QElecBarParEast");
57 TTree *QElecBarParWest = (TTree*)
m_inFile -> Get(
"QElecBarParWest");
58 TTree *QElecEndPar = (TTree*)
m_inFile -> Get(
"QElecEndPar");
59 TTree *SimQElecBarParEast = (TTree*)
m_inFile -> Get(
"SimQElecBarParEast");
60 TTree *SimQElecBarParWest = (TTree*)
m_inFile -> Get(
"SimQElecBarParWest");
61 TTree *SimQElecEndPar = (TTree*)
m_inFile -> Get(
"SimQElecEndPar");
66 std::vector<CalibData::BarrelElec> tmpbTof;
67 std::vector<CalibData::EndcapElec> tmpeTof;
79 QElecBarParEast->SetBranchAddress(
"P0",&p[0]);
80 QElecBarParEast->SetBranchAddress(
"P1",&p[1]);
81 QElecBarParEast->SetBranchAddress(
"P2",&p[2]);
82 QElecBarParEast->SetBranchAddress(
"P3",&p[3]);
83 QElecBarParEast->SetBranchAddress(
"P4",&p[4]);
84 QElecBarParEast->SetBranchAddress(
"P5",&p[5]);
85 QElecBarParEast->SetBranchAddress(
"P6",&p[6]);
86 QElecBarParEast->SetBranchAddress(
"P7",&p[7]);
87 QElecBarParEast->SetBranchAddress(
"P8",&p[8]);
88 QElecBarParEast->SetBranchAddress(
"P9",&p[9]);
89 QElecBarParEast->SetBranchAddress(
"P10",&p[10]);
91 QElecBarParWest->SetBranchAddress(
"P0",&p_w[0]);
92 QElecBarParWest->SetBranchAddress(
"P1",&p_w[1]);
93 QElecBarParWest->SetBranchAddress(
"P2",&p_w[2]);
94 QElecBarParWest->SetBranchAddress(
"P3",&p_w[3]);
95 QElecBarParWest->SetBranchAddress(
"P4",&p_w[4]);
96 QElecBarParWest->SetBranchAddress(
"P5",&p_w[5]);
97 QElecBarParWest->SetBranchAddress(
"P6",&p_w[6]);
98 QElecBarParWest->SetBranchAddress(
"P7",&p_w[7]);
99 QElecBarParWest->SetBranchAddress(
"P8",&p_w[8]);
100 QElecBarParWest->SetBranchAddress(
"P9",&p_w[9]);
101 QElecBarParWest->SetBranchAddress(
"P10",&p_w[10]);
103 SimQElecBarParEast->SetBranchAddress(
"P0",&p_se[0]);
104 SimQElecBarParEast->SetBranchAddress(
"P1",&p_se[1]);
105 SimQElecBarParEast->SetBranchAddress(
"P2",&p_se[2]);
106 SimQElecBarParEast->SetBranchAddress(
"P3",&p_se[3]);
107 SimQElecBarParEast->SetBranchAddress(
"P4",&p_se[4]);
108 SimQElecBarParEast->SetBranchAddress(
"P5",&p_se[5]);
109 SimQElecBarParEast->SetBranchAddress(
"P6",&p_se[6]);
110 SimQElecBarParEast->SetBranchAddress(
"P7",&p_se[7]);
111 SimQElecBarParEast->SetBranchAddress(
"P8",&p_se[8]);
112 SimQElecBarParEast->SetBranchAddress(
"P9",&p_se[9]);
113 SimQElecBarParEast->SetBranchAddress(
"P10",&p_se[10]);
115 SimQElecBarParWest->SetBranchAddress(
"P0",&p_sw[0]);
116 SimQElecBarParWest->SetBranchAddress(
"P1",&p_sw[1]);
117 SimQElecBarParWest->SetBranchAddress(
"P2",&p_sw[2]);
118 SimQElecBarParWest->SetBranchAddress(
"P3",&p_sw[3]);
119 SimQElecBarParWest->SetBranchAddress(
"P4",&p_sw[4]);
120 SimQElecBarParWest->SetBranchAddress(
"P5",&p_sw[5]);
121 SimQElecBarParWest->SetBranchAddress(
"P6",&p_sw[6]);
122 SimQElecBarParWest->SetBranchAddress(
"P7",&p_sw[7]);
123 SimQElecBarParWest->SetBranchAddress(
"P8",&p_sw[8]);
124 SimQElecBarParWest->SetBranchAddress(
"P9",&p_sw[9]);
125 SimQElecBarParWest->SetBranchAddress(
"P10",&p_sw[10]);
127 for(cnt=0; cnt<352; cnt++){
139 QElecBarParEast->GetEntry(kkk);
140 QElecBarParWest->GetEntry(kkk);
141 SimQElecBarParEast->GetEntry(kkk);
142 SimQElecBarParWest->GetEntry(kkk);
149 tmpbTof.push_back(bTof);
158 QElecEndPar->SetBranchAddress(
"P1",&p[1]);
159 QElecEndPar->SetBranchAddress(
"P2",&p[2]);
160 QElecEndPar->SetBranchAddress(
"P3",&p[3]);
161 QElecEndPar->SetBranchAddress(
"P4",&p[4]);
162 QElecEndPar->SetBranchAddress(
"P5",&p[5]);
163 QElecEndPar->SetBranchAddress(
"P6",&p[6]);
164 QElecEndPar->SetBranchAddress(
"P7",&p[7]);
165 QElecEndPar->SetBranchAddress(
"P8",&p[8]);
166 QElecEndPar->SetBranchAddress(
"P9",&p[9]);
167 QElecEndPar->SetBranchAddress(
"P10",&p[10]);
169 SimQElecEndPar->SetBranchAddress(
"P1",&p_w[1]);
170 SimQElecEndPar->SetBranchAddress(
"P2",&p_w[2]);
171 SimQElecEndPar->SetBranchAddress(
"P3",&p_w[3]);
172 SimQElecEndPar->SetBranchAddress(
"P4",&p_w[4]);
173 SimQElecEndPar->SetBranchAddress(
"P5",&p_w[5]);
174 SimQElecEndPar->SetBranchAddress(
"P6",&p_w[6]);
175 SimQElecEndPar->SetBranchAddress(
"P7",&p_w[7]);
176 SimQElecEndPar->SetBranchAddress(
"P8",&p_w[8]);
177 SimQElecEndPar->SetBranchAddress(
"P9",&p_w[9]);
178 SimQElecEndPar->SetBranchAddress(
"P10",&p_w[10]);
179 for(cnt=0; cnt<96; cnt++){
180 EndBoardNum->GetEntry(cnt);
181 QElecEndPar->GetEntry(cnt);
182 SimQElecEndPar->GetEntry(cnt);
190 tmpeTof.push_back(eTof);
196 refpObject=tmpObject;
199 delete QElecBarParEast;
200 delete QElecBarParWest;
202 delete SimQElecBarParEast;
203 delete SimQElecBarParWest;
204 delete SimQElecEndPar;
206 return StatusCode::SUCCESS;
const CLID CLID_TofQ_Elec
data SetBranchAddress("time",&time)
void setSimP2(unsigned int idx, double p)
void setP1(unsigned int idx, double p)
void setNumEast(unsigned int idx, unsigned int num)
void setNumWest(unsigned int idx, unsigned int num)
void setSimP1(unsigned int idx, double p)
void setP2(unsigned int idx, double p)
void setNum(unsigned int idx, unsigned int num)
void setSimP(unsigned int idx, double p)
void setP(unsigned int idx, double p)
StatusCode openRead(const std::string &fname)
const CLID & objType() const
virtual StatusCode i_createObj(const std::string &fname, DataObject *&refpObject)
RootTofElecDataCnv(ISvcLocator *svc)
static const CLID & classID()