Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:06

0001 #ifndef DataFormats_METReco_HcalCaloFlagTool_h
0002 #define DataFormats_METReco_HcalCaloFlagTool_h
0003 
0004 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0005 #include "DataFormats/METReco/interface/HcalCaloFlagLabels.h"
0006 #include <string>
0007 
0008 // Use the HcalCaloFlagTool (below) for full interpretation of HcalCaloFlagLabels
0009 /** \brief Provides interpretation of flag bits with understanding of 
0010     CMSSW version dependence.
0011 */
0012 class HcalCaloFlagTool {
0013 public:
0014   HcalCaloFlagTool(const std::string& releaseName);
0015   std::string getFieldName(HcalSubdetector sd, int bit) const;
0016   int getFieldWidth(HcalSubdetector sd, int bit) const;
0017   int getFieldStart(HcalSubdetector sd, const std::string& field) const;
0018   int getFieldWidth(HcalSubdetector sd, const std::string& field) const;
0019   bool hasField(HcalSubdetector sd, const std::string& field) const;
0020   bool hasField(HcalSubdetector sd, int bit) const;
0021 
0022 private:
0023   std::string releaseName_;
0024   bool standardFormat_;
0025   int major_, minor_, patch_, subpatch_;
0026 };
0027 
0028 #endif  //DataFormats_METReco_HcalCaloFlagTool_h