10#include <GaudiKernel/ServiceHandle.h>
43 return StatusCode::SUCCESS;
51 if (!readHandleEvtShape.
isValid()) {
53 return(StatusCode::FAILURE);
55 evtShape_const = readHandleEvtShape.
cptr();
59 auto evtShape=std::make_unique<xAOD::HIEventShapeContainer>();
60 auto evtShapeAux=std::make_unique<xAOD::HIEventShapeAuxContainer>();
61 evtShape->setStore(evtShapeAux.get());
72 ATH_CHECK( writeHandleEvtShape.
record(std::move(evtShape), std::move(evtShapeAux)) );
74 evtShape_const = writeHandleEvtShape.
cptr();
82 ATH_CHECK(write_handle_esSummary.
record(std::make_unique<xAOD::HIEventShapeContainer>(),
83 std::make_unique<xAOD::HIEventShapeAuxContainer>()));
90 return StatusCode::SUCCESS;
96 return StatusCode::SUCCESS;
102 std::stringstream buffer;
103 buffer << std::endl <<
"|############|############|############|############|############|" << std::endl;
104 buffer <<
"|" << std::setw(10) <<
"EtaMin" <<
" |"\
105 << std::setw(10) <<
"EtaMax" <<
" |"\
106 << std::setw(10) <<
"Layer" <<
" |"\
107 << std::setw(10) <<
"NCells" <<
" |"\
108 << std::setw(10) <<
"Et" <<
" |"<< std::endl;
110 for (
unsigned int i = 0;i <
size;i++) {
112 int NCells =
sh->nCells();
113 int Layer =
sh->layer();
115 float EtaMin =
sh->etaMin();
116 float EtaMax =
sh->etaMax();
118 if (Et == 0)
continue;
119 buffer <<
"|" << std::setw(10) << EtaMin <<
" |"\
120 << std::setw(10) << EtaMax <<
" |"\
121 << std::setw(10) << Layer <<
" |"\
122 << std::setw(10) << NCells <<
" |"\
123 << std::setw(10) << Et <<
" |" <<std::endl;
125 buffer <<
"|############|############|############|############|############|" << std::endl;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
size_t size() const
Number of registered mappings.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
virtual StatusCode execute(const EventContext &ctx) const override
HIEventShapeMaker(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
SG::WriteHandleKey< xAOD::HIEventShapeContainer > m_summaryKey
SG::WriteHandleKey< xAOD::HIEventShapeContainer > m_outputKey
std::string PrintHIEventShapeContainer(const xAOD::HIEventShapeContainer *Container) const
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_towerContainerKey
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_readExistingKey
ToolHandle< IHIEventShapeFiller > m_HIEventShapeFillerTool
Gaudi::Property< bool > m_summaryOnly
virtual StatusCode finalize() override
SG::ReadHandleKey< INavigable4MomentumCollection > m_naviContainerKey
ToolHandle< IHIEventShapeSummaryTool > m_summaryTool
storage of the time histories of all the cells
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
const_pointer_type cptr() const
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.
HIEventShape_v2 HIEventShape
Definition of the latest event info version.