00001 #include "GaudiKernel/IInterface.h"
00002 #include "GaudiKernel/StatusCode.h"
00003 #include "GaudiKernel/SvcFactory.h"
00004 #include "GaudiKernel/MsgStream.h"
00005 #include "GaudiKernel/ISvcLocator.h"
00006 #include "GaudiKernel/SmartDataPtr.h"
00007 #include "GaudiKernel/IDataProviderSvc.h"
00008 #include "GaudiKernel/PropertyMgr.h"
00009 #include "GaudiKernel/SmartIF.h"
00010 #include "GaudiKernel/IAppMgrUI.h"
00011 #include "GaudiKernel/IProperty.h"
00012
00013
00014 #include "GaudiKernel/IIncidentSvc.h"
00015 #include "GaudiKernel/Incident.h"
00016 #include "GaudiKernel/IIncidentListener.h"
00017 #include "GaudiKernel/ISvcLocator.h"
00018 #include "GaudiKernel/Bootstrap.h"
00019
00020 #include "DataInfoSvc/DataInfoSvc.h"
00021 #include <iostream>
00022 #include <fstream>
00023
00024 DataInfoSvc::DataInfoSvc( const string& name, ISvcLocator* svcloc) :
00025 Service (name, svcloc){
00026
00027 }
00028
00029 DataInfoSvc::~DataInfoSvc(){
00030 }
00031
00032 StatusCode DataInfoSvc::queryInterface(const InterfaceID& riid, void** ppvInterface){
00033 if( IID_IDataInfoSvc.versionMatch(riid) ){
00034 *ppvInterface = static_cast<IDataInfoSvc*> (this);
00035 } else{
00036 return Service::queryInterface(riid, ppvInterface);
00037 }
00038 return StatusCode::SUCCESS;
00039 }
00040
00041 StatusCode DataInfoSvc::initialize(){
00042 MsgStream log(messageService(), name());
00043 log << MSG::INFO << "DataInfoSvc::initialize()" << endreq;
00044
00045 StatusCode sc = Service::initialize();
00046 sc = setProperties();
00047 return StatusCode::SUCCESS;
00048 }
00049
00050 void DataInfoSvc::setDecayCard(string card)
00051 {
00052 ifstream fin(card.c_str());
00053 string tempString;
00054 int i=0;
00055 while(getline(fin,tempString))
00056 {
00057 if(tempString.size()>0)
00058 {
00059 m_decayOptions += tempString;
00060 m_decayOptions += "\n";
00061 }
00062 i++;
00063 }
00064 if(i>100) m_decayOptions = "";
00065 MsgStream log(messageService(), name());
00066 log << MSG::INFO << "set decayOptions: " << endreq;
00067 log << MSG::INFO << endreq
00068 << m_decayOptions << endreq;
00069 }
00070
00071
00072 StatusCode DataInfoSvc::finalize(){
00073 MsgStream log(messageService(), name());
00074 log << MSG::INFO << "DataInfoSvc::finalize()" << endreq;
00075 return StatusCode::SUCCESS;
00076 }
00077
00078