54 {
55
56 MsgStream log(
msgSvc(),
"RootMucCalibDataCnv");
57 log<<MSG::DEBUG<<"SetProperty"<<endreq;
58
60 if(!sc)
61 { log<<MSG::ERROR<<"unable to open files"<<endreq;
62 return StatusCode::FAILURE;
63 }
64
66
67
68
69
70
71
72 Double_t lay_eff, box_eff, str_eff;
73 Double_t lay_cnt, box_cnt, str_cnt;
74 Double_t lay_nos, box_nos, str_nos;
75 Double_t lay_nos_ratio, box_nos_ratio, str_nos_ratio;
76 lay_eff = box_eff = str_eff = 0.0;
77 lay_cnt = box_cnt = str_cnt = 0.0;
78 lay_nos = box_nos = str_nos = 0.0;
79 lay_nos_ratio = box_nos_ratio = str_nos_ratio = 0.0;
80
81 char name[60];
82
83 TTree* tr_Lvl[3];
84
85
86
87 tr_Lvl[0] = (TTree*)
m_inFile->Get(
"LayConst");
88 tr_Lvl[0]->SetBranchAddress("layer_eff", &lay_eff);
89 tr_Lvl[0]->SetBranchAddress("layer_cnt", &lay_cnt);
90 tr_Lvl[0]->SetBranchAddress("layer_noise", &lay_nos);
91 tr_Lvl[0]->SetBranchAddress("layer_nosratio", &lay_nos_ratio);
92
93 tr_Lvl[1] = (TTree*)
m_inFile->Get(
"BoxConst");
94 tr_Lvl[1]->SetBranchAddress("box_eff", &box_eff);
95 tr_Lvl[1]->SetBranchAddress("box_cnt", &box_cnt);
96 tr_Lvl[1]->SetBranchAddress("box_noise", &box_nos);
97 tr_Lvl[1]->SetBranchAddress("box_nosratio", &box_nos_ratio);
98
99 tr_Lvl[2] = (TTree*)
m_inFile->Get(
"StrConst");
100 tr_Lvl[2]->SetBranchAddress("strip_eff", &str_eff);
101 tr_Lvl[2]->SetBranchAddress("strip_cnt", &str_cnt);
102 tr_Lvl[2]->SetBranchAddress("strip_noise", &str_nos);
103 tr_Lvl[2]->SetBranchAddress("strip_nosratio", &str_nos_ratio);
104
105
106
107 int part, segment, layer, strip;
108 part = segment = layer = strip = 0;
109 for(int i=0; i<LAYER_MAX; i++)
110 {
111
112 tr_Lvl[0]->GetEntry(i);
117
118 sprintf(name,"LayClstPro");
119
120 for(int j=0; j<CLST_MAX; j++) {
121
122
124 }
125
126 }
127
128 for(int i=0; i<BOX_MAX; i++)
129 {
130 m_ptrIdTr->
SetBoxPos( i, &part, &segment, &layer );
131 tr_Lvl[1]->GetEntry(i);
132 tmpObject->
setBoxEff(box_eff, part, segment, layer);
133 tmpObject->
setBoxCnt(box_cnt, part, segment, layer);
134 tmpObject->
setBoxNos(box_nos, part, segment, layer);
136
137 sprintf(name,"BoxClstPro_B%d",i);
138
139 for(int j=0; j<CLST_MAX; j++) {
140
141
142 tmpObject->
setBoxClstPro(DEFAULT_CLST_PRO[j],part,segment,layer,j);
143 }
144
145 }
146
148 {
149 m_ptrIdTr->
SetStripPos( i, &part, &segment, &layer, &strip );
150 tr_Lvl[2]->GetEntry(i);
151 tmpObject->
setStripEff(str_eff, part, segment, layer, strip);
152 tmpObject->
setStripCnt(str_cnt, part, segment, layer, strip);
153 tmpObject->
setStripNos(str_nos, part, segment, layer, strip);
155
156 }
157 refpObject=tmpObject;
158
159 return StatusCode::SUCCESS;
160}
void setLayerClstPro(const double layerpro, int i, int j)
void setLayerNos(const double layernos, int i)
void setLayerCnt(const double layercnt, int i)
void setBoxCnt(const double boxcnt, int i, int j, int k)
void setStripNos(const double stripnos, int i, int j, int k, int l)
void setBoxNosRatio(const double boxratio, int i, int j, int k)
void setStripEff(const double stripeff, int i, int j, int k, int l)
void setStripNosRatio(const double stripnosratio, int i, int j, int k, int l)
void setStripCnt(const double stripcnt, int i, int j, int k, int l)
void setBoxEff(const double boxeff, int i, int j, int k)
void setBoxNos(const double boxnos, int i, int j, int k)
void setLayerEff(const double layereff, int i)
void setLayerNosRatio(const double layernosratio, int i)
void setBoxClstPro(const double boxpro, int i, int j, int k, int l)
StatusCode openRead(const std::string &fname)