/[PAMELA software]/DarthVader/CalorimeterLevel2/src/CaloLevel0.cpp
ViewVC logotype

Diff of /DarthVader/CalorimeterLevel2/src/CaloLevel0.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34 by mocchiut, Thu Jan 16 15:29:08 2014 UTC revision 1.37 by mocchiut, Tue Oct 14 14:07:10 2014 UTC
# Line 165  void CaloLevel0::ProcessingInit(GL_TABLE Line 165  void CaloLevel0::ProcessingInit(GL_TABLE
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;
# Line 272  Int_t CaloLevel0::ChkParam(GL_TABLES *gl Line 273  Int_t CaloLevel0::ChkParam(GL_TABLES *gl
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();
# Line 598  Int_t CaloLevel0::CalcCrossTalkCorr(GL_T Line 600  Int_t CaloLevel0::CalcCrossTalkCorr(GL_T
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();
# Line 618  Int_t CaloLevel0::CalcCrossTalkCorr(GL_T Line 621  Int_t CaloLevel0::CalcCrossTalkCorr(GL_T
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();
# Line 1942  void CaloLevel0::FillTrkVar(CaloLevel2 * Line 1946  void CaloLevel0::FillTrkVar(CaloLevel2 *
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  }  }
# Line 2148  Int_t CaloLevel0::Update(GL_TABLES *glt, Line 2193  Int_t CaloLevel0::Update(GL_TABLES *glt,
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();

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.23