| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

RFileInfoTestAlg.cc

Go to the documentation of this file.
00001 #include "RFileInfoTestAlg.h"
00002 #include "Context/TimeStamp.h"
00003 #include "DatabaseInterface/DbiLog.h"
00004 
00005 RFileInfoTestAlg:: RFileInfoTestAlg (const std::string& name, ISvcLocator* pSvcLocator)
00006 : GaudiAlgorithm(name, pSvcLocator)
00007 {
00008  info() << " RFileInfoTestAlg construcated!! " << endreq;
00009  declareProperty("SEQNo",m_SeqNo=1," the started SeqNO");
00010  //dbi().Enable(100);
00011 }
00012 
00013 
00014 StatusCode RFileInfoTestAlg::initialize(){
00015   info() << " RFileInfoTestAlg initializing !! " << endreq;
00016  return StatusCode::SUCCESS;
00017 }
00018 
00019 StatusCode RFileInfoTestAlg::execute(){
00020 
00021  info() << "====>  RFileInfoTestAlg executing !! " << endreq;
00022   
00023  // Query Data with Context 
00024  // TimeStamp tstamp(2009, 8, 26 ,9, 45, 20);
00025  // Context vc(Site::kDayaBay, SimFlag::kMC, tstamp);
00026  //DbiResultPtr<DaqRawDataFileInfo>  m_ResPtr(vc, 0,0);
00027  
00028  // Query Data with SeqNo.
00029  DbiResultPtr<DaqRawDataFileInfo>  m_ResPtr("DaqRawDataFileInfo",m_SeqNo, 0 );
00030  info()<<"--------------------------------------------------------"<<std::endl;
00031  info()<< m_ResPtr.GetValidityRec()-> GetContextRange().AsString() <<std::endl;
00032  info()<<" The Num Rows to be queried ==> "<< m_ResPtr.GetNumRows()<< std::endl;
00033 
00034  for ( UInt_t irow = 0; irow < m_ResPtr.GetNumRows(); ++irow) {
00035       const  DaqRawDataFileInfo* ddd1 = m_ResPtr.GetRow(irow);
00036       info()<<"==> ["<<irow<<"]:"<< "\n"
00037             <<" RUNNO ="         << ddd1-> GetRunNo()<<"\n  "
00038             <<"FileNO ="         << ddd1-> GetFileNo()<<"\n  "
00039             <<"FILENAME="        << ddd1-> GetFileName() <<"\n"
00040             <<"FILESTATE="       << ddd1-> GetFileState() <<"\n"
00041             <<"FILESIZE="        << ddd1-> GetFileSize()<<"\n"
00042             <<"CHECKSUM="        << ddd1-> GetCheckSum()<<"\n"
00043             <<"TRANSFERSTATE="   << ddd1-> GetTransferState()<<std::endl;
00044  }
00045  m_SeqNo++;
00046 
00047  return StatusCode::SUCCESS;
00048 }
00049 
00050 StatusCode RFileInfoTestAlg::finalize(){
00051   info() << " RFileInfoTestAlg finalized!! " << endreq;
00052  return StatusCode::SUCCESS;
00053 }
00054 
00055 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:16:16 2011 for DbiRawDataFileSvc by doxygen 1.4.7