|
ATLAS Offline Software
|
Go to the documentation of this file.
21 #include "Gaudi/Property.h"
47 ISvcLocator* pSvcLocator ) :
58 descr =
"List of INavigable4Momentum containers one wants to dump";
62 std::vector<std::string> inav4momContainersName( 0 );
65 descr =
"Name of the output stream where we'll dump informations from the";
66 descr +=
" INavigable4MomentumCollection object(s).";
67 descr +=
" Valid stream names are: \n";
68 descr +=
" - \"MsgStream\"\n";
69 descr +=
" - \"stderr\"\n";
70 descr +=
" - \"stdout\"\n";
71 descr +=
" - \"/path/to/some/file\".";
101 <<
"] containers:" );
102 for ( std::vector<std::string>::const_iterator
112 return StatusCode::SUCCESS;
118 return StatusCode::SUCCESS;
125 typedef std::vector<std::string>::const_iterator ContNameIterator;
127 for ( ContNameIterator
135 if ( !
dump( *itr ).isSuccess() ) {
142 return StatusCode::SUCCESS;
153 if ( !
evtStore()->contains<INav4Moms_t>( collName ) ) {
155 <<
"] INavigable4MomentumCollection in StoreGate !" );
156 return StatusCode::RECOVERABLE;
159 const INav4Moms_t * coll = 0;
163 ATH_MSG_WARNING(
"Could not retrieve any INavigable4MomentumCollection at ["
164 << collName <<
"] !!" );
165 return StatusCode::RECOVERABLE;
168 std::ostringstream
out;
170 const std::size_t iMax = coll->size();
171 out <<
"Retrieved [" << collName <<
"] ==> size = " << iMax <<
"\n";
172 if ( coll->empty() ) {
173 return StatusCode::SUCCESS;
177 typedef std::set<const INavigable4Momentum*, P4Sorters::Descending::Pt> Coll_t;
178 Coll_t inav4moms( coll->begin(), coll->end() );
186 return StatusCode::SUCCESS;
209 const std::string
stdout =
"stdout";
210 const std::string
stderr =
"stderr";
211 const std::string msgstream =
"msgstream";
def retrieve(aClass, aKey=None)
StringArrayProperty m_inav4momContainersName
List of INavigable4Momentum containers one wants to dump.
virtual StatusCode execute()
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::ostream * m_outputStream
pointer to the file descriptor in case the output stream is not a "MsgStream"
virtual StatusCode finalize()
virtual StatusCode initialize()
virtual ~INav4MomDumper()
Destructor:
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
INav4MomDumper()
Default constructor:
void setupOutputStream(Gaudi::Details::PropertyBase &outputStreamName)
Callback method to configure the output stream into which we'll dump the informations from INavigable...
StatusCode dump(const std::string &collName)
Prints out (on the configured output stream) the content of an INavigable4MomentumCollection object,...
::StatusCode StatusCode
StatusCode definition for legacy code.
void tolower(std::string &s)
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
StringProperty m_outputStreamName
Name of the output stream where we'll dump informations from the INav4MomAssocs object.
#define ATH_MSG_WARNING(x)
std::ostream & dump(std::ostream &out, const I4MomIter iBeg, const I4MomIter iEnd)
Helper to stream out a range of I4Momentum objects.