CMS 3D CMS Logo

PixelDetectorConfig.h
Go to the documentation of this file.
1 #ifndef PixelDetectorConfig_h
2 #define PixelDetectorConfig_h
3 
11 //
12 // This class specifies which detector
13 // components are used in the configuration
14 // (and eventually should specify which
15 // xdaq process controlls which components).
16 //
17 //
18 //
19 //
20 
21 #include <vector>
22 #include <set>
23 #include <map>
24 #include <string>
30 
31 namespace pos {
40  public:
41  PixelDetectorConfig(std::vector<std::vector<std::string> > &tableMat);
43 
44  unsigned int getNModules() const;
45 
46  PixelModuleName getModule(unsigned int i) const;
47 
48  const std::vector<PixelModuleName> &getModuleList() const { return modules_; }
49 
50  void addROC(PixelROCName &, std::string statusLabel);
51  void addROC(PixelROCName &);
52  void removeROC(PixelROCName &);
53  const std::map<PixelROCName, PixelROCStatus> &getROCsList() const { return rocs_; };
54 
55  void writeASCII(std::string dir = "") const override;
56  void writeXML(pos::PixelConfigKey key, int version, std::string path) const override;
58  int version,
60  std::ofstream *out,
61  std::ofstream *out1 = nullptr,
62  std::ofstream *out2 = nullptr) const override;
63  void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
64  void writeXMLTrailer(std::ofstream *out,
65  std::ofstream *out1 = nullptr,
66  std::ofstream *out2 = nullptr) const override;
67 
68  bool containsModule(const PixelModuleName &moduleToFind) const;
69 
70  std::set<unsigned int> getFEDs(PixelNameTranslation *translation) const;
71  std::map<unsigned int, std::set<unsigned int> > getFEDsAndChannels(PixelNameTranslation *translation) const;
72 
73  //friend std::ostream& operator<<(std::ostream& s, const PixelDetectorconfig& config);
74 
75  private:
76  std::vector<PixelModuleName> modules_;
77 
78  std::map<PixelROCName, PixelROCStatus> rocs_;
79  };
80 } // namespace pos
81 /* @} */
82 #endif
This file contains the base class for "pixel configuration data" management.
bool containsModule(const PixelModuleName &moduleToFind) const
Store mfec, mfecchannel etc.
const std::vector< PixelModuleName > & getModuleList() const
unsigned int getNModules() const
This class provides a translation from the naming documents standard to specify the ROC to the corres...
This class implements..
This file contains the base class for "pixel configuration data" management.
PixelDetectorConfig(std::vector< std::vector< std::string > > &tableMat)
PixelModuleName getModule(unsigned int i) const
std::map< PixelROCName, PixelROCStatus > rocs_
This is the documentation about PixelDetectorConfig...
const std::map< PixelROCName, PixelROCStatus > & getROCsList() const
std::vector< PixelModuleName > modules_
void writeXML(pos::PixelConfigKey key, int version, std::string path) const override
void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
This class implements..
std::set< unsigned int > getFEDs(PixelNameTranslation *translation) const
void addROC(PixelROCName &, std::string statusLabel)
std::map< unsigned int, std::set< unsigned int > > getFEDsAndChannels(PixelNameTranslation *translation) const
This is the documentation about PixelNameTranslation...
This class implements..
This class implements..
Definition: PixelROCName.h:23
void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
void writeASCII(std::string dir="") const override
void removeROC(PixelROCName &)
This class keeps the possible non-standard status a ROC can have.