Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Atlfast::IKinematicDumper Class Reference

formatted output of collection of Reconstructed Particles from the TES for debugging purposes. More...

#include <IKinematicDumper.h>

Collaboration diagram for Atlfast::IKinematicDumper:

Collaboration graph
[legend]
List of all members.

Public Methods

 IKinematicDumper (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Algorithm Constructor.

virtual ~IKinematicDumper ()
 Default Destructor.

virtual StatusCode initialize ()
 Standard Athena-Algorithm method.

virtual StatusCode execute ()
 Standard Athena-Algorithm method.

virtual StatusCode finalize ()
 Standard Athena-Algorithm method.


Private Methods

void dump (const IKinematic *) const
 extracts particles from the TES

void header () const

Private Attributes

std::string m_clusterLocation
 TES input location.

std::string m_jetLocation
std::string m_imuonLocation
std::string m_nimuonLocation
TesIO * m_tesIO

Detailed Description

formatted output of collection of Reconstructed Particles from the TES for debugging purposes.

Definition at line 46 of file IKinematicDumper.h.


Constructor & Destructor Documentation

Atlfast::IKinematicDumper::IKinematicDumper const std::string &    name,
ISvcLocator *    pSvcLocator
 

Standard Athena-Algorithm Constructor.

Definition at line 32 of file IKinematicDumper.cxx.

00033     : Algorithm( name, pSvcLocator ){
00034     
00035     
00036     // Default paths for entities in the TES
00037     m_clusterLocation    = "/Event/AtlfastClusters";
00038     m_jetLocation        = "/Event/AtlfastJets";
00039     m_imuonLocation      = "/Event/AtlfastIsolatedMuons";
00040     m_nimuonLocation      = "/Event/AtlfastNonIsolatedMuons";
00041 
00042     declareProperty( "clusterLocation", m_clusterLocation ) ;
00043     declareProperty( "jetLocation",     m_jetLocation ) ;
00044     declareProperty( "imuonLocation",   m_imuonLocation ) ;
00045     declareProperty( "nimuonLocation",  m_nimuonLocation ) ;
00046     
00047   }

Atlfast::IKinematicDumper::~IKinematicDumper   [virtual]
 

Default Destructor.

Definition at line 50 of file IKinematicDumper.cxx.

00050 {} 

Member Function Documentation

StatusCode Atlfast::IKinematicDumper::initialize   [virtual]
 

Standard Athena-Algorithm method.

Definition at line 57 of file IKinematicDumper.cxx.

References m_tesIO.

00058   {
00059     MsgStream log( messageService(), name() ) ;
00060     log<<MSG::DEBUG<<"Initialising "<<endreq;
00061     //set up TesIO
00062     //    m_tesIO = new TesIO(eventDataService());
00063     m_tesIO = new TesIO();
00064     
00065     return StatusCode::SUCCESS ;
00066   }

StatusCode Atlfast::IKinematicDumper::execute   [virtual]
 

Standard Athena-Algorithm method.

Definition at line 85 of file IKinematicDumper.cxx.

References dump(), header(), m_clusterLocation, m_imuonLocation, m_jetLocation, m_nimuonLocation, and m_tesIO.

00086   {
00087     //................................
00088     // make a message logging stream
00089     
00090     MsgStream log( messageService(), name() ) ;
00091     log<<MSG::DEBUG<<"Executing "<<endreq;
00092     
00093 
00094 
00095     //IsolatedMuons: read from TES and dump
00096     std::vector<ReconstructedParticle*> imuons;
00097     m_tesIO->copy<ReconstructedParticleCollection>(imuons, m_imuonLocation);
00098     std::sort(imuons.begin(), imuons.end(), SortAttribute::AscendingEta());
00099     log<<MSG::INFO<<"Dumping  Isolated Muons "<<imuons.size()<<endreq;
00100     log<<MSG::INFO<<"----------------------- "<<endreq;    
00101     std::vector<ReconstructedParticle*>::const_iterator 
00102       rp_iter = imuons.begin();
00103     this->header();
00104     for(;rp_iter!=imuons.end();++rp_iter) this->dump(*rp_iter);
00105 
00106     //NonIsolatedMuons: read from TES and dump
00107     std::vector<ReconstructedParticle*> nimuons;
00108     m_tesIO->copy<ReconstructedParticleCollection> (nimuons, m_nimuonLocation);
00109     std::sort(nimuons.begin(), nimuons.end(), SortAttribute::AscendingEta());
00110     log<<MSG::INFO<<"Dumping  NonIsolated Muons "<<nimuons.size()<<endreq;
00111     log<<MSG::INFO<<"-------------------------- "<<endreq;    
00112     rp_iter = nimuons.begin();
00113     this->header();
00114     for(;rp_iter!=nimuons.end();++rp_iter) this->dump(*rp_iter);
00115     //Clusters: read from TES and dump
00116     std::vector<Cluster*> clusters;
00117     m_tesIO->copy<ClusterCollection> (clusters, m_clusterLocation);
00118     std::sort(clusters.begin(), clusters.end(), SortAttribute::AscendingEta());
00119     log<<MSG::INFO<<"Dumping  Clusters "<<clusters.size()<<endreq;
00120     log<<MSG::INFO<<"------------------- "<<endreq;    
00121     std::vector<Cluster*>::const_iterator cl_iter = clusters.begin();
00122     this->header();
00123     for(;cl_iter!=clusters.end();++cl_iter) this->dump(*cl_iter);
00124     //Jets: read from TES and dump
00125     std::vector<Jet*> jets;
00126     m_tesIO->copy<JetCollection>(jets, m_jetLocation);
00127     std::sort(jets.begin(), jets.end(), SortAttribute::AscendingEta());
00128     log<<MSG::INFO<<"Dumping  Jets "<<jets.size()<<endreq;
00129     log<<MSG::INFO<<"------------------- "<<endreq;    
00130     std::vector<Jet*>::const_iterator jet_iter = jets.begin();
00131     this->header();
00132     for(;jet_iter!=jets.end();++jet_iter) this->dump(*jet_iter);
00133 
00134     log<<MSG::INFO<<"End of execute "<<endreq;    
00135     return StatusCode::SUCCESS;
00136   }

StatusCode Atlfast::IKinematicDumper::finalize   [virtual]
 

Standard Athena-Algorithm method.

Definition at line 72 of file IKinematicDumper.cxx.

00073   {
00074     // .. put any finalisation in here...
00075     
00076     return StatusCode::SUCCESS ;
00077   }

void Atlfast::IKinematicDumper::dump const IKinematic *    const [private]
 

extracts particles from the TES

Definition at line 142 of file IKinematicDumper.cxx.

Referenced by execute().

00142                                                      {
00143     cout<<setiosflags(ios::fixed);
00144     cout<<setprecision(3);
00145     cout
00146         <<setw(8)<<setprecision(3)<<p->momentum().pseudoRapidity()<<" "
00147         <<setw(8)<<setprecision(3)<<p->momentum().phi()<<" "
00148         <<setw(8)<<setprecision(3)<<p->momentum().perp()<<" "
00149         <<setw(8)<<setprecision(3)<<p->momentum().e()<<" "
00150         <<endl;
00151   }

void Atlfast::IKinematicDumper::header   const [private]
 

Definition at line 138 of file IKinematicDumper.cxx.

Referenced by execute().

00138                                     {
00139     cout<<"     eta      phi       pt        e"<<endl;
00140     cout<<"-----------------------------------"<<endl;
00141   }

Member Data Documentation

std::string Atlfast::IKinematicDumper::m_clusterLocation [private]
 

TES input location.

Definition at line 76 of file IKinematicDumper.h.

Referenced by execute().

std::string Atlfast::IKinematicDumper::m_jetLocation [private]
 

Definition at line 77 of file IKinematicDumper.h.

Referenced by execute().

std::string Atlfast::IKinematicDumper::m_imuonLocation [private]
 

Definition at line 78 of file IKinematicDumper.h.

Referenced by execute().

std::string Atlfast::IKinematicDumper::m_nimuonLocation [private]
 

Definition at line 79 of file IKinematicDumper.h.

Referenced by execute().

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

Definition at line 80 of file IKinematicDumper.h.

Referenced by execute(), and initialize().


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:18:56 2003 for AtlfastAlgs by doxygen1.3-rc1