ATLAS Offline Software
Loading...
Searching...
No Matches
PerfMonServices.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef IDPERFMON_SERVICES_H
6#define IDPERFMON_SERVICES_H
7
8#include "GaudiKernel/INTupleSvc.h"
9#include "GaudiKernel/ITHistSvc.h"
10#include "GaudiKernel/Algorithm.h"
11
13
15{
16 public:
17 // Constructors and Destructors.
20
51
52 static const std::string& getContainerName( CONTAINERS eContainer ) { return s_sContainerNames[eContainer]; }
53 static const std::string& getAtlfastContainerName( CONTAINERS eContainer ) { return s_sAtlfastContainerNames[eContainer]; }
54
55 template <class T> static const T* getContainer ( CONTAINERS eContainer ) {
56 const T* pxContainer = nullptr;
57 const std::string& sContainerName = PerfMonServices::getContainerName( eContainer );
58 SmartIF<StoreGateSvc> storeGate{Gaudi::svcLocator()->service("StoreGateSvc")};
59 if ( storeGate ) {
60 storeGate->retrieve( pxContainer , sContainerName ).ignore();
61 }
62 return pxContainer;
63 }
64
65 template <class T> T static const GetMax (T a, T b) {
66 T result;
67 result = a>b? a : b;
68 return result;
69 }
70
71 protected:
72
73 private:
74 // Names of the various object containers.
75 static const std::string s_sContainerNames[NUM_CONTAINERS];
76 static const std::string s_sAtlfastContainerNames[NUM_CONTAINERS];
77};
78
79#endif
static Double_t a
static const std::string s_sAtlfastContainerNames[NUM_CONTAINERS]
static const T * getContainer(CONTAINERS eContainer)
static T const GetMax(T a, T b)
static const std::string & getContainerName(CONTAINERS eContainer)
static const std::string & getAtlfastContainerName(CONTAINERS eContainer)
static const std::string s_sContainerNames[NUM_CONTAINERS]