13 jcalib = japp->GetJCalibration(run_number);
15 int Npoints = GetLorentzDeflections();
17 _DBG_<<
"Error getting JCalibration object for Lorentz corrections!"<<
28 this->jcalib = jcalib;
29 if(GetLorentzDeflections()==0){
30 _DBG_<<
"Error getting JCalibration object for Lorentz corrections!"<<
51 _DBG_<<
"ERROR - GetLorentzDefelections() called when jcalib not set!"<<endl;
52 _DBG_<<
"ERROR - Exiting ..."<<endl;
57 vector< map<string, float> > tvals;
58 jcalib->Get(
"FDC/lorentz_deflections", tvals);
60 _DBG_<<
"ERROR - GetLorentzDefelections() number of elements in calib DB"<<endl;
62 _DBG_<<
"ERROR - Exiting ..."<<endl;
67 jout<<
"Read "<<tvals.size()<<
" values from FDC/lorentz_deflections in calibDB"<<endl;
68 jout<<
" lorentz_deflections columns (alphabetical): ";
69 map<string,float>::iterator iter;
70 for(iter=tvals[0].begin(); iter!=tvals[0].end(); iter++)jout<<iter->first<<
" ";
75 for(
unsigned int i=0; i<tvals.size(); i++){
76 map<string, float> &row = tvals[i];
79 lorentz_x[xindex] = row[
"x"];
80 lorentz_z[zindex] = row[
"z"];
81 lorentz_nx[xindex][zindex] = row[
"nx"];
82 lorentz_nz[xindex][zindex] = row[
"nz"];
DLorentzMapCalibDB(JApplication *japp, unsigned int run_number=1)
unsigned int GetLorentzDeflections(void)