Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TpcMap.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TpcMap.h
1 #ifndef __TpcMap_H__
2 #define __TpcMap_H__
3 
4 #include <map>
5 #include <string>
6 
7 class TpcMap
8 {
9  public:
10  // constructors and destructors
11  TpcMap() = default;
12  virtual ~TpcMap() = default;
13 
14  virtual unsigned int getLayer(const unsigned int FEE, const unsigned int FEEChannel, const unsigned int packetid = 0) const;
15  virtual unsigned int getPad(const unsigned int FEE, const unsigned int FEEChannel, const unsigned int packetid = 0) const;
16  virtual double getR(const unsigned int FEE, const unsigned int FEEChannel, const unsigned int packetid = 0) const;
17  virtual double getPhi(const unsigned int FEE, const unsigned int FEEChannel, const unsigned int packetid = 0) const;
18  virtual void setMapNames(const std::string &r1, const std::string &r2, const std::string &r3);
19 
20  private:
21  int digest_map(const std::string &fileName, const unsigned int section_offset);
22 
23  int _broken = 0;
24  struct tpc_map
25  {
26  unsigned int padnr;
27  unsigned int layer;
28  unsigned int FEE;
29  unsigned int FEEChannel;
30  double PadR;
31  double PadPhi;
32  };
33 
34  std::map<unsigned int, struct tpc_map> tmap;
35 };
36 
37 #endif