46 {
47
48 MsgStream log(
msgSvc(),
"TreeTofSimDataCnv");
49 log<<MSG::DEBUG<<"SetProperty"<<endreq;
50
52
54
55 TBufferFile *buf1 = new TBufferFile(TBuffer::kRead);
56 TBufferFile *buf2 = new TBufferFile(TBuffer::kRead);
57 TBufferFile *buf3 = new TBufferFile(TBuffer::kRead);
58
59 buf1->SetBuffer((*records)["BTofSim"],512000,kFALSE);
60 buf2->SetBuffer((*records)["ETofSim"],512000,kFALSE);
61 buf3->SetBuffer((*records)["SimConstants"],512000,kFALSE);
62
63
64 std::cout<<" SftVer is "<<(*records)["SftVer"];
65 std::cout<<" CalVerSft is "<<(*records)["TofSimParVer"];
66 std::cout<<" File name is "<<(*records)["FileName"]<<std::endl;
67
68
69
70 TTree *btoftree= new TTree();
71 TTree *etoftree= new TTree();
72 TTree *btofcommontree = new TTree();
73 btoftree->Streamer(*buf1);
74 etoftree->Streamer(*buf2);
75 btofcommontree->Streamer(*buf3);
76
80 std::vector<CalibData::BTofSimBase> tmpbTof;
81 std::vector<CalibData::ETofSimBase> tmpeTof;
82 std::vector<CalibData::TofSimConstBase> tofbaseCol;
83
84 int cnt;
85
86 double AttenLength;
87 double Gain;
88 double Ratio;
89 double NoiseSmear;
93 int entries=btoftree->GetEntries();
94 for(cnt=0; cnt<entries; cnt++){
99 tmpbTof.push_back(bTof);
100 }
101
105 entries=etoftree->GetEntries();
106 for(cnt=0; cnt<entries; cnt++){
107 etoftree->GetEntry(cnt);
111 tmpeTof.push_back(eTof);
112 }
113
114 double BarConstant,BarPMTGain,BarHighThres,BarLowThres,EndConstant,EndPMTGain,EndHighThres,EndLowThres,EndNoiseSwitch;
124 entries = btofcommontree->GetEntries();
125 for(cnt=0;cnt<entries;cnt++){
126 btofcommontree->GetEntry(cnt);
136 tofbaseCol.push_back(tofbase);
137 }
138
140 refpObject=tmpObject;
141 delete btoftree;
142 delete etoftree;
143 delete btofcommontree;
144
145 return StatusCode::SUCCESS;
146
147
148}
void setRatio(double ratio)
void setGain(double gain)
void setAttenLength(double length)
void setGain(double gain)
void setAttenLength(double length)
void setNoiseSmear(double noisesmear)
void setBarConstant(const double bc)
void setBarHighThres(const double bhth)
void setEndNoiseSwitch(const double eswitch)
void setEndHighThres(const double ehth)
void setEndConstant(const double ec)
void setBarPMTGain(const double bg)
void setEndPMTGain(const double eg)
void setEndLowThres(const double elth)
void setBarLowThres(const double blth)
virtual DatabaseRecord * pp()
curve SetBranchAddress("CurveSize",&CurveSize)