CMS 3D CMS Logo

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
pos::PixelDetectorConfig
This is the documentation about PixelDetectorConfig...
Definition: PixelDetectorConfig.h:39
pos
Definition: PixelAliasList.h:18
pos::PixelModuleName
This class implements..
Definition: PixelModuleName.h:26
pos::PixelConfigBase
This file contains the base class for "pixel configuration data" management.
Definition: PixelConfigBase.h:32
pos::PixelPortcardMap::writeASCII
void writeASCII(std::string dir) const override
Definition: PixelPortcardMap.cc:180
pos::PixelPortcardMap::writeXML
void writeXML(pos::PixelConfigKey key, int version, std::string path) const override
Definition: PixelPortcardMap.h:63
PixelTBMChannel.h
Simple class to hold either "A" or "B" for the TBM channel.
pos::PixelPortcardMap::PixelPortcardMap
PixelPortcardMap(std::string filename)
Definition: PixelPortcardMap.cc:115
pos::PixelPortcardMap::writeXMLHeader
void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
Definition: PixelPortcardMap.cc:307
PixelConfigBase.h
This file contains the base class for "pixel configuration data" management.
PixelModuleName.h
This class implements..
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
pos::PixelTBMChannel
Simple class to hold either "A" or "B" for the TBM channel.
Definition: PixelTBMChannel.h:18
PixelChannel.h
This class implements...
PixelDetectorConfig.h
This class specifies which detector components are used in the configuration (and eventually should s...
pos::PixelPortcardMap::~PixelPortcardMap
~PixelPortcardMap() override
Definition: PixelPortcardMap.cc:178
pos::PixelConfigKey
This class implements..
Definition: PixelConfigKey.h:20
pos::PixelPortcardMap::PortCardAndAOHs
const std::set< std::pair< std::string, int > > PortCardAndAOHs(const PixelModuleName &aModule) const
Definition: PixelPortcardMap.cc:201
pos::PixelChannel
Definition: PixelChannel.h:21
EcalCalibMonitorClient_cfi.moduleName
moduleName
Definition: EcalCalibMonitorClient_cfi.py:17
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
pos::PixelPortcardMap::modules
std::set< PixelModuleName > modules(std::string portCardName) const
Definition: PixelPortcardMap.cc:260
pos::PixelPortcardMap::portcards
const std::set< std::string > portcards(const PixelModuleName &aModule) const
Definition: PixelPortcardMap.cc:229
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pos::PixelPortcardMap::PortCardAndAOH
const std::pair< std::string, int > PortCardAndAOH(const PixelModuleName &aModule, const std::string &TBMChannel) const
Definition: PixelPortcardMap.cc:245
pos::PixelPortcardMap::getName
bool getName(std::string moduleName, std::string &portcardName)
Definition: PixelPortcardMap.cc:217
pos::PixelPortcardMap::writeXMLTrailer
void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
Definition: PixelPortcardMap.cc:362
pos::PixelPortcardMap
Definition: PixelPortcardMap.h:31
PointingDoubleMultiSkim_cfg.out2
out2
Definition: PointingDoubleMultiSkim_cfg.py:85
PointingDoubleMultiSkim_cfg.out1
out1
Definition: PointingDoubleMultiSkim_cfg.py:57
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
pos::PixelPortcardMap::map_
std::map< PixelChannel, std::pair< std::string, int > > map_
Definition: PixelPortcardMap.h:77
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
pos::PixelPortcardMap::numChannels
int numChannels(const PixelModuleName &aModule)
Definition: PixelPortcardMap.h:45
crabWrapper.key
key
Definition: crabWrapper.py:19
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23