MeasuredEcmsSvc Class Reference

#include <MeasuredEcmsSvc.h>

Inheritance diagram for MeasuredEcmsSvc:

IMeasuredEcmsSvc List of all members.

Public Member Functions

 MeasuredEcmsSvc (const std::string &name, ISvcLocator *svcLoc)
virtual ~MeasuredEcmsSvc ()
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvIF)
virtual StatusCode initialize ()
virtual StatusCode finalize ()
void handle (const Incident &)
void readMeasuredEcms (int runNo)
void readRunParams (int runNo)
void readDB (int runNo)
int getSampleName (int runNo)
int getRunFrom (int runNo)
int getRunTo (int runNo)
bool isRunNoValid (int runNo)
double getEcms (int runNo)
double getEcmsErr (int runNo)
double getAveEcms (int runNo)
double getAveEcmsErr (int runNo)
double getPx (int runNo)
double getPy (int runNo)
double getPz (int runNo)
void readInfo (int runNo, char *tab, char *col)
double getInfo (int runNo, char *tab, char *col)
bool isReadDBValid (int runNo, char *tab, char *col)
void readInfo (int runNo)
double getInfo (int runNo)
bool isReadDBValid (int runNo)

Static Public Member Functions

static const InterfaceID & interfaceID ()

Private Attributes

int RunParamsMin
int RunParamsMax
int MeasuredEcmsMin
int MeasuredEcmsMax
IDatabaseSvcm_dbSvc
IDataProviderSvc * m_eventSvc
int m_sampleName
int m_runFrom
int m_runTo
double m_ecms
double m_ecmsErr
double m_aveEcms
double m_aveEcmsErr
double m_info
bool m_runNoValid
bool m_callRead
bool m_recallRead
double m_px
double m_py
double m_pz
std::string table
std::string column

Friends

class CnvFactory< MeasuredEcmsSvc >

Detailed Description

Definition at line 9 of file MeasuredEcmsSvc.h.


Constructor & Destructor Documentation

MeasuredEcmsSvc::MeasuredEcmsSvc ( const std::string name,
ISvcLocator *  svcLoc 
)

Definition at line 4 of file MeasuredEcmsSvc.cxx.

References column, MeasuredEcmsMax, MeasuredEcmsMin, RunParamsMax, RunParamsMin, and table.

00004                                                                           :Service(name, svcLoc){
00005         declareProperty("RunParamsMin", RunParamsMin=11414);
00006         declareProperty("RunParamsMax", RunParamsMax=23454);
00007         declareProperty("MeasuredEcmsMin", MeasuredEcmsMin=23463);
00008         declareProperty("MeasuredEcmsMax", MeasuredEcmsMax=38140);
00009         declareProperty("TableName", table="RunParams");
00010         declareProperty("ColumnName", column="beam_energy");
00011 }

MeasuredEcmsSvc::~MeasuredEcmsSvc (  )  [virtual]

Definition at line 13 of file MeasuredEcmsSvc.cxx.

00013 {}


Member Function Documentation

StatusCode MeasuredEcmsSvc::finalize (  )  [virtual]

Definition at line 41 of file MeasuredEcmsSvc.cxx.

References calibUtil::ERROR, Bes_Common::INFO, and msgSvc().

00041                                     {
00042   MsgStream log(msgSvc(), name());
00043   log<<MSG::INFO<<"MeasuredEcmsSvc finalize begin here"<<endreq;
00044   StatusCode status= Service::finalize();
00045   if(!status.isSuccess()){
00046     log<<MSG::ERROR<<"MeasuredEcmsSvc Can not finalize"<<endreq;
00047     return status;
00048   }
00049   log<<MSG::INFO<<"MeasuredEcmsSvc finalized successfully"<<endreq;
00050   return StatusCode::SUCCESS;
00051 }

double MeasuredEcmsSvc::getAveEcms ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 274 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_aveEcms, m_callRead, m_recallRead, msgSvc(), and readDB().

