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

Put some objects in the TES. More...

#include <ObjectSpew.h>

List of all members.

Public Member Functions

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

Detailed Description

Put some objects in the TES.

bv@bnl.gov Mon Jun 30 11:56:46 2008

Definition at line 17 of file ObjectSpew.h.


Constructor & Destructor Documentation

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

Definition at line 13 of file ObjectSpew.cc.

    : GaudiAlgorithm(name,pSvcLocator)
{
}
ObjectSpew::~ObjectSpew ( ) [virtual]

Definition at line 18 of file ObjectSpew.cc.

{
}

Member Function Documentation

StatusCode ObjectSpew::initialize ( ) [virtual]

Definition at line 22 of file ObjectSpew.cc.

{
    this->GaudiAlgorithm::initialize();

    return StatusCode::SUCCESS;
}
StatusCode ObjectSpew::execute ( ) [virtual]

Definition at line 29 of file ObjectSpew.cc.

{
    static int execNumber = -1;
    ++execNumber;


    if (!exist<DataObject>(evtSvc(), "/Event")) {
        IDataManagerSvc* evtmgr = dynamic_cast<IDataManagerSvc*>(eventSvc());
        DataObject*  tevt= new DataObject();
        if( evtmgr->setRoot("/Event", tevt).isFailure() ) {
            error() << "Unable to register /Event object" << endreq;
            return StatusCode::FAILURE;
        }
    }

    const char* dirs[] = {"foo", "bar", "baz", 0};
    DayaBay::HeaderObject* last_ho = 0;
    for (int ind=0; dirs[ind]; ++ind) {
        DayaBay::HeaderObject* ho = new DayaBay::HeaderObject;
        ho->setEarliest(TimeStamp::GetBOT());
        ho->setLatest(TimeStamp::GetEOT());
        ho->setExecNumber(execNumber);
        vector<unsigned long> ranstate;
        ranstate.push_back(execNumber*(ind+1));
        ho->setRandomState(ranstate);
        if (last_ho) {
            vector<const DayaBay::IHeader*> input;
            input.push_back(last_ho);
            ho->setInputHeaders(input);
        }
        last_ho = ho;
        string path = "/Event/";
        path += dirs[ind];
        put(ho,path);
    }

    return StatusCode::SUCCESS;
}
StatusCode ObjectSpew::finalize ( ) [virtual]

Definition at line 68 of file ObjectSpew.cc.

{

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

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