CMS 3D CMS Logo

PixelFECConfig.h
Go to the documentation of this file.
1 #ifndef PixelFECConfig_h
2 #define PixelFECConfig_h
3 
9 #include <iostream>
10 #include <vector>
11 #include <string>
12 #include <cassert>
15 
16 namespace pos {
25  public:
28  filename); // <---- Modified for the conversion from parallel vectors to object that contain the configuration
29 
30  PixelFECConfig(std::vector<std::vector<std::string> > &tableMat);
31 
32  unsigned int getNFECBoards() const;
33 
34  unsigned int getFECNumber(unsigned int i) const;
35  unsigned int getCrate(unsigned int i) const;
36  unsigned int getVMEBaseAddress(unsigned int i) const;
37  unsigned int crateFromFECNumber(unsigned int fecnumber) const;
38  unsigned int VMEBaseAddressFromFECNumber(unsigned int fecnumber) const;
39  unsigned int getFECSlot(unsigned int i) { return FECSlotFromVMEBaseAddress(getVMEBaseAddress(i)); }
40  unsigned int FECSlotFromFECNumber(unsigned int fecnumber) {
42  }
43 
44  void writeASCII(std::string dir = "") const override;
45  void writeXML(pos::PixelConfigKey key, int version, std::string path) const override { ; }
47  int version,
49  std::ofstream *out,
50  std::ofstream *out1 = nullptr,
51  std::ofstream *out2 = nullptr) const override;
52  void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
53  void writeXMLTrailer(std::ofstream *out,
54  std::ofstream *out1 = nullptr,
55  std::ofstream *out2 = nullptr) const override;
56 
57  //friend std::ostream& operator<<(std::ostream& s, const PixelDetectorconfig& config);
58 
59  private:
60  // VMEBaseAddress = (FEC slot)x(0x8000000)
61  unsigned int FECSlotFromVMEBaseAddress(unsigned int VMEBaseAddress) {
62  assert(VMEBaseAddress % 0x8000000 == 0);
63  return VMEBaseAddress / 0x8000000;
64  }
65 
66  //Already fixed from parallel vectors to vector of objects .... the object that contains the FEC config is PixelFECParameters
67 
68  // std::vector<unsigned int> fecnumber_;
69  // std::vector<unsigned int> crate_;
70  // std::vector<unsigned int> vmebaseaddress_;
71 
72  std::vector<PixelFECParameters> fecconfig_;
73  };
74 } // namespace pos
75 /* @} */
76 #endif
pos::PixelFECConfig::PixelFECConfig
PixelFECConfig(std::string filename)
Definition: PixelFECConfig.cc:90
pos::PixelFECConfig::writeXMLHeader
void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
mps_fire.i
i
Definition: mps_fire.py:428
pos::PixelFECConfig::getFECNumber
unsigned int getFECNumber(unsigned int i) const
pos::PixelFECConfig::getCrate
unsigned int getCrate(unsigned int i) const
pos::PixelFECConfig::getNFECBoards
unsigned int getNFECBoards() const
pos::PixelFECConfig::writeXMLTrailer
void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
pos
Definition: PixelAliasList.h:18
cms::cuda::assert
assert(be >=bs)
pos::PixelConfigBase
This file contains the base class for "pixel configuration data" management.
Definition: PixelConfigBase.h:32
pos::PixelFECConfig::VMEBaseAddressFromFECNumber
unsigned int VMEBaseAddressFromFECNumber(unsigned int fecnumber) const
pos::PixelFECConfig::FECSlotFromFECNumber
unsigned int FECSlotFromFECNumber(unsigned int fecnumber)
Definition: PixelFECConfig.h:40
pos::PixelFECConfig::getVMEBaseAddress
unsigned int getVMEBaseAddress(unsigned int i) const
pos::PixelFECConfig::writeXML
void writeXML(pos::PixelConfigKey key, int version, std::string path) const override
Definition: PixelFECConfig.h:45
PixelConfigBase.h
This file contains the base class for "pixel configuration data" management.
pos::PixelFECConfig::writeASCII
void writeASCII(std::string dir="") const override
pos::PixelFECConfig::getFECSlot
unsigned int getFECSlot(unsigned int i)
Definition: PixelFECConfig.h:39
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
pos::PixelConfigKey
This class implements..
Definition: PixelConfigKey.h:20
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PointingDoubleMultiSkim_cfg.out2
out2
Definition: PointingDoubleMultiSkim_cfg.py:85
PointingDoubleMultiSkim_cfg.out1
out1
Definition: PointingDoubleMultiSkim_cfg.py:57
pos::PixelFECConfig::crateFromFECNumber
unsigned int crateFromFECNumber(unsigned int fecnumber) const
pos::PixelFECConfig::fecconfig_
std::vector< PixelFECParameters > fecconfig_
Definition: PixelFECConfig.h:72
pos::PixelFECConfig::FECSlotFromVMEBaseAddress
unsigned int FECSlotFromVMEBaseAddress(unsigned int VMEBaseAddress)
Definition: PixelFECConfig.h:61
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
PixelFECParameters.h
This class implements..
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
pos::PixelFECConfig
This class specifies which FEC boards are used and how they are addressed.
Definition: PixelFECConfig.h:24
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