Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

TrackToTrgTrack Class Reference

#include <TrackToTrgTrack.h>

List of all members.

Public Member Functions

 TrackToTrgTrack (const std::string &name, ISvcLocator *pSvcLocator)
 Destructor.
virtual ~TrackToTrgTrack ()
 Algorithm initialization.
virtual StatusCode initialize ()
 Algorithm execution.
virtual StatusCode execute ()
 Algorithm finalization.
virtual StatusCode finalize ()

Protected Attributes

std::string m_trgTracksLocation
 input tracks
std::string m_tracksLocation
 location to store the score


Detailed Description

Do: Convert Tracks to TrgTracks Input: Tracks from a container in TES Output: A list of TrgTrack in a container in TES
Author:
Jose A. Hernando
Date:
2005-02-11

Definition at line 19 of file TrackToTrgTrack.h.


Constructor & Destructor Documentation

TrackToTrgTrack::TrackToTrgTrack const std::string &  name,
ISvcLocator *  pSvcLocator
 

Destructor.

Definition at line 18 of file TrackToTrgTrack.cpp.

References m_tracksLocation, and m_trgTracksLocation.

00020   : GaudiAlgorithm ( name , pSvcLocator )
00021 {
00022 
00023   declareProperty( "TracksLocation" ,
00024                    m_tracksLocation = "/Event/Tracks" );
00025 
00026   declareProperty( "TrgTracksLocation" ,
00027                    m_trgTracksLocation  = "/Event/TrgTracks" );
00028 }

TrackToTrgTrack::~TrackToTrgTrack  )  [virtual]
 

Algorithm initialization.

Definition at line 30 of file TrackToTrgTrack.cpp.

00030 {};


Member Function Documentation

StatusCode TrackToTrgTrack::execute  )  [virtual]
 

Algorithm finalization.

Definition at line 46 of file TrackToTrgTrack.cpp.

References m_tracksLocation, m_trgTracksLocation, and TrgTrackConverter::toTrgTrack().

00046                                     {
00047   
00048   Tracks* tracks = get<Tracks>(m_tracksLocation);
00049 
00050   TrgTracks* gtracks = new TrgTracks();
00051 
00052   for (Tracks::const_iterator it = tracks->begin(); 
00053        it != tracks->end(); it++) {
00054     const Track& track = *(*it);
00055     TrgTrack* gtrack = new TrgTrack();
00056     TrgTrackConverter::toTrgTrack(track,*gtrack);
00057     gtracks->insert(gtrack);
00058     debug() << " Track: \t " << track << endreq;
00059     debug() << " TrgTrack: \t" << *gtrack << endreq;
00060   }
00061   
00062   // locate the tracks in the TES
00063   put(gtracks, m_trgTracksLocation);
00064 
00065   debug() << " # of Input Tracks " << tracks->size() << std::endl;
00066   debug() << " number of converted TrgTracks " << gtracks->size() << endreq;
00067 
00068   return StatusCode::SUCCESS;
00069   
00070 }

StatusCode TrackToTrgTrack::finalize  )  [virtual]
 

Definition at line 72 of file TrackToTrgTrack.cpp.

00072                                      {
00073   return StatusCode::SUCCESS;
00074 }

StatusCode TrackToTrgTrack::initialize  )  [virtual]
 

Algorithm execution.

Definition at line 32 of file TrackToTrgTrack.cpp.

References m_tracksLocation, and m_trgTracksLocation.

00032                                        {
00033 
00034   // initialize the gaudi-algorithm
00035   StatusCode sc = GaudiAlgorithm::initialize();
00036   if ( sc.isFailure() ) return sc;
00037 
00038   info() << " -- parameters of TrackToTrgTrack -- " << endreq;
00039   info() << " Track input contaner "  << m_tracksLocation << endreq;
00040   info() << " TrgTrack output  container " << m_trgTracksLocation << endreq;
00041   info() << " ----------------------------------- " << endreq;
00042 
00043   return StatusCode::SUCCESS;
00044 }


Member Data Documentation

std::string TrackToTrgTrack::m_tracksLocation [protected]
 

location to store the score

Definition at line 43 of file TrackToTrgTrack.h.

Referenced by execute(), initialize(), and TrackToTrgTrack().

std::string TrackToTrgTrack::m_trgTracksLocation [protected]
 

input tracks

Definition at line 40 of file TrackToTrgTrack.h.

Referenced by execute(), initialize(), and TrackToTrgTrack().


The documentation for this class was generated from the following files:
Generated on Fri May 27 13:59:48 2005 for New Track Event Model by doxygen 1.4.1