Atlfast::TrackDumper Class Reference

#include <TrackDumper.h>

Collaboration diagram for Atlfast::TrackDumper:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Private Attributes

TesIOm_tesIO
std::string m_mcLocation
std::string m_inputLocation

Detailed Description

Definition at line 38 of file TrackDumper.h.


Constructor & Destructor Documentation

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

Definition at line 38 of file TrackDumper.cxx.

00040     : Algorithm( name, pSvcLocator ),
00041       m_tesIO(0) {
00042     
00043     // Default paths for entities in the TES
00044     m_inputLocation    = "/Event/AtlfastTracks";
00045     declareProperty( "InputLocation",    m_inputLocation ) ;
00046   }

Atlfast::TrackDumper::~TrackDumper (  )  [virtual]

Definition at line 51 of file TrackDumper.cxx.

00051                             {
00052     if (m_tesIO) delete m_tesIO;
00053   } 


Member Function Documentation

StatusCode Atlfast::TrackDumper::initialize (  )  [virtual]

Definition at line 60 of file TrackDumper.cxx.

00060                                     {
00061     MsgStream log( messageService(), name() ) ;
00062  
00063     GlobalEventData* ged = GlobalEventData::Instance();
00064     //int randSeed = ged->randSeed() ;
00065     // load the location of the MC in StoreGate
00066     m_mcLocation       = ged -> mcLocation();
00067    
00068     m_tesIO = new TesIO(m_mcLocation, ged->justHardScatter());
00069 
00070     HeaderPrinter hp("Atlfast TrackDumper:", log);
00071     hp.add("Input Location         ", m_inputLocation);    
00072     hp.print();
00073     log << MSG::INFO << "Initialised successfully " << endreq ;    
00074     return StatusCode::SUCCESS ;
00075   }

StatusCode Atlfast::TrackDumper::execute (  )  [virtual]

Definition at line 106 of file TrackDumper.cxx.

00106                                   {
00107 
00108     //................................
00109     // make a message logging stream
00110     
00111     MsgStream log( messageService(), name() ) ;
00112     log << MSG::DEBUG << "Execute() " << endreq;
00113     
00114 
00115     //.........................................................
00116     // We now need to access the HepMC event record(s) in the event store
00117     // and iterate over them to extract HepMC::GenParticles.
00118     // This method will only select the particles which are required
00119     // and add them to a local store (mcParticles)
00120     
00121     std::vector<Track*> tracks;
00122     
00123     m_tesIO->copy<TrackCollection>( tracks, m_inputLocation );
00124     TrackPrinter printer(log);
00125     HeaderPrinter hp("TrackDump:", log);
00126     std::for_each(tracks.begin(), tracks.end(), printer);
00127     return StatusCode::SUCCESS;
00128   }

StatusCode Atlfast::TrackDumper::finalize (  )  [virtual]

Definition at line 81 of file TrackDumper.cxx.

00081                                   {
00082     
00083     MsgStream log( messageService(), name() ) ;
00084     
00085     log << MSG::INFO << "Finalised successfully " << endreq ;
00086     
00087     return StatusCode::SUCCESS ;
00088   }


Member Data Documentation

TesIO* Atlfast::TrackDumper::m_tesIO [private]

Definition at line 66 of file TrackDumper.h.

std::string Atlfast::TrackDumper::m_mcLocation [private]

Definition at line 68 of file TrackDumper.h.

std::string Atlfast::TrackDumper::m_inputLocation [private]

Definition at line 77 of file TrackDumper.h.


The documentation for this class was generated from the following files:
Generated on Mon Sep 24 14:19:42 2007 for AtlfastAlgs by  doxygen 1.5.1