/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
RunInfoQuary Class Reference

#include <RunInfoQuary.h>

List of all members.

Public Member Functions

 RunInfoQuary ()
 Constructor has to be in this form.
virtual ~RunInfoQuary ()
virtual int runNo2ContextRange (int runNo, ContextRange &cr)
virtual int ContextRange2runNo (const ContextRange &cr)

Detailed Description

Definition at line 6 of file RunInfoQuary.h.


Constructor & Destructor Documentation

RunInfoQuary::RunInfoQuary ( ) [inline]

Constructor has to be in this form.

Definition at line 10 of file RunInfoQuary.h.

{}
virtual RunInfoQuary::~RunInfoQuary ( ) [inline, virtual]

Definition at line 11 of file RunInfoQuary.h.

{}

Member Function Documentation

int RunInfoQuary::runNo2ContextRange ( int  runNo,
ContextRange cr 
) [virtual]

Definition at line 18 of file RunInfoQuary.cc.

{
  //Get all the raw data files
  DbiSqlContext vc("1=1"); //WHERE clause

#ifdef I_LIKE_DUPLICITY
  DbiResultPtr<DaqRunInfo> rp("DaqRunInfo", vc);
#else
  DbiResultPtr<GDaqRunInfo> rp("DaqRunInfo", vc);
#endif

  // Check number of entries in result set
  unsigned int numRows = rp.GetNumRows();
  if (numRows < 1)
  {
    cout<<"No records is found in table DaqRunInfo"<<endl;
    return 0;
  }
#ifdef I_LIKE_DUPLICITY
  const DaqRunInfo* row;
#else
  const GDaqRunInfo* row;
#endif
  unsigned int idx = 0;
  while(idx < numRows)
  {
    row = rp.GetRow(idx);
    if(runNo == row->GetRunNo()) break;
    idx++;
  }
  if(idx == numRows)
  {
    cout<<"no record of "<<runNo<<" run "<<endl;
    return 0;
  }
  DbiResult* res = row->GetOwner();
  const DbiValidityRec vr = res->GetValidityRec();
  cr = vr.GetContextRange();
  return  1;
}
int RunInfoQuary::ContextRange2runNo ( const ContextRange cr) [virtual]

Definition at line 59 of file RunInfoQuary.cc.

{
  return 0;
}

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 10:02:34 for DBWriter by doxygen 1.7.4