00274                                            {
00275   MsgStream log(msgSvc(), name());
00276   log<<MSG::INFO<<"MeasuredEcmsSvc read the average ecms"<<endreq;
00277         if(m_recallRead&&m_callRead){
00278     readDB(runNo);
00279     m_recallRead=false;
00280   }
00281   return m_aveEcms;
00282 }

double MeasuredEcmsSvc::getAveEcmsErr ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 284 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_aveEcmsErr, m_callRead, m_recallRead, msgSvc(), and readDB().

00284                                               {
00285   MsgStream log(msgSvc(), name());
00286   log<<MSG::INFO<<"MeasuredEcmsSvc read the error of the average ecms"<<endreq;
00287   if(m_recallRead&&m_callRead){
00288                 readDB(runNo);
00289                 m_recallRead=false;
00290         }
00291   return m_aveEcmsErr;
00292 }

double MeasuredEcmsSvc::getEcms ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 223 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_ecms, m_recallRead, msgSvc(), and readDB().

00223                                         {
00224   MsgStream log(msgSvc(), name());
00225   log<<MSG::INFO<<"MeasuredEcmsSvc read the ecms"<<endreq;
00226         if(m_recallRead&&m_callRead){
00227     readDB(runNo);
00228     m_recallRead=false;
00229   }
00230   return m_ecms;
00231 }

double MeasuredEcmsSvc::getEcmsErr ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 264 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_ecmsErr, m_recallRead, msgSvc(), and readDB().

00264                                            {
00265   MsgStream log(msgSvc(), name());
00266   log<<MSG::INFO<<"MeasuredEcmsSvc read the error of ecms"<<endreq;
00267         if(m_recallRead&&m_callRead){
00268     readDB(runNo);
00269     m_recallRead=false;
00270   }
00271   return m_ecmsErr;
00272 }

double MeasuredEcmsSvc::getInfo ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 180 of file MeasuredEcmsSvc.cxx.

References column, Bes_Common::INFO, m_callRead, m_info, m_recallRead, msgSvc(), readInfo(), and table.

00180                                         {
00181         char tab[100];
00182   char col[100];
00183   strcpy(tab, table.c_str());
00184   strcpy(col, column.c_str());
00185   MsgStream log(msgSvc(), name());
00186   log<<MSG::INFO<<"MeasuredEcmsSvc read the "<<tab<<"-"<<col<<endreq;
00187   if(m_recallRead&&m_callRead){
00188     readInfo(runNo);
00189   }
00190   return m_info;
00191 }

