165 |
void CaloLevel0::InitDo(TSQLServer *dbc, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t isdeb, Bool_t isverb){ |
void CaloLevel0::InitDo(TSQLServer *dbc, UInt_t hs, Int_t &sgnl, TTree *l0tree, Bool_t isdeb, Bool_t isverb){ |
166 |
stringstream myquery; |
stringstream myquery; |
167 |
myquery.str(""); |
myquery.str(""); |
168 |
myquery << "SET time_zone='+0:00'"; |
myquery << "SET time_zone='+0:00';"; |
169 |
dbc->Query(myquery.str().c_str()); |
delete dbc->Query(myquery.str().c_str()); |
170 |
|
delete dbc->Query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';"); |
171 |
// |
// |
172 |
debug = isdeb; |
debug = isdeb; |
173 |
verbose = isverb; |
verbose = isverb; |
273 |
if ( !dbc->IsConnected() ) throw -116; |
if ( !dbc->IsConnected() ) throw -116; |
274 |
stringstream myquery; |
stringstream myquery; |
275 |
myquery.str(""); |
myquery.str(""); |
276 |
myquery << "SET time_zone='+0:00'"; |
myquery << "SET time_zone='+0:00';"; |
277 |
dbc->Query(myquery.str().c_str()); |
delete dbc->Query(myquery.str().c_str()); |
278 |
|
delete dbc->Query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';"); |
279 |
// |
// |
280 |
Int_t sig = this->ChkParamDo(dbc,runheader,mechal); |
Int_t sig = this->ChkParamDo(dbc,runheader,mechal); |
281 |
dbc->Close(); |
dbc->Close(); |
600 |
if ( !dbc->IsConnected() ) throw -116; |
if ( !dbc->IsConnected() ) throw -116; |
601 |
stringstream myquery; |
stringstream myquery; |
602 |
myquery.str(""); |
myquery.str(""); |
603 |
myquery << "SET time_zone='+0:00'"; |
myquery << "SET time_zone='+0:00';"; |
604 |
dbc->Query(myquery.str().c_str()); |
delete dbc->Query(myquery.str().c_str()); |
605 |
|
delete dbc->Query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';"); |
606 |
// |
// |
607 |
Int_t sig = CalcCrossTalkCorrDo(dbc,runheader,usetable); |
Int_t sig = CalcCrossTalkCorrDo(dbc,runheader,usetable); |
608 |
dbc->Close(); |
dbc->Close(); |
621 |
if ( !dbc->IsConnected() ) throw -116; |
if ( !dbc->IsConnected() ) throw -116; |
622 |
stringstream myquery; |
stringstream myquery; |
623 |
myquery.str(""); |
myquery.str(""); |
624 |
myquery << "SET time_zone='+0:00'"; |
myquery << "SET time_zone='+0:00';"; |
625 |
dbc->Query(myquery.str().c_str()); |
delete dbc->Query(myquery.str().c_str()); |
626 |
|
delete dbc->Query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';"); |
627 |
// |
// |
628 |
Int_t sig = CalcCrossTalkCorrDo(dbc,runheader,true); |
Int_t sig = CalcCrossTalkCorrDo(dbc,runheader,true); |
629 |
dbc->Close(); |
dbc->Close(); |
1218 |
val = 0; |
val = 0; |
1219 |
del = 1000; |
del = 1000; |
1220 |
if ( clevel2->trigty < 2. ){ |
if ( clevel2->trigty < 2. ){ |
1221 |
Bool_t ck = false; |
// Bool_t ck = false; |
1222 |
for (Int_t sec = 0; sec < 4; sec++){ |
for (Int_t sec = 0; sec < 4; sec++){ |
1223 |
val = (Int_t)de->calselftrig[sec][6]; |
val = (Int_t)de->calselftrig[sec][6]; |
1224 |
del = delay(val); |
del = delay(val); |
1225 |
if ( del < 1000 ){ |
if ( del < 1000 ){ |
1226 |
clevel2->wartrig = 0.; |
clevel2->wartrig = 0.; |
1227 |
clevel2->trigty = 3.; |
clevel2->trigty = 3.; |
1228 |
ck = true; |
// ck = true; |
1229 |
break; |
break; |
1230 |
}; |
}; |
1231 |
}; |
}; |
1246 |
Int_t se = 5; |
Int_t se = 5; |
1247 |
Int_t done = 0; |
Int_t done = 0; |
1248 |
Int_t pre = -1; |
Int_t pre = -1; |
1249 |
Bool_t isCOMP = false; |
// Bool_t isCOMP = false; |
1250 |
Bool_t isFULL = false; |
// Bool_t isFULL = false; |
1251 |
Bool_t isRAW = false; |
Bool_t isRAW = false; |
1252 |
Float_t ener; |
Float_t ener; |
1253 |
Int_t doneb = 0; |
Int_t doneb = 0; |
1296 |
// |
// |
1297 |
// determine what kind of event we are going to analyze |
// determine what kind of event we are going to analyze |
1298 |
// |
// |
1299 |
isCOMP = false; |
// isCOMP = false; |
1300 |
isFULL = false; |
// isFULL = false; |
1301 |
isRAW = false; |
isRAW = false; |
1302 |
if ( de->stwerr[se] & (1 << 16) ) isCOMP = true; |
// if ( de->stwerr[se] & (1 << 16) ) isCOMP = true; |
1303 |
if ( de->stwerr[se] & (1 << 17) ) isFULL = true; |
// if ( de->stwerr[se] & (1 << 17) ) isFULL = true; |
1304 |
if ( de->stwerr[se] & (1 << 3) ) isRAW = true; |
if ( de->stwerr[se] & (1 << 3) ) isRAW = true; |
1305 |
if ( !chdone[se] ){ |
if ( !chdone[se] ){ |
1306 |
// |
// |
1946 |
ClearTrkVar(); |
ClearTrkVar(); |
1947 |
} |
} |
1948 |
|
|
1949 |
|
void CaloLevel0::FillTrkVar(TClonesArray *tcl, Int_t nutrk){ |
1950 |
|
// |
1951 |
|
CaloTrkVar *t_ca = new CaloTrkVar(); |
1952 |
|
// |
1953 |
|
t_ca->trkseqno = trkseqno; |
1954 |
|
t_ca->ncore = (Int_t)clevel2->ncore; |
1955 |
|
t_ca->qcore = clevel2->qcore; |
1956 |
|
t_ca->noint = (Int_t)clevel2->noint; |
1957 |
|
t_ca->ncyl = (Int_t)clevel2->ncyl; |
1958 |
|
t_ca->qcyl = clevel2->qcyl; |
1959 |
|
t_ca->qtrack = clevel2->qtrack; |
1960 |
|
t_ca->qtrackx = clevel2->qtrackx; |
1961 |
|
t_ca->qtracky = clevel2->qtracky; |
1962 |
|
t_ca->dxtrack = clevel2->dxtrack; |
1963 |
|
t_ca->dytrack = clevel2->dytrack; |
1964 |
|
t_ca->qlast = clevel2->qlast; |
1965 |
|
t_ca->nlast = (Int_t)clevel2->nlast; |
1966 |
|
t_ca->qpre = clevel2->qpre; |
1967 |
|
t_ca->npre = (Int_t)clevel2->npre; |
1968 |
|
t_ca->qpresh = clevel2->qpresh; |
1969 |
|
t_ca->npresh = (Int_t)clevel2->npresh; |
1970 |
|
t_ca->qtr = clevel2->qtr; |
1971 |
|
t_ca->ntr = (Int_t)clevel2->ntr; |
1972 |
|
t_ca->planetot = (Int_t)clevel2->planetot; |
1973 |
|
t_ca->qmean = clevel2->qmean; |
1974 |
|
t_ca->dX0l = clevel2->dX0l; |
1975 |
|
t_ca->qlow = clevel2->qlow; |
1976 |
|
t_ca->nlow = (Int_t)clevel2->nlow; |
1977 |
|
// |
1978 |
|
memcpy(t_ca->tibar,clevel2->tibar,sizeof(clevel2->tibar)); |
1979 |
|
memcpy(t_ca->tbar,clevel2->tbar,sizeof(clevel2->tbar)); |
1980 |
|
// |
1981 |
|
// |
1982 |
|
TClonesArray &t = *tcl; |
1983 |
|
new(t[nutrk]) CaloTrkVar(*t_ca); |
1984 |
|
// |
1985 |
|
delete t_ca; |
1986 |
|
// |
1987 |
|
ClearTrkVar(); |
1988 |
|
} |
1989 |
|
|
1990 |
void CaloLevel0::GetCommonVar(){ |
void CaloLevel0::GetCommonVar(){ |
1991 |
calol2cm(); |
calol2cm(); |
1992 |
} |
} |
2193 |
if ( !dbc->IsConnected() ) throw -116; |
if ( !dbc->IsConnected() ) throw -116; |
2194 |
stringstream myquery; |
stringstream myquery; |
2195 |
myquery.str(""); |
myquery.str(""); |
2196 |
myquery << "SET time_zone='+0:00'"; |
myquery << "SET time_zone='+0:00';"; |
2197 |
dbc->Query(myquery.str().c_str()); |
delete dbc->Query(myquery.str().c_str()); |
2198 |
|
delete dbc->Query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';"); |
2199 |
Int_t sgnl = 0; |
Int_t sgnl = 0; |
2200 |
// |
// |
2201 |
GL_CALO_CALIB *glcalo = new GL_CALO_CALIB(); |
GL_CALO_CALIB *glcalo = new GL_CALO_CALIB(); |