2#include "GaudiKernel/MsgStream.h"
4#include "CalibData/Mdc/MdcCalibData.h"
5#include "CalibData/Mdc/MdcCalStruct.h"
6#include "CalibDataSvc/IInstrumentName.h"
10#include "TDirectory.h"
12#include "TBufferFile.h"
15#include "GaudiKernel/CnvFactory.h"
16#include "GaudiKernel/IOpaqueAddress.h"
17#include "GaudiKernel/DataObject.h"
18#include "GaudiKernel/IAddressCreator.h"
19#include "GaudiKernel/IDataProviderSvc.h"
20#include "GaudiKernel/IConversionSvc.h"
21#include "GaudiKernel/GenericAddress.h"
23#include "CalibDataSvc/ICalibRootSvc.h"
24#include "CalibDataSvc/ICalibMetaCnvSvc.h"
27#include "CalibData/CalibModel.h"
49 DataObject*& refpObject) {
51 MsgStream log(
msgSvc(),
"RootMdcCalibDataCnv");
52 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
56 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
66 TTree *xttree = (TTree*)
m_inFile -> Get(
"XtTree");
72 tmpObject -> setXtpar(xtkey,xtpar);
77 if(NULL!=
m_inFile->Get(
"trNewXt00_00_0")){
78 for(
int layid=0; layid<43; layid++){
79 for(
int entr=0; entr<18; entr++){
80 for(
int lr=0; lr<2; lr++){
81 char newXtTreeName[20];
82 sprintf(newXtTreeName,
"trNewXt%02d_%02d_%d",layid,entr,lr);
83 TTree* newXtTree = ((TTree*)
m_inFile->Get(newXtTreeName));
85 newXtTrees.Add(newXtTree->CloneTree());
89 if((43*18*2)==newXtTrees.GetEntries())tmpObject->
setNewXtpar(&newXtTrees);
96 for(
int layid=0; layid<43; layid++){
98 sprintf(r2tTreeName,
"r2t%02d",layid);
99 TTree* r2tTree = ((TTree*)
m_inFile->Get(r2tTreeName));
101 r2tTrees.Add(r2tTree->CloneTree());
103 if(43==r2tTrees.GetEntries()) tmpObject->
setR2tpar(&r2tTrees);
109 TTree *t0tree = (TTree*)
m_inFile -> Get(
"T0Tree");
115 tmpObject -> setT0(t0);
116 tmpObject -> setDelT0(delt0);
122 TTree *qttree = (TTree*)
m_inFile -> Get(
"QtTree");
128 tmpObject -> setQtpar0(qtpar0);
129 tmpObject -> setQtpar1(qtpar1);
135 TTree *sdtree = (TTree*)
m_inFile -> Get(
"SdTree");
142 tmpObject -> setSdpar(sdkey,sdpar);
145 refpObject=tmpObject;
146 return StatusCode::SUCCESS;
152 MsgStream log(
msgSvc(),
"RootMdcCalibDataCnv");
156 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
170 TTree *xttree =
new TTree(
"XtTree",
"XtTree");
171 xttree ->
Branch(
"xtkey", &
key,
"key/I");
172 xttree ->
Branch(
"xtpar", &xtpar,
"xtpar/D");
173 tmpObject -> setXtBegin();
174 while( tmpObject -> getNextXtpar(
key, xtpar) ){
199 TTree *t0tree =
new TTree(
"T0Tree",
"T0Tree");
200 t0tree ->
Branch(
"t0", &t0,
"t0/D");
201 t0tree ->
Branch(
"delt0", &delt0,
"delt0/D");
202 tmpNo = tmpObject -> gett0No();
203 for(i=0; i<tmpNo; i++){
204 t0 = tmpObject -> getT0(i);
205 delt0 = tmpObject -> getDelT0(i);
210 TTree *qttree =
new TTree(
"QtTree",
"QtTree");
211 qttree ->
Branch(
"qtpar0", &(qtpar[0]),
"qtpar0/D");
212 qttree ->
Branch(
"qtpar1", &(qtpar[1]),
"qtpar1/D");
213 tmpNo = tmpObject -> getqtparNo();
214 for(i=0; i<tmpNo; i++){
215 qtpar[0] = tmpObject -> getQtpar0(i);
216 qtpar[1] = tmpObject -> getQtpar1(i);
221 TTree *sdtree =
new TTree(
"SdTree",
"SdTree");
222 sdtree ->
Branch(
"sdkey", &
key,
"key/I");
223 sdtree ->
Branch(
"sdpar", &sdpar,
"sdpar/D");
224 tmpObject -> setSdBegin();
225 while( tmpObject -> getNextSdpar(
key, sdpar) ){
240 log<<MSG::INFO<<
"successfully create RootFile"<<endreq;
const CLID CLID_Calib_MdcCal
curve Branch("CurveSize",&CurveSize,"CurveSize/I")
data SetBranchAddress("time",&time)
*************DOUBLE PRECISION m_pi *DOUBLE PRECISION m_HvecTau2 DOUBLE PRECISION m_HvClone2 DOUBLE PRECISION m_gamma1 DOUBLE PRECISION m_gamma2 DOUBLE PRECISION m_thet1 DOUBLE PRECISION m_thet2 INTEGER m_IFPHOT *COMMON c_Taupair $ !Spin Polarimeter vector first Tau $ !Spin Polarimeter vector second Tau $ !Clone Spin Polarimeter vector first Tau $ !Clone Spin Polarimeter vector second Tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !phi of HvecTau1 $ !theta of HvecTau1 $ !phi of HvecTau2 $ !theta of HvecTau2 $ !super key
void setR2tpar(TObjArray *r2tTrees)
void setNewXtpar(TObjArray *newXtTrees)
StatusCode openRead(const std::string &fname)
virtual StatusCode openWrite(const std::string &fname)
const CLID & objType() const
virtual StatusCode createRoot(const std::string &fname, CalibData::CalibBase1 *pTDSObj)
virtual StatusCode i_createObj(const std::string &fname, DataObject *&refpObject)
static const CLID & classID()
RootMdcCalibDataCnv(ISvcLocator *svc)
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)