CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PixelToFEDAssociateFromAscii.h
Go to the documentation of this file.
1 #ifndef PixelToFEDAssociateFromAscii_H
2 #define PixelToFEDAssociateFromAscii_H
3 
9 #include <vector>
10 #include <string>
11 
14 
15 class PixelBarrelName;
16 class PixelEndcapName;
17 class PixelModuleName;
18 
20 public:
22 
24  int operator()(const PixelModuleName &) const override;
25 
27  std::string version() const override;
28 
30  int operator()(const PixelBarrelName &) const;
31 
33  int operator()(const PixelEndcapName &) const;
34 
35 private:
37  void init(const std::string &fileName);
38 
39  typedef TRange<int> Range;
40 
43  struct Bdu {
44  int b;
45  Range l, z, f;
46  bool operator()(const PixelBarrelName &) const;
47  };
48 
51  struct Edu {
52  int e;
53  Range d, b;
54  bool operator()(const PixelEndcapName &) const;
55  };
56 
57  typedef std::vector<std::pair<int, std::vector<Bdu> > > BarrelConnections;
58  typedef std::vector<std::pair<int, std::vector<Edu> > > EndcapConnections;
61 
62 private:
64 
66  void send(std::pair<int, std::vector<Bdu> > &, std::pair<int, std::vector<Edu> > &);
67  Bdu getBdu(std::string) const;
68  Edu getEdu(std::string) const;
69  Range readRange(const std::string &) const;
70 };
71 #endif
std::vector< std::pair< int, std::vector< Bdu > > > BarrelConnections
Range readRange(const std::string &) const
bool operator()(const PixelBarrelName &) const
PixelToFEDAssociateFromAscii(const std::string &fileName)
void init(const std::string &fileName)
initialisatin (read file)
void send(std::pair< int, std::vector< Bdu > > &, std::pair< int, std::vector< Edu > > &)
initialisation (read input file)
bool operator()(const PixelEndcapName &) const
int operator()(const PixelModuleName &) const override
FED id for module.
std::vector< std::pair< int, std::vector< Edu > > > EndcapConnections
std::string version() const override
version