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 // $Id: HcalAssistant.h,v 1.5 2009/08/11 14:23:31 kukartse Exp $
20 //
21 
22 #include <iostream>
23 #include <string>
24 #include <vector>
25 #include <map>
26 
29 
30 #ifndef DATAFORMATS_HCALDETID_HCALSUBDETECTOR_H
31 #define DATAFORMATS_HCALDETID_HCALSUBDETECTOR_H
34 #endif
35 
37 {
38 
39  public:
40  friend class HcalChannelQualityXml;
41 
42  HcalAssistant();
43  virtual ~HcalAssistant();
44 
45  int addQuotes();
46  std::string getRandomQuote(void);
47 
48  std::string getUserName(void);
49 
50  HcalSubdetector getSubdetector(std::string _det);
51  std::string getSubdetectorString(HcalSubdetector _det);
52  HcalZDCDetId::Section getZDCSection(std::string _section);
53  std::string getZDCSectionString(HcalZDCDetId::Section _section);
54 
56  int getSubdetector(int _rawid);
57  int getIeta(int _rawid);
58  int getIphi(int _rawid);
59  int getDepth(int _rawid);
60  int getRawId(HcalSubdetector _det, int _ieta, int _iphi, int _depth);
61 
62  int a_to_i(char * inbuf);
63 
64  private:
65  std::vector<std::string> quotes;
66  std::map<int,int> geom_to_rawid; // geom hash is the hey
67  std::map<int,int> rawid_to_geom; // rawId is the key
68  bool listIsRead; // were channels read from OMDS?
69 
70  //
71  //_____ encode HCAL geometry channel in a single integer hash
72  // not relying on HcalDetId
73  int getGeomId(HcalSubdetector _det, int _ieta, int _iphi, int _depth);
74  int getHcalIeta(int _geomId);
75  int getHcalIphi(int _geomId);
76  int getHcalDepth(int _geomId);
78  std::string getSubdetectorString(int _geomId);
79  int getRawId(int _geomId);
80  int getRawIdFromCmssw(int _geomId);
81  int getGeomId(int _rawid);
82 };
83 
84 
85 #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)
#define _depth
Definition: Pythia6jets.h:5
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:66
int getHcalIeta(int _geomId)
HcalOtherSubdetector
Definition: HcalAssistant.h:33
int getIphi(int _rawid)
HcalSubdetector
Definition: HcalAssistant.h:32
std::map< int, int > rawid_to_geom
Definition: HcalAssistant.h:67
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:65
int getIeta(int _rawid)
std::string getUserName(void)