CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
19 
20 
22 public:
23 
24  PixelToFEDAssociateFromAscii(const std::string & fileName);
25 
27  virtual int operator()(const PixelModuleName &) const;
28 
30  virtual std::string version() const;
31 
32 
34  virtual int operator()(const PixelBarrelName &) const;
35 
37  virtual 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;
58 
59 private:
60 
61  std::string theVersion;
62 
64  void send (std::pair< int, std::vector<Bdu> > & ,
65  std::pair< int, std::vector<Edu> > & ) const;
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
bool operator()(const PixelBarrelName &) const
PixelToFEDAssociateFromAscii(const std::string &fileName)
void send(std::pair< int, std::vector< Bdu > > &, std::pair< int, std::vector< Edu > > &) const
initialisation (read input file)
void init(const std::string &fileName)
initialisatin (read file)
std::vector< std::pair< int, std::vector< Edu > > > EndcapConnections
virtual std::string version() const
version
bool operator()(const PixelEndcapName &) const
virtual int operator()(const PixelModuleName &) const
FED id for module.
std::vector< std::pair< int, std::vector< Bdu > > > BarrelConnections