CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
33 #endif
34 
36 {
37 
38  public:
39  friend class HcalChannelQualityXml;
40 
41  HcalAssistant();
42  virtual ~HcalAssistant();
43 
44  int addQuotes();
46 
48 
53 
55  int getSubdetector(int _rawid);
56  int getIeta(int _rawid);
57  int getIphi(int _rawid);
58  int getDepth(int _rawid);
59  int getRawId(HcalSubdetector _det, int _ieta, int _iphi, int _depth);
60 
61  int a_to_i(char * inbuf);
62 
63  private:
64  std::vector<std::string> quotes;
65  std::map<int,int> geom_to_rawid; // geom hash is the hey
66  std::map<int,int> rawid_to_geom; // rawId is the key
67  bool listIsRead; // were channels read from OMDS?
68 
69  //
70  //_____ encode HCAL geometry channel in a single integer hash
71  // not relying on HcalDetId
72  int getGeomId(HcalSubdetector _det, int _ieta, int _iphi, int _depth);
73  int getHcalIeta(int _geomId);
74  int getHcalIphi(int _geomId);
75  int getHcalDepth(int _geomId);
77  std::string getSubdetectorString(int _geomId);
78  int getRawId(int _geomId);
79  int getRawIdFromCmssw(int _geomId);
80  int getGeomId(int _rawid);
81 };
82 
83 
84 #endif
std::string getSubdetectorString(HcalSubdetector _det)
HcalSubdetector getHcalSubdetector(int _geomId)
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)
std::map< int, int > geom_to_rawid
Definition: HcalAssistant.h:65
int getHcalIeta(int _geomId)
HcalOtherSubdetector
Definition: HcalAssistant.h:32
int getIphi(int _rawid)
HcalSubdetector
Definition: HcalAssistant.h:31
std::map< int, int > rawid_to_geom
Definition: HcalAssistant.h:66
HcalZDCDetId::Section getZDCSection(std::string _section)
HcalSubdetector getSubdetector(std::string _det)
int getDepth(int _rawid)
int getListOfChannelsFromDb()
int getHcalIphi(int _geomId)
std::vector< std::string > quotes
Definition: HcalAssistant.h:64
int getIeta(int _rawid)
std::string getUserName(void)