ATLAS Offline Software
Loading...
Searching...
No Matches
CaloUtils/CaloUtils/CaloSamplingHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5//Dear emacs this is -*-c++-*-
6//C++11 to be precise
7
8#ifndef CALOUTILS_CALOSAMPLINGHELPER_H
9#define CALOUTILS_CALOSAMPLINGHELPER_H
10
12#include "CaloGeoHelpers/CaloSampling.h"
13
14//#include "CaloUtils/CaloSamplingId.h"
15
16#include <string>
17#include <map>
18
19struct CaloSamplingHelper {
20
21public:
25 static const std::string& getSamplingName(const CaloSampling::CaloSample theSample);
26
30 static CaloSampling::CaloSample getSamplingId(const std::string& samplingName);
31
36 static bool getSamplings(const std::vector<CaloCell_ID::SUBCALO>& theCalos,
37 std::vector<CaloSampling::CaloSample>& theSamplings);
38
41
43 static bool getSamplings(const CaloCell_ID::SUBCALO& theCalo,
44 std::vector<CaloSampling::CaloSample>& theSamplings);
45
46
51 static bool getCalos(const std::vector<CaloSampling::CaloSample>& theSamplings,
52 std::vector<CaloCell_ID::SUBCALO>& theCalos);
53
54private:
55 const static std::map<std::string,CaloSampling::CaloSample> m_lookUp;
56 const static std::string m_unknown;
57
58};
59#endif
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
CaloSamplingHelper()=default
static bool getSamplings(const std::vector< CaloCell_ID::SUBCALO > &theCalos, std::vector< CaloSampling::CaloSample > &theSamplings)
Returns a list of samplings enumerators for a list of sub-calos.
static const std::map< std::string, CaloSampling::CaloSample > m_lookUp
static CaloSampling::CaloSample getSamplingId(const std::string &samplingName)
Returns the CaloSampling::CaloSample enumerator value.
static bool getCalos(const std::vector< CaloSampling::CaloSample > &theSamplings, std::vector< CaloCell_ID::SUBCALO > &theCalos)
Returns a list of sub-calos for a list of samplings.
static const std::string & getSamplingName(const CaloSampling::CaloSample theSample)
Returns a string (name) for each CaloSampling.