CMS 3D CMS Logo

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 
19 
20 
22 public:
23 
25 
27  int operator()(const PixelModuleName &) const override;
28 
30  std::string version() const override;
31 
32 
34  int operator()(const PixelBarrelName &) const;
35 
37  int operator()(const PixelEndcapName &) const;
38 
39 private:
41  void init( const std::string & fileName);
42 
43 
44  typedef TRange<int> Range;
45 
48  struct Bdu { int b; Range l,z,f; bool operator()(const PixelBarrelName&) const;};
49 
52  struct Edu { int e; Range d,b; bool operator()(const PixelEndcapName&) const;};
53 
54  typedef std::vector< std::pair< int, std::vector<Bdu> > > BarrelConnections;
55  typedef std::vector< std::pair< int, std::vector<Edu> > > EndcapConnections;
56  BarrelConnections theBarrel;
57  EndcapConnections theEndcap;
58 
59 private:
60 
62 
64  void send (std::pair< int, std::vector<Bdu> > & ,
65  std::pair< int, std::vector<Edu> > & ) ;
66  Bdu getBdu( std::string ) const;
67  Edu getEdu( std::string ) const;
68  Range readRange( const std::string &) const;
69 };
70 #endif
Range readRange(const std::string &) const
std::string version() const override
version
bool operator()(const PixelBarrelName &) const
PixelToFEDAssociateFromAscii(const std::string &fileName)
void init(const std::string &fileName)
initialisatin (read file)
std::vector< std::pair< int, std::vector< Edu > > > EndcapConnections
void send(std::pair< int, std::vector< Bdu > > &, std::pair< int, std::vector< Edu > > &)
initialisation (read input file)
std::vector< std::pair< int, std::vector< Bdu > > > BarrelConnections
int operator()(const PixelModuleName &) const override
FED id for module.