CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PixelPortcardMap.h
Go to the documentation of this file.
1 #ifndef PixelPortcardMap_h
2 #define PixelPortcardMap_h
3 
11 #include <string>
12 #include <vector>
13 #include <map>
14 #include <set>
20 namespace pos {
32  public:
34 
35  PixelPortcardMap(std::vector<std::vector<std::string> > &tableMat);
36 
37  ~PixelPortcardMap() override;
38 
39  // Get the port card and AOH associated with this module. If the module has one(two) channels, this vector contains one(two) element(s).
40  const std::set<std::pair<std::string, int> > PortCardAndAOHs(const PixelModuleName &aModule) const;
41  // portcardname, aoh #
42 
43  const std::set<std::string> portcards(const PixelModuleName &aModule) const;
44 
45  int numChannels(const PixelModuleName &aModule) { return PortCardAndAOHs(aModule).size(); }
46 
47  const std::pair<std::string, int> PortCardAndAOH(const PixelModuleName &aModule,
48  const std::string &TBMChannel) const;
49  const std::pair<std::string, int> PortCardAndAOH(const PixelModuleName &aModule,
50  const PixelTBMChannel &TBMChannel) const;
51  const std::pair<std::string, int> PortCardAndAOH(const PixelChannel &aChannel) const;
52 
53  // set of all modules attached to a port card
54  std::set<PixelModuleName> modules(std::string portCardName) const;
55 
56  // all port cards in the map
57  std::set<std::string> portcards(const PixelDetectorConfig *detconfig = nullptr);
58 
59  // Added by Dario for Debbie (the PixelPortcardMap::portcards is way to slow for the interactive tool)
60  bool getName(std::string moduleName, std::string &portcardName);
61 
62  void writeASCII(std::string dir) const override;
63  void writeXML(pos::PixelConfigKey key, int version, std::string path) const override { ; }
65  int version,
67  std::ofstream *out,
68  std::ofstream *out1 = nullptr,
69  std::ofstream *out2 = nullptr) const override;
70  void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
71  void writeXMLTrailer(std::ofstream *out,
72  std::ofstream *out1 = nullptr,
73  std::ofstream *out2 = nullptr) const override;
74 
75  private:
76  // portcardname, AOH #
77  std::map<PixelChannel, std::pair<std::string, int> > map_;
78  };
79 } // namespace pos
80 /* @} */
81 #endif
This class specifies which detector components are used in the configuration (and eventually should s...
This file contains the base class for &quot;pixel configuration data&quot; management.
Simple class to hold either &quot;A&quot; or &quot;B&quot; for the TBM channel.
void writeASCII(std::string dir) const override
void writeXML(pos::PixelConfigKey key, int version, std::string path) const override
PixelPortcardMap(std::string filename)
This class implements...
This class implements..
std::set< PixelModuleName > modules(std::string portCardName) const
This file contains the base class for &quot;pixel configuration data&quot; management.
tuple key
prepare the HTCondor submission files and eventually submit them
This is the documentation about PixelDetectorConfig...
void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
const std::pair< std::string, int > PortCardAndAOH(const PixelModuleName &aModule, const std::string &TBMChannel) const
This class implements..
const std::set< std::pair< std::string, int > > PortCardAndAOHs(const PixelModuleName &aModule) const
This class implements..
const std::set< std::string > portcards(const PixelModuleName &aModule) const
void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
tuple filename
Definition: lut2db_cfg.py:20
Simple class to hold either &quot;A&quot; or &quot;B&quot; for the TBM channel.
int numChannels(const PixelModuleName &aModule)
bool getName(std::string moduleName, std::string &portcardName)
std::map< PixelChannel, std::pair< std::string, int > > map_