double MeasuredEcmsSvc::getInfo ( int  runNo,
char *  tab,
char *  col 
) [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 171 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_info, m_recallRead, msgSvc(), and readInfo().

00171                                                               {
00172         MsgStream log(msgSvc(), name());
00173   log<<MSG::INFO<<"MeasuredEcmsSvc read the "<<tab<<"-"<<col<<endreq;
00174         if(m_recallRead&&m_callRead){
00175                 readInfo(runNo, tab, col);
00176         }
00177         return m_info;
00178 }

double MeasuredEcmsSvc::getPx ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 233 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_px, m_recallRead, msgSvc(), and readDB().

00233                                       {
00234         MsgStream log(msgSvc(), name());
00235   log<<MSG::INFO<<"MeasuredEcmsSvc read the ecms"<<endreq;
00236         if(m_recallRead&&m_callRead){
00237     readDB(runNo);
00238     m_recallRead=false;
00239   }
00240   return m_px;
00241 }

double MeasuredEcmsSvc::getPy ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 244 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_py, m_recallRead, msgSvc(), and readDB().

00244                                       {
00245   MsgStream log(msgSvc(), name());
00246   log<<MSG::INFO<<"MeasuredEcmsSvc read the ecms"<<endreq;
00247   if(m_recallRead&&m_callRead){
00248     readDB(runNo);
00249     m_recallRead=false;
00250   }
00251   return m_py;
00252 }

double MeasuredEcmsSvc::getPz ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 254 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_pz, m_recallRead, msgSvc(), and readDB().

00254                                       {
00255   MsgStream log(msgSvc(), name());
00256   log<<MSG::INFO<<"MeasuredEcmsSvc read the ecms"<<endreq;
00257   if(m_recallRead&&m_callRead){
00258     readDB(runNo);
00259     m_recallRead=false;
00260   }
00261   return m_pz;
00262 }

int MeasuredEcmsSvc::getRunFrom ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 203 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_recallRead, m_runFrom, msgSvc(), and readDB().

00203                                         {
00204   MsgStream log(msgSvc(), name());
00205   log<<MSG::INFO<<"MeasuredEcmsSvc read the RunFrom"<<endreq;
00206         if(m_recallRead&&m_callRead){
00207     readDB(runNo);
00208     m_recallRead=false;
00209   }
00210   return m_runFrom;
00211 }

int MeasuredEcmsSvc::getRunTo ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 213 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_recallRead, m_runTo, msgSvc(), and readDB().

00213                                       {
00214   MsgStream log(msgSvc(), name());
00215   log<<MSG::INFO<<"MeasuredEcmsSvc read the RunTo"<<endreq;
00216         if(m_recallRead&&m_callRead){
00217     readDB(runNo);
00218     m_recallRead=false;
00219   }
00220   return m_runTo;
00221 }

int MeasuredEcmsSvc::getSampleName ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 193 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_recallRead, m_sampleName, msgSvc(), and readDB().

00193                                            {
00194   MsgStream log(msgSvc(), name());
00195   log<<MSG::INFO<<"MeasuredEcmsSvc read the sample name"<<endreq;
00196         if(m_recallRead&&m_callRead){
00197     readDB(runNo);
00198     m_recallRead=false;
00199   }
00200   return m_sampleName;
00201 }

void MeasuredEcmsSvc::handle ( const Incident &   ) 

Definition at line 60 of file MeasuredEcmsSvc.cxx.

References Bes_Common::DEBUG, Bes_Common::INFO, m_aveEcms, m_aveEcmsErr, m_callRead, m_ecms, m_ecmsErr, m_info, m_px, m_py, m_pz, m_recallRead, m_runFrom, m_runNoValid, m_runTo, and m_sampleName.

00060                                                {
00061   MsgStream log(messageService(), name());
00062   log<<MSG::DEBUG<<"handle: "<<inc.type()<<endreq;
00063         m_callRead=false; m_recallRead=true;
00064   if(inc.type()=="NewRun"){
00065     log<<MSG::INFO<<"RunNo is new, call the readMeasuredEcms again"<<endreq;
00066     m_callRead=true;
00067                 m_sampleName=0; m_ecms=0; m_ecmsErr=0;
00068                 m_aveEcms=0; m_aveEcmsErr=0; m_runFrom=0;
00069                 m_runTo=0; m_runNoValid=false;
00070                 m_px=0; m_py=0; m_pz=0;
00071                 m_info=0;
00072   }
00073 }

StatusCode MeasuredEcmsSvc::initialize (  )  [virtual]

Definition at line 15 of file MeasuredEcmsSvc.cxx.

References calibUtil::ERROR, Bes_Common::INFO, m_dbSvc, m_eventSvc, and msgSvc().

00015                                       {
00016   MsgStream log(msgSvc(), name());
00017   log<<MSG::INFO<<"MeasuredEcmsSvc initialize begin here"<<endreq;
00018   StatusCode status=Service::initialize();
00019   if(!status.isSuccess()){
00020     log<<MSG::ERROR<<"MeasuredEcmsSvc Can not initialize"<<endreq;
00021     return status;
00022   }
00023   IIncidentSvc* incsvc;
00024   status=service("IncidentSvc", incsvc);
00025   int priority = 100;
00026   if(status.isSuccess()) incsvc->addListener(this, "NewRun", priority);
00027   status=serviceLocator()->service("DatabaseSvc", m_dbSvc, true);
00028   if(!status.isSuccess()){
00029     log<<MSG::ERROR<<"MeasuredEcmsSvc Unable to find DatabaseSvc"<<endreq;
00030     return status;
00031   }
00032   status=serviceLocator()->service("EventDataSvc", m_eventSvc, true);
00033   if(!status.isSuccess()){
00034     log<<MSG::ERROR<<"MeasuredEcmsSvc Unable to find EventDataSvc "<<endreq;
00035     return status;
00036   }
00037   log<<MSG::INFO<<"MeasuredEcmsSvc initialized successfully"<<endreq;
00038   return StatusCode::SUCCESS;
00039 }

static const InterfaceID& IMeasuredEcmsSvc::interfaceID (  )  [inline, static, inherited]

Definition at line 32 of file IMeasuredEcmsSvc.h.

References IID_IMeasuredEcmsSvc().

Referenced by queryInterface().

00032 { return IID_IMeasuredEcmsSvc; }

bool MeasuredEcmsSvc::isReadDBValid ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 304 of file MeasuredEcmsSvc.cxx.

References column, Bes_Common::INFO, m_callRead, m_recallRead, m_runNoValid, msgSvc(), readInfo(), and table.

00304                                             {
00305         char tab[100];
00306   char col[100];
00307   strcpy(tab, table.c_str());
00308   strcpy(col, column.c_str());
00309         MsgStream log(msgSvc(), name());
00310   log<<MSG::INFO<<"MeasuredEcmsSvc judge the valid of "<<tab<<"-"<<col<<endreq;
00311   if(m_callRead){
00312     readInfo(runNo);
00313     m_recallRead=false;
00314   }
00315   return m_runNoValid;
00316 }

bool MeasuredEcmsSvc::isReadDBValid ( int  runNo,
char *  tab,
char *  col 
) [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 294 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_recallRead, m_runNoValid, msgSvc(), and readInfo().

00294                                                                   {
00295   MsgStream log(msgSvc(), name());
00296   log<<MSG::INFO<<"MeasuredEcmsSvc judge the valid of "<<tab<<"-"<<col<<endreq;
00297   if(m_callRead){
00298     readInfo(runNo, tab, col);
00299     m_recallRead=false;
00300   }
00301   return m_runNoValid;
00302 }

bool MeasuredEcmsSvc::isRunNoValid ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 318 of file MeasuredEcmsSvc.cxx.

References Bes_Common::INFO, m_callRead, m_recallRead, m_runNoValid, msgSvc(), and readDB().

00318                                            {
00319   MsgStream log(msgSvc(), name());
00320   log<<MSG::INFO<<"MeasuredEcmsSvc judge the valid of runNo"<<endreq;
00321   if(m_callRead){
00322                 readDB(runNo);
00323                 m_recallRead=false;
00324         }
00325   return m_runNoValid;
00326 }

StatusCode MeasuredEcmsSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvIF 
) [virtual]

Definition at line 53 of file MeasuredEcmsSvc.cxx.

References IMeasuredEcmsSvc::interfaceID().

00053                                                                                {
00054   if(IMeasuredEcmsSvc::interfaceID().versionMatch(riid)) *ppvIF = dynamic_cast<IMeasuredEcmsSvc*>(this);
00055   else return Service::queryInterface(riid, ppvIF);
00056   addRef();
00057   return StatusCode::SUCCESS;
00058 }

void MeasuredEcmsSvc::readDB ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 166 of file MeasuredEcmsSvc.cxx.

References abs, MeasuredEcmsMax, MeasuredEcmsMin, readMeasuredEcms(), readRunParams(), RunParamsMax, and RunParamsMin.

Referenced by getAveEcms(), getAveEcmsErr(), getEcms(), getEcmsErr(), getPx(), getPy(), getPz(), getRunFrom(), getRunTo(), getSampleName(), and isRunNoValid().

00166                                      {
00167         if(std::abs(runNo)>=RunParamsMin&&std::abs(runNo)<=RunParamsMax) readRunParams(runNo);
00168         if(std::abs(runNo)>=MeasuredEcmsMin&&std::abs(runNo)<=MeasuredEcmsMax) readMeasuredEcms(runNo);
00169 }

void MeasuredEcmsSvc::readInfo ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 143 of file MeasuredEcmsSvc.cxx.

References abs, column, calibUtil::ERROR, DatabaseRecord::GetDouble(), Bes_Common::INFO, m_dbSvc, m_info, m_runNoValid, msgSvc(), IDatabaseSvc::query(), and table.

00143                                        {
00144         char tab[100];
00145         char col[100];
00146         strcpy(tab, table.c_str());
00147         strcpy(col, column.c_str());
00148   MsgStream log(msgSvc(), name());
00149   log<<MSG::INFO<<"MeasuredEcmsSvc begin read database "<<tab<<"-"<<col<<endreq;
00150   int runNum=std::abs(runNo);
00151   if(runNo<0) log<<MSG::INFO<<"MeasuredEcmsSvc for MC events"<<endreq;
00152   else log<<MSG::INFO<<"MeasuredEcmsSvc for DT events"<<endreq;
00153   char stmt1[500];
00154   snprintf(stmt1, 1024, "select %s from %s where run_number = %d", col, tab, runNum);
00155   DatabaseRecordVector res;
00156   int row_no = m_dbSvc->query("offlinedb", stmt1, res);
00157   if(row_no==0){log<<MSG::ERROR<<"RowNo can not be 0 for "<<tab<<", failed to read DB"<<endreq;}
00158   else{
00159     DatabaseRecord* records = res[0];
00160     log<<MSG::INFO<<"MeasuredEcmsSvc first read the runNo, read the "<<tab<<" database "<<runNo<<endreq;
00161     m_info=records->GetDouble(col);
00162     m_runNoValid=true;
00163   }
00164 }

void MeasuredEcmsSvc::readInfo ( int  runNo,
char *  tab,
char *  col 
) [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 124 of file MeasuredEcmsSvc.cxx.

References abs, calibUtil::ERROR, DatabaseRecord::GetDouble(), Bes_Common::INFO, m_dbSvc, m_info, m_runNoValid, msgSvc(), and IDatabaseSvc::query().

Referenced by getInfo(), and isReadDBValid().

00124                                                              {
00125         MsgStream log(msgSvc(), name());
00126   log<<MSG::INFO<<"MeasuredEcmsSvc begin read database "<<tab<<"-"<<col<<endreq;
00127         int runNum=std::abs(runNo);
00128         if(runNo<0) log<<MSG::INFO<<"MeasuredEcmsSvc for MC events"<<endreq;
00129   else log<<MSG::INFO<<"MeasuredEcmsSvc for DT events"<<endreq;
00130         char stmt1[400];
00131   snprintf(stmt1, 1024, "select %s from %s where run_number = %d", col, tab, runNum);
00132   DatabaseRecordVector res;
00133         int row_no = m_dbSvc->query("offlinedb", stmt1, res);
00134   if(row_no==0){log<<MSG::ERROR<<"RowNo can not be 0 for "<<tab<<", failed to read DB"<<endreq;}
00135         else{
00136     DatabaseRecord* records = res[0];
00137     log<<MSG::INFO<<"MeasuredEcmsSvc first read the runNo, read the "<<tab<<" database "<<runNo<<endreq;
00138     m_info=records->GetDouble(col);
00139                 m_runNoValid=true;
00140   }
00141 }

void MeasuredEcmsSvc::readMeasuredEcms ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 75 of file MeasuredEcmsSvc.cxx.

References abs, calibUtil::ERROR, DatabaseRecord::GetDouble(), Bes_Common::INFO, m_aveEcms, m_aveEcmsErr, m_dbSvc, m_ecms, m_ecmsErr, m_runFrom, m_runNoValid, m_runTo, m_sampleName, msgSvc(), and IDatabaseSvc::query().

Referenced by readDB().

00075                                                {
00076   MsgStream log(msgSvc(), name());
00077   log<<MSG::INFO<<"MeasuredEcmsSvc begin read database MeasuredEcmsSvc"<<endreq;
00078   int runNum=std::abs(runNo);
00079   if(runNo<0) log<<MSG::INFO<<"MeasuredEcmsSvc for MC events"<<endreq;
00080   else log<<MSG::INFO<<"MeasuredEcmsSvc for DT events"<<endreq;
00081   char stmt[400];
00082   snprintf(stmt, 1024, "select sample, RunFrom, RunTo, Ecms, Ecms_err, Ave_Ecms, Ave_Ecms_err from MeasuredEcms2 where RunFrom <= %d and RunTo >= %d", runNum, runNum);
00083   DatabaseRecordVector res;
00084   int rowNo=m_dbSvc->query("offlinedb", stmt, res);
00085   if(rowNo==0){ log<<MSG::ERROR<<"RowNo can not be 0 for MeasuredEcmsSvc, failed to read DB"<<endreq; }
00086   else{
00087     DatabaseRecord* records=res[0];
00088     log<<MSG::INFO<<"MeasuredEcmsSvc first read the runNo, read the MeasuredEcms database"<<runNo<<endreq;
00089     m_runFrom=records->GetDouble("RunFrom");
00090     m_runTo=records->GetDouble("RunTo");
00091     m_sampleName=records->GetDouble("sample");
00092     m_ecms=records->GetDouble("Ecms");
00093     m_ecmsErr=records->GetDouble("Ecms_err");
00094     m_aveEcms=records->GetDouble("Ave_Ecms");
00095     m_aveEcmsErr=records->GetDouble("Ave_Ecms_err");
00096     m_runNoValid=true;
00097   }
00098 }

void MeasuredEcmsSvc::readRunParams ( int  runNo  )  [virtual]

Implements IMeasuredEcmsSvc.

Definition at line 100 of file MeasuredEcmsSvc.cxx.

References abs, calibUtil::ERROR, DatabaseRecord::GetDouble(), Bes_Common::INFO, m_dbSvc, m_ecms, m_px, m_py, m_pz, m_runNoValid, msgSvc(), and IDatabaseSvc::query().

Referenced by readDB().

00100                                             {
00101         MsgStream log(msgSvc(), name());
00102   log<<MSG::INFO<<"MeasuredEcmsSvc begin read database RunParams"<<endreq;
00103         int runNum=std::abs(runNo);
00104   if(runNo<0) log<<MSG::INFO<<"MeasuredEcmsSvc for MC events"<<endreq;
00105   else log<<MSG::INFO<<"MeasuredEcmsSvc for DT events"<<endreq;
00106         char stmt1[400];
00107   snprintf(stmt1, 1024, "select beam_energy, px, py, pz from RunParams where run_number = %d", runNum);
00108   DatabaseRecordVector res;
00109   int row_no = m_dbSvc->query("offlinedb", stmt1, res);
00110   if(row_no==0){log<<MSG::ERROR<<"RowNo can not be 0 for RunParams, failed to read DB"<<endreq;}
00111   else{
00112                 DatabaseRecord* records = res[0];
00113                 log<<MSG::INFO<<"MeasuredEcmsSvc first read the runNo, read the  RunParams database"<<runNo<<endreq;
00114     double bE=0;
00115     bE=records->GetDouble("beam_energy");
00116     m_px=records->GetDouble("px");
00117     m_py=records->GetDouble("py");
00118     m_pz=records->GetDouble("pz");
00119     m_ecms=bE*2.00;
00120                 m_runNoValid=true;
00121         }
00122 }


Friends And Related Function Documentation

friend class CnvFactory< MeasuredEcmsSvc > [friend]

Definition at line 10 of file MeasuredEcmsSvc.h.


Member Data Documentation

std::string MeasuredEcmsSvc::column [private]

Definition at line 63 of file MeasuredEcmsSvc.h.

Referenced by getInfo(), isReadDBValid(), MeasuredEcmsSvc(), and readInfo().

double MeasuredEcmsSvc::m_aveEcms [private]

Definition at line 58 of file MeasuredEcmsSvc.h.

Referenced by getAveEcms(), handle(), and readMeasuredEcms().

double MeasuredEcmsSvc::m_aveEcmsErr [private]

Definition at line 58 of file MeasuredEcmsSvc.h.

Referenced by getAveEcmsErr(), handle(), and readMeasuredEcms().

bool MeasuredEcmsSvc::m_callRead [private]

Definition at line 60 of file MeasuredEcmsSvc.h.

Referenced by getAveEcms(), getAveEcmsErr(), getEcms(), getEcmsErr(), getInfo(), getPx(), getPy(), getPz(), getRunFrom(), getRunTo(), getSampleName(), handle(), isReadDBValid(), and isRunNoValid().

IDatabaseSvc* MeasuredEcmsSvc::m_dbSvc [private]

Definition at line 55 of file MeasuredEcmsSvc.h.

Referenced by initialize(), readInfo(), readMeasuredEcms(), and readRunParams().

double MeasuredEcmsSvc::m_ecms [private]

Definition at line 58 of file MeasuredEcmsSvc.h.

Referenced by getEcms(), handle(), readMeasuredEcms(), and readRunParams().

double MeasuredEcmsSvc::m_ecmsErr [private]

Definition at line 58 of file MeasuredEcmsSvc.h.

Referenced by getEcmsErr(), handle(), and readMeasuredEcms().

IDataProviderSvc* MeasuredEcmsSvc::m_eventSvc [private]

Definition at line 56 of file MeasuredEcmsSvc.h.

Referenced by initialize().

double MeasuredEcmsSvc::m_info [private]

Definition at line 59 of file MeasuredEcmsSvc.h.

Referenced by getInfo(), handle(), and readInfo().

double MeasuredEcmsSvc::m_px [private]

Definition at line 61 of file MeasuredEcmsSvc.h.

Referenced by getPx(), handle(), and readRunParams().

double MeasuredEcmsSvc::m_py [private]

Definition at line 61 of file MeasuredEcmsSvc.h.

Referenced by getPy(), handle(), and readRunParams().

double MeasuredEcmsSvc::m_pz [private]

Definition at line 61 of file MeasuredEcmsSvc.h.

Referenced by getPz(), handle(), and readRunParams().

bool MeasuredEcmsSvc::m_recallRead [private]

Definition at line 60 of file MeasuredEcmsSvc.h.

Referenced by getAveEcms(), getAveEcmsErr(), getEcms(), getEcmsErr(), getInfo(), getPx(), getPy(), getPz(), getRunFrom(), getRunTo(), getSampleName(), handle(), isReadDBValid(), and isRunNoValid().

int MeasuredEcmsSvc::m_runFrom [private]

Definition at line 57 of file MeasuredEcmsSvc.h.

Referenced by getRunFrom(), handle(), and readMeasuredEcms().

bool MeasuredEcmsSvc::m_runNoValid [private]

Definition at line 60 of file MeasuredEcmsSvc.h.

Referenced by handle(), isReadDBValid(), isRunNoValid(), readInfo(), readMeasuredEcms(), and readRunParams().

int MeasuredEcmsSvc::m_runTo [private]

Definition at line 57 of file MeasuredEcmsSvc.h.

Referenced by getRunTo(), handle(), and readMeasuredEcms().

int MeasuredEcmsSvc::m_sampleName [private]

Definition at line 57 of file MeasuredEcmsSvc.h.

Referenced by getSampleName(), handle(), and readMeasuredEcms().

int MeasuredEcmsSvc::MeasuredEcmsMax [private]

Definition at line 53 of file MeasuredEcmsSvc.h.

Referenced by MeasuredEcmsSvc(), and readDB().

int MeasuredEcmsSvc::MeasuredEcmsMin [private]

Definition at line 53 of file MeasuredEcmsSvc.h.

Referenced by MeasuredEcmsSvc(), and readDB().

int MeasuredEcmsSvc::RunParamsMax [private]

Definition at line 51 of file MeasuredEcmsSvc.h.

Referenced by MeasuredEcmsSvc(), and readDB().

int MeasuredEcmsSvc::RunParamsMin [private]

Definition at line 51 of file MeasuredEcmsSvc.h.

Referenced by MeasuredEcmsSvc(), and readDB().

std::string MeasuredEcmsSvc::table [private]

Definition at line 62 of file MeasuredEcmsSvc.h.

Referenced by getInfo(), isReadDBValid(), MeasuredEcmsSvc(), and readInfo().


Generated on Tue Nov 29 23:20:25 2016 for BOSS_7.0.2 by  doxygen 1.4.7