49 {
50
51 MsgStream log(
msgSvc(),
"RootMdcCalibDataCnv");
52 log<<MSG::DEBUG<<"SetProperty"<<endreq;
53
55 if(!sc)
56 { log<<MSG::ERROR<<"unable to open files"<<endreq;
57 }
58
60
61 int i;
62 int nentries;
63
64 double xtpar;
65 int xtkey;
66 TTree *xttree = (TTree*)
m_inFile -> Get(
"XtTree");
69 nentries = xttree -> GetEntries();
70 for(i=0; i<nentries; i++){
72 tmpObject -> setXtpar(xtkey,xtpar);
73 }
74
75
76 TObjArray newXtTrees;
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));
84 if(!newXtTree) break;
85 newXtTrees.Add(newXtTree->CloneTree());
86 }
87 }
88 }
89 if((43*18*2)==newXtTrees.GetEntries())tmpObject->
setNewXtpar(&newXtTrees);
90 }
91
92
93
94 TObjArray r2tTrees;
96 for(int layid=0; layid<43; layid++){
97 char r2tTreeName[20];
98 sprintf(r2tTreeName,
"r2t%02d",layid);
99 TTree* r2tTree = ((TTree*)
m_inFile->Get(r2tTreeName));
100 if(!r2tTree) break;
101 r2tTrees.Add(r2tTree->CloneTree());
102 }
103 if(43==r2tTrees.GetEntries()) tmpObject->
setR2tpar(&r2tTrees);
104 }
105
106
107 double t0;
108 double delt0;
109 TTree *t0tree = (TTree*)
m_inFile -> Get(
"T0Tree");
112 nentries = t0tree -> GetEntries();
113 for(i=0; i<nentries; i++){
115 tmpObject -> setT0(t0);
116 tmpObject -> setDelT0(delt0);
117 }
118
119
120 double qtpar0;
121 double qtpar1;
122 TTree *qttree = (TTree*)
m_inFile -> Get(
"QtTree");
125 nentries = qttree -> GetEntries();
126 for(i=0; i<nentries; i++){
128 tmpObject -> setQtpar0(qtpar0);
129 tmpObject -> setQtpar1(qtpar1);
130 }
131
132
133 double sdpar;
134 int sdkey;
135 TTree *sdtree = (TTree*)
m_inFile -> Get(
"SdTree");
138 nentries = sdtree -> GetEntries();
139
140 for(i=0; i<nentries; i++){
142 tmpObject -> setSdpar(sdkey,sdpar);
143 }
144
145 refpObject=tmpObject;
146 return StatusCode::SUCCESS;
147}
void setR2tpar(TObjArray *r2tTrees)
void setNewXtpar(TObjArray *newXtTrees)
StatusCode openRead(const std::string &fname)
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)
curve SetBranchAddress("CurveSize",&CurveSize)