CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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  {
33  public:
34 
36 
37  PixelPortcardMap(std::vector< std::vector < std::string> > &tableMat);
38 
39  virtual ~PixelPortcardMap();
40 
41  // Get the port card and AOH associated with this module. If the module has one(two) channels, this vector contains one(two) element(s).
42  const std::set< std::pair< std::string, int > > PortCardAndAOHs(const PixelModuleName& aModule) const;
43  // portcardname, aoh #
44 
45  const std::set< std::string > portcards(const PixelModuleName& aModule) const;
46 
47  int numChannels(const PixelModuleName& aModule) {return PortCardAndAOHs(aModule).size();}
48 
49  const std::pair< std::string, int > PortCardAndAOH(const PixelModuleName& aModule, const std::string& TBMChannel) const;
50  const std::pair< std::string, int > PortCardAndAOH(const PixelModuleName& aModule, 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=0);
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  virtual void writeASCII(std::string dir) const;
64  virtual void writeXMLHeader( pos::PixelConfigKey key,
65  int version,
67  std::ofstream *out,
68  std::ofstream *out1 = NULL,
69  std::ofstream *out2 = NULL
70  ) const ;
71  virtual void writeXML( std::ofstream *out,
72  std::ofstream *out1 = NULL ,
73  std::ofstream *out2 = NULL ) const ;
74  virtual void writeXMLTrailer( std::ofstream *out,
75  std::ofstream *out1 = NULL,
76  std::ofstream *out2 = NULL
77  ) const ;
78 
79  private:
80  // portcardname, AOH #
81  std::map< PixelChannel, std::pair<std::string, int> > map_;
82 
83  };
84 }
85 /* @} */
86 #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.
#define NULL
Definition: scimark2.h:8
PixelPortcardMap(std::string filename)
This class implements...
This class implements..
std::set< PixelModuleName > modules(std::string portCardName) const
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
This file contains the base class for &quot;pixel configuration data&quot; management.
virtual void writeASCII(std::string dir) const
This is the documentation about PixelDetectorConfig...
virtual void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
const std::pair< std::string, int > PortCardAndAOH(const PixelModuleName &aModule, const std::string &TBMChannel) const
This class implements..
tuple out
Definition: dbtoconf.py:99
void writeXML(pos::PixelConfigKey key, int version, std::string path) const
virtual void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const
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
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)
dbl *** dir
Definition: mlp_gen.cc:35
std::map< PixelChannel, std::pair< std::string, int > > map_
bool getName(std::string moduleName, std::string &portcardName)