4#ifndef TRIGT1CALOMONITORING_EFEXSIMMONITORALGORITHM_H
5#define TRIGT1CALOMONITORING_EFEXSIMMONITORALGORITHM_H
27 virtual StatusCode
fillHistograms(
const EventContext& ctx )
const override;
63 template <
typename T>
void fillVectors(
const SG::ReadHandleKey<T>& key,
const EventContext& ctx, std::vector<float>& etas, std::vector<float>& phis, std::vector<unsigned int>& word0s)
const {
64 etas.clear();phis.clear();word0s.clear();
67 etas.reserve(tobs->size());
68 phis.reserve(tobs->size());
69 word0s.reserve(tobs->size());
70 std::vector<SortableTob> sortedTobs;
71 sortedTobs.reserve(tobs->size());
72 for(
auto tob : *tobs) {
73 sortedTobs.emplace_back(SortableTob{tob->word0(),tob->eta(),tob->phi()});
75 std::sort(sortedTobs.begin(),sortedTobs.end(),[](
const SortableTob& lhs,
const SortableTob& rhs) { return lhs.word0<rhs.word0; });
76 for(
auto& tob : sortedTobs) {
77 etas.push_back(tob.eta);
78 phis.push_back(tob.phi);
79 word0s.push_back(tob.word0);
Header file to be included by clients of the Monitored infrastructure.
Property holding a SG store/key/clid from which a ReadHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFexEmContainerKey
SG::ReadHandleKey< CaloCellContainer > m_scellKey
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
std::map< int, std::string > m_firstEvents_DataTowers ATLAS_THREAD_SAFE
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauxSimContainerKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFexEmSimContainerKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauContainerKey
SG::ReadHandleKey< xAOD::eFexTowerContainer > m_eFexTowerContainerKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauSimContainerKey
void fillVectors(const SG::ReadHandleKey< T > &key, const EventContext &ctx, std::vector< float > &etas, std::vector< float > &phis, std::vector< unsigned int > &word0s) const
virtual ~EfexSimMonitorAlgorithm()=default
std::mutex m_firstEventsMutex
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFexEmxSimContainerKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauxContainerKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFexEmxContainerKey
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
SortableTob(unsigned int w, float e, float p)