/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 | Public Attributes
DybStoreAlg Class Reference

Simple Driver for a IDybStorageSvc. More...

#include <DybStoreAlg.h>

Collaboration diagram for DybStoreAlg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DybStoreAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~DybStoreAlg ()
virtual StatusCode initialize ()
virtual StatusCode execute ()
virtual StatusCode finalize ()

Public Attributes

std::string m_dybStorageSvcName
IDybStorageSvcm_dybStorageSvc
std::string m_controlPath

Detailed Description

Simple Driver for a IDybStorageSvc.

bv@bnl.gov Mon Jul 14 00:54:35 2008

Definition at line 18 of file DybStoreAlg.h.


Constructor & Destructor Documentation

DybStoreAlg::DybStoreAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 8 of file DybStoreAlg.cc.

    : GaudiAlgorithm(name,pSvcLocator)
{
    declareProperty("StorageService",m_dybStorageSvcName="DybStorageSvc",
                    "Name of an IDybStorageSvc.");
    declareProperty("ControlLocation",
                    m_controlPath=RegistrationSequence::defaultLocation(),
                    "TES location at which to find the RegistrationSequence");
}
DybStoreAlg::~DybStoreAlg ( ) [virtual]

Definition at line 18 of file DybStoreAlg.cc.

{
}

Member Function Documentation

StatusCode DybStoreAlg::initialize ( ) [virtual]

Definition at line 22 of file DybStoreAlg.cc.

{
    debug() << "initialize()" << endreq;
    StatusCode sc = this->GaudiAlgorithm::initialize();
    if (sc.isFailure()) {
        error() << "Failed to initialize base class" << endreq;
        return sc;
    }
        
    sc = serviceLocator()->getService(m_dybStorageSvcName,
                                      IID_IDybStorageSvc,
                                      *pp_cast<IInterface>(&m_dybStorageSvc));
    if (sc.isFailure()) {
        error() << "Failed to get DybStorageSvc" << endreq;
    }
    return sc;
}
StatusCode DybStoreAlg::execute ( ) [virtual]

Definition at line 40 of file DybStoreAlg.cc.

{
    DataObject *d = get<DataObject>("/Event");
    d = 0;                      // just checking

    if (!exist<RegistrationSequence>(m_controlPath)) {
        error() << "No RegistrationSequence at " 
                << m_controlPath << endreq;
        return StatusCode::FAILURE;
    }

    RegistrationSequence* rs = get<RegistrationSequence>(m_controlPath);

    StatusCode sc = m_dybStorageSvc->store(*rs);
    if (sc.isFailure()) {
        error() << "DybStorageSvc failed to store" << endreq;
    }
    return sc;
}
StatusCode DybStoreAlg::finalize ( ) [virtual]

Definition at line 60 of file DybStoreAlg.cc.

{
    return this->GaudiAlgorithm::finalize();
}

Member Data Documentation

Definition at line 31 of file DybStoreAlg.h.

Definition at line 32 of file DybStoreAlg.h.

Definition at line 34 of file DybStoreAlg.h.


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:20:12 for RootIOTest by doxygen 1.7.4