/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 | Protected Member Functions | Protected Attributes | Private Attributes
PreElecAlgorithm Class Reference

#include <PreElecAlgorithm.h>

Inheritance diagram for PreElecAlgorithm:
Inheritance graph
[legend]
Collaboration diagram for PreElecAlgorithm:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PreElecAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 ~PreElecAlgorithm ()
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
DayaBay::SimHeaderGetCurrentHeaderObject () const
virtual StatusCode sysInitialize ()
virtual StatusCode sysExecute ()
virtual StatusCode preExecute ()
virtual StatusCode postExecute ()
virtual StatusCode sysFinalize ()
IDataProviderSvc * arcSvc () const
void putTES (DataObject *obj, std::string location) const
TYPE * getTES (std::string location) const
TYPE * getAES (std::string location, int index) const
std::vector< DataObject * > getAEScollection (std::string location) const
int getExecNum ()
std::string Location () const

Protected Member Functions

DayaBay::SimHeaderMakeHeaderObject ()
void InitializeHeader (DayaBay::HeaderObject *header)
TYPE * MakeHeader ()
TYPE * MakeHeader (std::vector< const DayaBay::IHeader * > &inputHeaders)
TYPE * MakeHeader (const DayaBay::IHeader *referenceHeader)
void AppendInputHeader (const DayaBay::HeaderObject *header) const

Protected Attributes

DayaBay::HeaderObjectm_headerObject
bool m_pullMode
std::string m_location

Private Attributes

IPreElecSimSvcm_preElecSimSvc
TimeStamp m_hitEarliest
TimeStamp m_hitLatest

Detailed Description

Definition at line 11 of file PreElecAlgorithm.h.


Constructor & Destructor Documentation

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

Definition at line 17 of file PreElecAlgorithm.cc.

                 :DybAlgorithm<SimHeader>(name,pSvcLocator)
{
  info()<< "Construct:PreElecAlgorithm()!"<< endreq;
}
PreElecAlgorithm::~PreElecAlgorithm ( )

Definition at line 90 of file PreElecAlgorithm.cc.

{
  info()<< "Destruct:~PreElecAlgorithm()!"<< endreq;
}

Member Function Documentation

StatusCode PreElecAlgorithm::initialize ( )

Definition at line 23 of file PreElecAlgorithm.cc.

{
  StatusCode status= this->GaudiAlgorithm::initialize();
  if(status.isFailure()) 
  { 
    error()<< "Error when initializing  GaudiAlgorithm"<< endreq;
    return status;
  }
   
  info()<< "PreElecAlgorithm ininalize()"<< endreq;

  //Initialize the PreElecSimSvc
  IService* isvc = 0;
  StatusCode sc = serviceLocator()->service("PreElecSimSvc", isvc, false);
  if(sc.isFailure()) 
  {
    error()<< "Service : PreElecSimSvc could not be retrieved"<< endreq;
    return sc;
  }
  isvc->addRef();
  sc = isvc->queryInterface(IPreElecSimSvc::interfaceID(), (void**)&m_preElecSimSvc);
  if(sc.isFailure()) 
  {
    error()<< "Service PreElecSvc does not implement IPreElecSimSvc"<< endreq;
  }
  return sc;
}
StatusCode PreElecAlgorithm::execute ( )

Definition at line 51 of file PreElecAlgorithm.cc.

{
  info()<< "Now into PreElecAlgorithm executation!"<< endreq;

  SimHitHeader* shh = 0;
  vector<const SimHeader*> shs;
  shh = m_preElecSimSvc->getSimHitHeader(shs, m_hitEarliest, m_hitLatest);

  if(!shh)
  {
    error()<< "Error when get one SimHitHeader!"<< endreq;
    return StatusCode::FAILURE;
  }
  info()<< "SimHitHeader's address: "<< shh<< endreq;

  map<short int, SimHitCollection*> shc = shh->hitCollection();
  for(map<short int, SimHitCollection*>::iterator mit = shc.begin(); mit != shc.end(); mit++)
  {
    vector<SimHit*> vsh = mit->second->collection();
    info()<< MSG::INFO<< "In Det"<< mit->first
          << " : SimHit's num = "<< vsh.size()<< endreq;
  }

  //delete shh;
  for(vector<const SimHeader*>::size_type i = 0; i < shs.size(); i++)
  {
    delete shs[i];
  }

  info()<< "PreElecAlgorithm execute() finalized!" << endreq;
  return StatusCode::SUCCESS;
}
StatusCode PreElecAlgorithm::finalize ( )

Definition at line 84 of file PreElecAlgorithm.cc.

{
  info()<< "PreElecAlgorithm finalize()"<< endreq;
  return StatusCode::SUCCESS;
}
DayaBay::SimHeader * DybAlgorithm< DayaBay::SimHeader >::GetCurrentHeaderObject ( ) const [inherited]

Reimplemented in MixInputAlgorithm.

virtual StatusCode DybAlgorithm< DayaBay::SimHeader >::sysInitialize ( ) [virtual, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

virtual StatusCode DybAlgorithm< DayaBay::SimHeader >::sysExecute ( ) [virtual, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

virtual StatusCode DybAlgorithm< DayaBay::SimHeader >::preExecute ( ) [virtual, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

virtual StatusCode DybAlgorithm< DayaBay::SimHeader >::postExecute ( ) [virtual, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

virtual StatusCode DybAlgorithm< DayaBay::SimHeader >::sysFinalize ( ) [virtual, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

IDataProviderSvc * DybAlgorithm< DayaBay::SimHeader >::arcSvc ( ) const [inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

void DybAlgorithm< DayaBay::SimHeader >::putTES ( DataObject *  obj,
std::string  location 
) const [inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

TYPE * DybAlgorithm< DayaBay::SimHeader >::getTES ( std::string  location) const [inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

TYPE * DybAlgorithm< DayaBay::SimHeader >::getAES ( std::string  location,
int  index 
) const [inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

std::vector< DataObject * > DybAlgorithm< DayaBay::SimHeader >::getAEScollection ( std::string  location) const [inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

int DybAlgorithm< DayaBay::SimHeader >::getExecNum ( ) [inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

std::string DybAlgorithm< DayaBay::SimHeader >::Location ( ) const [inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

DayaBay::SimHeader * DybAlgorithm< DayaBay::SimHeader >::MakeHeaderObject ( ) [protected, inherited]

Reimplemented in MixInputAlgorithm.

void DybAlgorithm< DayaBay::SimHeader >::InitializeHeader ( DayaBay::HeaderObject header) [protected, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

TYPE * DybAlgorithm< DayaBay::SimHeader >::MakeHeader ( ) [protected, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

TYPE * DybAlgorithm< DayaBay::SimHeader >::MakeHeader ( std::vector< const DayaBay::IHeader * > &  inputHeaders) [protected, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

TYPE * DybAlgorithm< DayaBay::SimHeader >::MakeHeader ( const DayaBay::IHeader referenceHeader) [protected, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

void DybAlgorithm< DayaBay::SimHeader >::AppendInputHeader ( const DayaBay::HeaderObject header) const [protected, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.


Member Data Documentation

Definition at line 22 of file PreElecAlgorithm.h.

Definition at line 23 of file PreElecAlgorithm.h.

Definition at line 24 of file PreElecAlgorithm.h.

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

bool DybAlgorithm< DayaBay::SimHeader >::m_pullMode [protected, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.

std::string DybAlgorithm< DayaBay::SimHeader >::m_location [protected, inherited]

Reimplemented from DybBaseAlg.

Reimplemented in MixInputAlgorithm.


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:15:00 for PreElecSimSvc by doxygen 1.7.4