1#include "GaudiKernel/MsgStream.h"
12#include "GaudiKernel/CnvFactory.h"
13#include "GaudiKernel/IOpaqueAddress.h"
14#include "GaudiKernel/DataObject.h"
15#include "GaudiKernel/IAddressCreator.h"
16#include "GaudiKernel/IDataProviderSvc.h"
17#include "GaudiKernel/IConversionSvc.h"
18#include "GaudiKernel/GenericAddress.h"
46 DataObject*& refpObject) {
48 MsgStream log(
msgSvc(),
"TreeTofElecDataCnv");
49 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
54 TBufferFile *buf1 =
new TBufferFile(TBuffer::kRead);
55 TBufferFile *buf2 =
new TBufferFile(TBuffer::kRead);
56 TBufferFile *buf3 =
new TBufferFile(TBuffer::kRead);
57 TBufferFile *buf4 =
new TBufferFile(TBuffer::kRead);
58 TBufferFile *buf5 =
new TBufferFile(TBuffer::kRead);
59 TBufferFile *buf6 =
new TBufferFile(TBuffer::kRead);
60 TBufferFile *buf7 =
new TBufferFile(TBuffer::kRead);
61 TBufferFile *buf8 =
new TBufferFile(TBuffer::kRead);
63 buf1->SetBuffer((*records)[
"BarBoardNum"],512000,kFALSE);
64 buf2->SetBuffer((*records)[
"EndBoardNum"],512000,kFALSE);
65 buf3->SetBuffer((*records)[
"QELecBarParEast"],512000,kFALSE);
66 buf4->SetBuffer((*records)[
"QELecBarParWest"],512000,kFALSE);
67 buf5->SetBuffer((*records)[
"QELecEndPar"],512000,kFALSE);
68 buf6->SetBuffer((*records)[
"SimQELecBarParEast"],512000,kFALSE);
69 buf7->SetBuffer((*records)[
"SimQELecBarParWest"],512000,kFALSE);
70 buf8->SetBuffer((*records)[
"SimQELecEndPar"],512000,kFALSE);
72 std::cout<<
" SftVer is "<<(*records)[
"SftVer"];
73 std::cout<<
" CalVerSft is "<<(*records)[
"CalParVer"];
74 std::cout<<
" File name is "<<(*records)[
"FileName"]<<std::endl;
77 TTree *BarBoardNum=
new TTree();
78 TTree *EndBoardNum=
new TTree();
79 TTree *QElecBarParEast =
new TTree();
80 TTree *QElecBarParWest =
new TTree();
81 TTree *QElecEndPar =
new TTree();
82 TTree *SimQElecBarParEast =
new TTree();
83 TTree *SimQElecBarParWest =
new TTree();
84 TTree *SimQElecEndPar =
new TTree();
85 BarBoardNum->Streamer(*buf1);
86 EndBoardNum->Streamer(*buf2);
87 QElecBarParEast->Streamer(*buf3);
88 QElecBarParWest->Streamer(*buf4);
89 QElecEndPar->Streamer(*buf5);
90 SimQElecBarParEast->Streamer(*buf6);
91 SimQElecBarParWest->Streamer(*buf7);
92 SimQElecEndPar->Streamer(*buf8);
98 std::vector<CalibData::BarrelElec> tmpbTof;
99 std::vector<CalibData::EndcapElec> tmpeTof;
111 QElecBarParEast->SetBranchAddress(
"P0",&p[0]);
112 QElecBarParEast->SetBranchAddress(
"P1",&p[1]);
113 QElecBarParEast->SetBranchAddress(
"P2",&p[2]);
114 QElecBarParEast->SetBranchAddress(
"P3",&p[3]);
115 QElecBarParEast->SetBranchAddress(
"P4",&p[4]);
116 QElecBarParEast->SetBranchAddress(
"P5",&p[5]);
117 QElecBarParEast->SetBranchAddress(
"P6",&p[6]);
118 QElecBarParEast->SetBranchAddress(
"P7",&p[7]);
119 QElecBarParEast->SetBranchAddress(
"P8",&p[8]);
120 QElecBarParEast->SetBranchAddress(
"P9",&p[9]);
121 QElecBarParEast->SetBranchAddress(
"P10",&p[10]);
123 QElecBarParWest->SetBranchAddress(
"P0",&p_w[0]);
124 QElecBarParWest->SetBranchAddress(
"P1",&p_w[1]);
125 QElecBarParWest->SetBranchAddress(
"P2",&p_w[2]);
126 QElecBarParWest->SetBranchAddress(
"P3",&p_w[3]);
127 QElecBarParWest->SetBranchAddress(
"P4",&p_w[4]);
128 QElecBarParWest->SetBranchAddress(
"P5",&p_w[5]);
129 QElecBarParWest->SetBranchAddress(
"P6",&p_w[6]);
130 QElecBarParWest->SetBranchAddress(
"P7",&p_w[7]);
131 QElecBarParWest->SetBranchAddress(
"P8",&p_w[8]);
132 QElecBarParWest->SetBranchAddress(
"P9",&p_w[9]);
133 QElecBarParWest->SetBranchAddress(
"P10",&p_w[10]);
135 SimQElecBarParEast->SetBranchAddress(
"P0",&p_se[0]);
136 SimQElecBarParEast->SetBranchAddress(
"P1",&p_se[1]);
137 SimQElecBarParEast->SetBranchAddress(
"P2",&p_se[2]);
138 SimQElecBarParEast->SetBranchAddress(
"P3",&p_se[3]);
139 SimQElecBarParEast->SetBranchAddress(
"P4",&p_se[4]);
140 SimQElecBarParEast->SetBranchAddress(
"P5",&p_se[5]);
141 SimQElecBarParEast->SetBranchAddress(
"P6",&p_se[6]);
142 SimQElecBarParEast->SetBranchAddress(
"P7",&p_se[7]);
143 SimQElecBarParEast->SetBranchAddress(
"P8",&p_se[8]);
144 SimQElecBarParEast->SetBranchAddress(
"P9",&p_se[9]);
145 SimQElecBarParEast->SetBranchAddress(
"P10",&p_se[10]);
147 SimQElecBarParWest->SetBranchAddress(
"P0",&p_sw[0]);
148 SimQElecBarParWest->SetBranchAddress(
"P1",&p_sw[1]);
149 SimQElecBarParWest->SetBranchAddress(
"P2",&p_sw[2]);
150 SimQElecBarParWest->SetBranchAddress(
"P3",&p_sw[3]);
151 SimQElecBarParWest->SetBranchAddress(
"P4",&p_sw[4]);
152 SimQElecBarParWest->SetBranchAddress(
"P5",&p_sw[5]);
153 SimQElecBarParWest->SetBranchAddress(
"P6",&p_sw[6]);
154 SimQElecBarParWest->SetBranchAddress(
"P7",&p_sw[7]);
155 SimQElecBarParWest->SetBranchAddress(
"P8",&p_sw[8]);
156 SimQElecBarParWest->SetBranchAddress(
"P9",&p_sw[9]);
157 SimQElecBarParWest->SetBranchAddress(
"P10",&p_sw[10]);
159 for(cnt=0; cnt<352; cnt++){
171 QElecBarParEast->GetEntry(kkk);
172 QElecBarParWest->GetEntry(kkk);
173 SimQElecBarParEast->GetEntry(kkk);
174 SimQElecBarParWest->GetEntry(kkk);
181 tmpbTof.push_back(bTof);
190 QElecEndPar->SetBranchAddress(
"P1",&p[1]);
191 QElecEndPar->SetBranchAddress(
"P2",&p[2]);
192 QElecEndPar->SetBranchAddress(
"P3",&p[3]);
193 QElecEndPar->SetBranchAddress(
"P4",&p[4]);
194 QElecEndPar->SetBranchAddress(
"P5",&p[5]);
195 QElecEndPar->SetBranchAddress(
"P6",&p[6]);
196 QElecEndPar->SetBranchAddress(
"P7",&p[7]);
197 QElecEndPar->SetBranchAddress(
"P8",&p[8]);
198 QElecEndPar->SetBranchAddress(
"P9",&p[9]);
199 QElecEndPar->SetBranchAddress(
"P10",&p[10]);
201 SimQElecEndPar->SetBranchAddress(
"P1",&p_w[1]);
202 SimQElecEndPar->SetBranchAddress(
"P2",&p_w[2]);
203 SimQElecEndPar->SetBranchAddress(
"P3",&p_w[3]);
204 SimQElecEndPar->SetBranchAddress(
"P4",&p_w[4]);
205 SimQElecEndPar->SetBranchAddress(
"P5",&p_w[5]);
206 SimQElecEndPar->SetBranchAddress(
"P6",&p_w[6]);
207 SimQElecEndPar->SetBranchAddress(
"P7",&p_w[7]);
208 SimQElecEndPar->SetBranchAddress(
"P8",&p_w[8]);
209 SimQElecEndPar->SetBranchAddress(
"P9",&p_w[9]);
210 SimQElecEndPar->SetBranchAddress(
"P10",&p_w[10]);
211 for(cnt=0; cnt<96; cnt++){
212 EndBoardNum->GetEntry(cnt);
213 QElecEndPar->GetEntry(cnt);
214 SimQElecEndPar->GetEntry(cnt);
223 tmpeTof.push_back(eTof);
229 refpObject=tmpObject;
232 delete QElecBarParEast;
233 delete QElecBarParWest;
235 delete SimQElecBarParEast;
236 delete SimQElecBarParWest;
237 delete SimQElecEndPar;
239 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)
virtual DatabaseRecord * pp()
static const CLID & classID()
TreeTofElecDataCnv(ISvcLocator *svc)
virtual StatusCode i_createObj(IOpaqueAddress *address, DataObject *&refpObject)
const CLID & objType() const