CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HcalAssistant.h
Go to the documentation of this file.
1 #ifndef CaloOnlineTools_HcalOnlineDb_HcalAssistant_h
2 #define CaloOnlineTools_HcalOnlineDb_HcalAssistant_h
3 // -*- C++ -*-
4 //
5 // Package: HcalOnlineDb
6 // Class : HcalAssistant
7 //
16 //
17 // Original Author: Gena Kukartsev, kukarzev@fnal.gov
18 // Created: Thu Jul 16 11:39:31 CEST 2009
19 //
20 
21 #include <iostream>
22 #include <string>
23 #include <vector>
24 #include <map>
25 
28 
29 #ifndef DATAFORMATS_HCALDETID_HCALSUBDETECTOR_H
30 #define DATAFORMATS_HCALDETID_HCALSUBDETECTOR_H
32  HcalEmpty = 0,
35  HcalOuter = 3,
39 };
41 #endif
42 
44 public:
45  friend class HcalChannelQualityXml;
46 
47  HcalAssistant();
48  virtual ~HcalAssistant();
49 
50  int addQuotes();
52 
54 
59 
61  int getSubdetector(int _rawid);
62  int getIeta(int _rawid);
63  int getIphi(int _rawid);
64  int getDepth(int _rawid);
65  int getRawId(HcalSubdetector _det, int _ieta, int _iphi, int _depth);
66 
67  int a_to_i(char* inbuf);
68 
69 private:
70  std::vector<std::string> quotes;
71  std::map<int, int> geom_to_rawid; // geom hash is the hey
72  std::map<int, int> rawid_to_geom; // rawId is the key
73  bool listIsRead; // were channels read from OMDS?
74 
75  //
76  //_____ encode HCAL geometry channel in a single integer hash
77  // not relying on HcalDetId
78  int getGeomId(HcalSubdetector _det, int _ieta, int _iphi, int _depth);
79  int getHcalIeta(int _geomId);
80  int getHcalIphi(int _geomId);
81  int getHcalDepth(int _geomId);
83  std::string getSubdetectorString(int _geomId);
84  int getRawId(int _geomId);
85  int getRawIdFromCmssw(int _geomId);
86  int getGeomId(int _rawid);
87 };
88 
89 #endif
std::string getSubdetectorString(HcalSubdetector _det)
HcalSubdetector getHcalSubdetector(int _geomId)
friend class HcalChannelQualityXml
Definition: HcalAssistant.h:45
virtual ~HcalAssistant()
int getHcalDepth(int _geomId)
std::string getRandomQuote(void)
std::string getZDCSectionString(HcalZDCDetId::Section _section)
int getRawIdFromCmssw(int _geomId)
int a_to_i(char *inbuf)
int getRawId(HcalSubdetector _det, int _ieta, int _iphi, int _depth)
int getGeomId(HcalSubdetector _det, int _ieta, int _iphi, int _depth)
int getHcalIeta(int _geomId)
HcalOtherSubdetector
Definition: HcalAssistant.h:40
int getIphi(int _rawid)
HcalSubdetector
Definition: HcalAssistant.h:31
HcalZDCDetId::Section getZDCSection(std::string _section)
HcalSubdetector getSubdetector(std::string _det)
int getDepth(int _rawid)
int getListOfChannelsFromDb()
std::map< int, int > geom_to_rawid
Definition: HcalAssistant.h:71
int getHcalIphi(int _geomId)
std::vector< std::string > quotes
Definition: HcalAssistant.h:70
std::map< int, int > rawid_to_geom
Definition: HcalAssistant.h:72
int getIeta(int _rawid)
std::string getUserName(void)