/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
DaqRunInfoSvc Class Reference

#include <DaqRunInfoSvc.h>

Inheritance diagram for DaqRunInfoSvc:
Inheritance graph
[legend]
Collaboration diagram for DaqRunInfoSvc:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DaqRunInfoSvc (const string &name, ISvcLocator *svc)
virtual StatusCode initialize ()
virtual StatusCode finalize ()
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
int runNumber (const string fileName)
const DaqRawDataFileInfoGetFileInfo (const string filename)
const DaqRunInfoGetRunInfo (const int runNo)
const DaqCalibRunInfoGetCalibRunInfo (const int runNo)
const DaqCalibRunInfoVectorGetCalibRunInfoVector (const int runNo)
int dbRecordVector (const int runNo, DatabaseRecordVector &vec)
int fullRunConfigList (const int runNo, vector< DayaBay::DaqRunConfig > &vec)
int simpRunConfigList (const int runNo, vector< DayaBay::DaqRunConfig > &vec)
int findHWList (vector< DayaBay::DaqRunConfig > cV, vector< string > &dets, vector< string > &crates, vector< string > &ltbs, vector< string > &fees)
int findFEEThreshold (string runType, vector< DayaBay::DaqRunConfig > cv, vector< string > fees, map< string, string > &th_obj, map< string, bool > &isuni, map< string, int > &thres_uni, map< string, map< string, int > > &thres)
int findLtbTrigger (string runType, vector< DayaBay::DaqRunConfig > cv, vector< string > ltbs, map< string, string > &mode, map< string, int > &source, map< string, string > &trig_name, map< string, map< string, int > > &trig_thres)
string GetRunType (const int runNo)

Static Public Member Functions

static const InterfaceID & interfaceID ()

Private Member Functions

int findHWList (DatabaseRecordVector dbRV, vector< string > &dets, vector< string > &crates, vector< string > &ltbs, vector< string > &fees)
int stringInVector (string str, vector< string > vec)

Private Attributes

IDatabaseSvcm_dbSvc
string m_dbSvcName
string m_dbName
list __all__ = ['DaqRunInfoSvcConf']

Detailed Description

Definition at line 15 of file DaqRunInfoSvc.h.


Constructor & Destructor Documentation

DaqRunInfoSvc::DaqRunInfoSvc ( const string &  name,
ISvcLocator *  svc 
)

Definition at line 22 of file DaqRunInfoSvc.cc.

:Service(name, svc), m_dbSvc(0) 
{
  declareProperty("DatabaseSvcName", m_dbSvcName="DatabaseSvc",
                 "Name of service which provides the interface to mysql");
}

Member Function Documentation

virtual StatusCode DaqRunInfoSvc::initialize ( ) [virtual]
virtual StatusCode DaqRunInfoSvc::finalize ( ) [virtual]
StatusCode DaqRunInfoSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
) [virtual]

Definition at line 59 of file DaqRunInfoSvc.cc.

{
  StatusCode sc = StatusCode::FAILURE;
  if (ppvInterface) {
    *ppvInterface = 0;

    if (IDaqRunInfoSvc::interfaceID().versionMatch(riid)) {
      *ppvInterface = static_cast<IDaqRunInfoSvc*>(this);
      sc = StatusCode::SUCCESS;
      addRef();
    }
    else sc = Service::queryInterface( riid, ppvInterface );
  }
  return sc;
}
int DaqRunInfoSvc::runNumber ( const string  fileName) [virtual]

Implements IDaqRunInfoSvc.

const DaqRawDataFileInfo* DaqRunInfoSvc::GetFileInfo ( const string  filename) [virtual]

Implements IDaqRunInfoSvc.

const DaqRunInfo* DaqRunInfoSvc::GetRunInfo ( const int  runNo) [virtual]

Implements IDaqRunInfoSvc.

const DaqCalibRunInfo* DaqRunInfoSvc::GetCalibRunInfo ( const int  runNo) [virtual]

Implements IDaqRunInfoSvc.

const DaqCalibRunInfoVector* DaqRunInfoSvc::GetCalibRunInfoVector ( const int  runNo) [virtual]

Implements IDaqRunInfoSvc.

int DaqRunInfoSvc::dbRecordVector ( const int  runNo,
DatabaseRecordVector vec 
) [virtual]

