/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 | Static Public Member Functions | Private Attributes
HistoryKeeper Class Reference

#include <HistoryKeeper.h>

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

List of all members.

Public Member Functions

 HistoryKeeper (const std::string &name, ISvcLocator *svcloc)
virtual ~HistoryKeeper ()
virtual StatusCode initialize ()
 Initialise the service.
virtual StatusCode finalize ()
 Finalise the service.
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Query the interfaces.
virtual const InterfaceID & type () const
 Service type.
virtual StatusCode GetCurrentHistory (DayaBay::SimParticleHistory *&outHistory)
 Used to get the current history in the simulation. Creates a new one if none yet made.
virtual StatusCode ClaimCurrentHistory (DayaBay::SimParticleHistory *&outHistory)
 Used o pull this data into the TES.
virtual StatusCode GetCurrentUnobservable (DayaBay::SimUnobservableStatisticsHeader *&outUnobservable)
 Used to get the current Unobservable in the simulation. Creates a new one if none yet made.
virtual StatusCode ClaimCurrentUnobservable (DayaBay::SimUnobservableStatisticsHeader *&outUnobservable)
 Used o pull this data into the TES.

Static Public Member Functions

static const InterfaceID & interfaceID ()

Private Attributes

DayaBay::SimParticleHistorymCurrentHistory
DayaBay::SimUnobservableStatisticsHeadermCurrentUnobservable

Detailed Description

Definition at line 9 of file HistoryKeeper.h.


Constructor & Destructor Documentation

HistoryKeeper::HistoryKeeper ( const std::string &  name,
ISvcLocator *  svcloc 
) [inline]

Definition at line 12 of file HistoryKeeper.h.

    : Service( name, svcloc )
    , mCurrentHistory(0)
    , mCurrentUnobservable(0)
    {};
virtual HistoryKeeper::~HistoryKeeper ( ) [inline, virtual]

Definition at line 18 of file HistoryKeeper.h.

{};

Member Function Documentation

virtual StatusCode HistoryKeeper::initialize ( ) [inline, virtual]

Initialise the service.

Definition at line 21 of file HistoryKeeper.h.

{ mCurrentHistory = 0; return StatusCode::SUCCESS; };  
virtual StatusCode HistoryKeeper::finalize ( ) [inline, virtual]

Finalise the service.

Definition at line 23 of file HistoryKeeper.h.

{ if(mCurrentHistory) delete mCurrentHistory; mCurrentHistory = 0; return StatusCode::SUCCESS;};
StatusCode HistoryKeeper::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
) [virtual]

Query the interfaces.

< IMPORTANT: increment the reference counter

Definition at line 3 of file HistoryKeeper.cc.

{
  // chech the placeholder for result 
  if ( !ppvInterface ) { return StatusCode::FAILURE ; }
  //
  *ppvInterface = 0;
  //
  if ( riid == IHistoryKeeper::interfaceID() ) 
  {
    *ppvInterface = static_cast<IHistoryKeeper*>(this);
    addRef();                
    return StatusCode::SUCCESS ;    
  }
  //
  return  Service::queryInterface( riid, ppvInterface ) ; 
}
virtual const InterfaceID& HistoryKeeper::type ( ) const [inline, virtual]

Service type.

Definition at line 29 of file HistoryKeeper.h.

virtual StatusCode HistoryKeeper::GetCurrentHistory ( DayaBay::SimParticleHistory *&  outHistory) [inline, virtual]

Used to get the current history in the simulation. Creates a new one if none yet made.

Implements IHistoryKeeper.

Definition at line 33 of file HistoryKeeper.h.

    {
       if(mCurrentHistory==0) 
         mCurrentHistory = new DayaBay::SimParticleHistory();
       outHistory = mCurrentHistory;
       return StatusCode::SUCCESS;
    }
virtual StatusCode HistoryKeeper::ClaimCurrentHistory ( DayaBay::SimParticleHistory *&  outHistory) [inline, virtual]

Used o pull this data into the TES.

Reliquishes ownership of the current history. Returns 0 if no current history.

Implements IHistoryKeeper.

Definition at line 43 of file HistoryKeeper.h.

    {
      outHistory = mCurrentHistory;
      mCurrentHistory = 0;
      return StatusCode::SUCCESS;
    }
virtual StatusCode HistoryKeeper::GetCurrentUnobservable ( DayaBay::SimUnobservableStatisticsHeader *&  outUnobservable) [inline, virtual]

Used to get the current Unobservable in the simulation. Creates a new one if none yet made.

Implements IHistoryKeeper.

Definition at line 51 of file HistoryKeeper.h.

    {
       if(mCurrentUnobservable==0) 
         mCurrentUnobservable = new DayaBay::SimUnobservableStatisticsHeader();
       outUnobservable = mCurrentUnobservable;
       return StatusCode::SUCCESS;
    }
virtual StatusCode HistoryKeeper::ClaimCurrentUnobservable ( DayaBay::SimUnobservableStatisticsHeader *&  outUnobservable) [inline, virtual]

Used o pull this data into the TES.

Reliquishes ownership of the current Unobservable. Returns 0 if no current Unobservable.

Implements IHistoryKeeper.

Definition at line 61 of file HistoryKeeper.h.

    {
      outUnobservable = mCurrentUnobservable;
      mCurrentUnobservable = 0;
      return StatusCode::SUCCESS;
    }
const InterfaceID & IHistoryKeeper::interfaceID ( ) [static, inherited]

Definition at line 8 of file IHistoryKeeper.cc.

{ 
    return IID_IHistoryKeeper; 
}

Member Data Documentation

Definition at line 69 of file HistoryKeeper.h.

Definition at line 70 of file HistoryKeeper.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:05:42 for G4DataHelpers by doxygen 1.7.4