ATLAS Offline Software
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 
19 struct CaloSamplingHelper {
20 
21 public:
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 
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 
54 private:
55  const static std::map<std::string,CaloSampling::CaloSample> m_lookUp;
56  const static std::string m_unknown;
57 
58 };
59 #endif
CaloSamplingHelper::m_lookUp
static const std::map< std::string, CaloSampling::CaloSample > m_lookUp
Definition: CaloUtils/CaloUtils/CaloSamplingHelper.h:55
CaloSamplingHelper
algorithmic methods of the legacy CaloSampling.h class used by the legacy CaloCluster object
Definition: CaloEvent/CaloEvent/CaloSamplingHelper.h:19
CaloCell_ID.h
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
CaloSamplingHelper::getCalos
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.
Definition: CaloUtils/src/CaloSamplingHelper.cxx:129
CaloSamplingHelper::m_unknown
static const std::string m_unknown
Definition: CaloUtils/CaloUtils/CaloSamplingHelper.h:56
CaloSamplingHelper::getSamplings
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.
Definition: CaloUtils/src/CaloSamplingHelper.cxx:69
CaloSamplingHelper::getSamplingName
static const std::string & getSamplingName(const CaloSampling::CaloSample theSample)
Returns a string (name) for each CaloSampling.
Definition: CaloUtils/src/CaloSamplingHelper.cxx:42
CaloSamplingHelper::getSamplingId
static CaloSampling::CaloSample getSamplingId(const std::string &samplingName)
Returns the CaloSampling::CaloSample enumerator value.
Definition: CaloUtils/src/CaloSamplingHelper.cxx:61