|
ATLAS Offline Software
|
#include <I4MomDumper.h>
|
| I4MomDumper (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
virtual | ~I4MomDumper () |
| Destructor: More...
|
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | finalize () |
|
StatusCode | dump (const std::string &collName) |
| Prints out (on the configured output stream) the content of an INavigable4MomentumCollection object, given its StoreGate key. More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
| I4MomDumper () |
| Default constructor: More...
|
|
void | setupDisplay (Gaudi::Details::PropertyBase &display) |
| Callback method to configure the display property which will tell how to dump the informations from I4MomentumCollection . More...
|
|
void | setupOutputStream (Gaudi::Details::PropertyBase &outputStreamName) |
| Callback method to configure the output stream into which we'll dump the informations from I4MomentumCollection . More...
|
|
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution More...
|
|
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
|
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. More...
|
|
Definition at line 26 of file I4MomDumper.h.
◆ StoreGateSvc_t
◆ I4MomDumper() [1/2]
I4MomDumper::I4MomDumper |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Constructor with parameters:
Definition at line 54 of file I4MomDumper.cxx.
67 descr =
"List of INavigable4Momentum containers one wants to dump";
71 std::vector<std::string> i4momContainersName( 0 );
76 "Tells how one wants the I4Momentum objects to be displayed"
77 " ie: eetaphim|iptcotthphim|ptetaphim|pxpypze" );
80 descr =
"Name of the output stream where we'll dump informations from the";
81 descr +=
" INavigable4MomentumCollection object(s).";
82 descr +=
" Valid stream names are: \n";
83 descr +=
" - \"MsgStream\"\n";
84 descr +=
" - \"stderr\"\n";
85 descr +=
" - \"stdout\"\n";
86 descr +=
" - \"/path/to/some/file\".";
◆ ~I4MomDumper()
I4MomDumper::~I4MomDumper |
( |
| ) |
|
|
virtual |
◆ I4MomDumper() [2/2]
I4MomDumper::I4MomDumper |
( |
| ) |
|
|
protected |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ dump()
StatusCode I4MomDumper::dump |
( |
const std::string & |
collName | ) |
|
Prints out (on the configured output stream) the content of an INavigable4MomentumCollection
object, given its StoreGate
key.
Definition at line 166 of file I4MomDumper.cxx.
169 if ( !
evtStore()->contains<I4Moms_t>( collName ) ) {
171 <<
"] I4MomentumContainer in StoreGate !" );
172 return StatusCode::RECOVERABLE;
175 const I4Moms_t * coll = 0;
180 << collName <<
"] !!" );
181 return StatusCode::RECOVERABLE;
184 std::ostringstream
out;
186 const std::size_t iMax = coll->size();
187 out <<
"Retrieved [" << collName <<
"] ==> size = " << iMax <<
"\n";
188 if ( coll->empty() ) {
189 return StatusCode::SUCCESS;
193 typedef std::set<const I4Momentum*, P4Sorters::Descending::Pt> Coll_t;
194 Coll_t i4moms( coll->begin(), coll->end() );
197 out <<
"[e,eta,phi,m] ="
198 << std::right << std::scientific << std::setprecision(8);
199 for ( Coll_t::const_iterator itr = i4moms.begin(),
203 out << std::setw(16) << (*itr)->e()
204 << std::setw(16) << (*itr)->eta()
205 << std::setw(16) << (*itr)->phi()
206 << std::setw(16) << (*itr)->m()
211 out <<
"[ipt,cotTh,phi,m] ="
212 << std::right << std::scientific << std::setprecision(8);
213 for ( Coll_t::const_iterator itr = i4moms.begin(),
217 out << std::setw(16) << (*itr)->iPt()
218 << std::setw(16) << (*itr)->cotTh()
219 << std::setw(16) << (*itr)->phi()
220 << std::setw(16) << (*itr)->m()
225 out <<
"[pt,eta,phi,m] ="
226 << std::right << std::scientific << std::setprecision(8);
227 for ( Coll_t::const_iterator itr = i4moms.begin(),
231 out << std::setw(16) << (*itr)->pt()
232 << std::setw(16) << (*itr)->eta()
233 << std::setw(16) << (*itr)->phi()
234 << std::setw(16) << (*itr)->m()
238 out <<
"[px,py,pz,e] ="
239 << std::right << std::scientific << std::setprecision(8);
240 for ( Coll_t::const_iterator itr = i4moms.begin(),
244 out << std::setw(16) << (*itr)->px()
245 << std::setw(16) << (*itr)->py()
246 << std::setw(16) << (*itr)->pz()
247 << std::setw(16) << (*itr)->e()
257 return StatusCode::SUCCESS;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode I4MomDumper::execute |
( |
| ) |
|
|
virtual |
Definition at line 137 of file I4MomDumper.cxx.
141 typedef std::vector<std::string>::const_iterator ContNameIterator;
143 for ( ContNameIterator
151 if ( !
dump( *itr ).isSuccess() ) {
158 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode I4MomDumper::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode I4MomDumper::initialize |
( |
| ) |
|
|
virtual |
Definition at line 111 of file I4MomDumper.cxx.
116 <<
"] containers:" );
117 for ( std::vector<std::string>::const_iterator
128 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ setupDisplay()
void I4MomDumper::setupDisplay |
( |
Gaudi::Details::PropertyBase & |
display | ) |
|
|
protected |
Callback method to configure the display property which will tell how to dump the informations from I4MomentumCollection
.
Definition at line 271 of file I4MomDumper.cxx.
286 <<
" => will use [pxpypxe] instead..." );
◆ setupOutputStream()
void I4MomDumper::setupOutputStream |
( |
Gaudi::Details::PropertyBase & |
outputStreamName | ) |
|
|
protected |
Callback method to configure the output stream into which we'll dump the informations from I4MomentumCollection
.
Definition at line 294 of file I4MomDumper.cxx.
310 const std::string
stdout =
"stdout";
311 const std::string
stderr =
"stderr";
312 const std::string msgstream =
"msgstream";
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_display
◆ m_displayName
StringProperty I4MomDumper::m_displayName |
|
protected |
switch for the type of printout (pxpypze/eetaphim/...)
Definition at line 100 of file I4MomDumper.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_i4momContainersName
StringArrayProperty I4MomDumper::m_i4momContainersName |
|
protected |
◆ m_outputStream
std::ostream* I4MomDumper::m_outputStream |
|
protected |
pointer to the file descriptor in case the output stream is not a "MsgStream"
Definition at line 113 of file I4MomDumper.h.
◆ m_outputStreamName
StringProperty I4MomDumper::m_outputStreamName |
|
protected |
Name of the output stream where we'll dump informations from the I4Assocs
object.
Default: "MsgStream" Available streams: ["MsgStream", "stdout", "stderr", "anyfile"]
Definition at line 109 of file I4MomDumper.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Display::Type m_display
its value translated into integer
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void setupOutputStream(Gaudi::Details::PropertyBase &outputStreamName)
Callback method to configure the output stream into which we'll dump the informations from I4Momentum...
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StringProperty m_outputStreamName
Name of the output stream where we'll dump informations from the I4Assocs object.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DataObjIDColl m_extendedExtraObjects
StatusCode dump(const std::string &collName)
Prints out (on the configured output stream) the content of an INavigable4MomentumCollection object,...
#define ATH_MSG_WARNING(x)
void setupDisplay(Gaudi::Details::PropertyBase &display)
Callback method to configure the display property which will tell how to dump the informations from I...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
StringProperty m_displayName
switch for the type of printout (pxpypze/eetaphim/...)
StringArrayProperty m_i4momContainersName
List of INavigable4Momentum containers one wants to dump.
AthAlgorithm()
Default constructor:
std::ostream * m_outputStream
pointer to the file descriptor in case the output stream is not a "MsgStream"
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>