Implements IDaqRunInfoSvc.

int DaqRunInfoSvc::fullRunConfigList ( const int  runNo,
vector< DayaBay::DaqRunConfig > &  vec 
) [virtual]

Implements IDaqRunInfoSvc.

int DaqRunInfoSvc::simpRunConfigList ( const int  runNo,
vector< DayaBay::DaqRunConfig > &  vec 
) [virtual]

Implements IDaqRunInfoSvc.

int DaqRunInfoSvc::findHWList ( vector< DayaBay::DaqRunConfig cV,
vector< string > &  dets,
vector< string > &  crates,
vector< string > &  ltbs,
vector< string > &  fees 
) [virtual]

Implements IDaqRunInfoSvc.

int DaqRunInfoSvc::findFEEThreshold ( string  runType,
vector< DayaBay::DaqRunConfig cv,
vector< string >  fees,
map< string, string > &  th_obj,
map< string, bool > &  isuni,
map< string, int > &  thres_uni,
map< string, map< string, int > > &  thres 
) [virtual]

Implements IDaqRunInfoSvc.

int DaqRunInfoSvc::findLtbTrigger ( string  runType,
vector< DayaBay::DaqRunConfig cv,
vector< string >  ltbs,
map< string, string > &  mode,
map< string, int > &  source,
map< string, string > &  trig_name,
map< string, map< string, int > > &  trig_thres 
) [virtual]

Implements IDaqRunInfoSvc.

string DaqRunInfoSvc::GetRunType ( const int  runNo) [virtual]

Implements IDaqRunInfoSvc.

int DaqRunInfoSvc::findHWList ( DatabaseRecordVector  dbRV,
vector< string > &  dets,
vector< string > &  crates,
vector< string > &  ltbs,
vector< string > &  fees 
) [private]

Definition at line 466 of file DaqRunInfoSvc.cc.

{
  DatabaseRecordVector::iterator itr;
  for( itr = dbRV.begin(); itr != dbRV.end(); itr++){
    if( (*itr)["className"] == "ROSConfiguration" && (*itr)["name"] == "childObjectId_Detectors" )
      dets.push_back((*itr)["stringValue"]);
  }
  for( itr = dbRV.begin(); itr != dbRV.end(); itr++){
    if( (*itr)["className"] == "Detector" && (*itr)["name"] == "childObjectId_HW_Objects" && stringInVector((*itr)["objectId"], dets))
      crates.push_back((*itr)["stringValue"]);
  }
  for( itr = dbRV.begin(); itr != dbRV.end(); itr++){
    if( (*itr)["className"] == "Crate" && (*itr)["name"] == "childObjectId_LTB" && stringInVector((*itr)["objectId"], crates))
      ltbs.push_back((*itr)["stringValue"]);
    if( (*itr)["className"] == "Crate" && (*itr)["name"] == "childObjectId_Modules" && stringInVector((*itr)["objectId"], crates))
      fees.push_back((*itr)["stringValue"]);
  }
  return 1;
}
int DaqRunInfoSvc::stringInVector ( string  str,
vector< string >  vec 
) [private]

Definition at line 500 of file DaqRunInfoSvc.cc.

{
  // if not found, return 0; otherwise, return the index+1
  int index = 0;
  int i = 0;
  vector<string>::iterator it;
  for(it = vec.begin(); it!= vec.end(); it++){
    i++;
    if((*it) == str){
      index = i;
      break; 
    }
  }
  return index;
}
static const InterfaceID& IDaqRunInfoSvc::interfaceID ( ) [inline, static, inherited]

Definition at line 45 of file IDaqRunInfoSvc.h.

                                         {
    return IID_IDaqRunInfoSvc;
  }

Member Data Documentation

Definition at line 69 of file DaqRunInfoSvc.h.

string DaqRunInfoSvc::m_dbSvcName [private]

Definition at line 71 of file DaqRunInfoSvc.h.

string DaqRunInfoSvc::m_dbName [private]

Definition at line 72 of file DaqRunInfoSvc.h.

list DaqRunInfoSvc::__all__ = ['DaqRunInfoSvcConf'] [private]

Definition at line 3 of file __init__.py.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:57:05 for DaqRunInfoSvc by doxygen 1.7.4