CMS 3D CMS Logo

SiPixelFEDChannelContainer.h
Go to the documentation of this file.
1 #ifndef CondFormats_SiPixelObjects_SiPixelFEDChannelContainer_h
2 #define CondFormats_SiPixelObjects_SiPixelFEDChannelContainer_h
3 
6 #include "DataFormats/SiPixelDetId/interface/PixelFEDChannel.h" // N.B. a DataFormat is serialized here (need for dedicated serialization rules, see CondFormats/External/interface/PixelFEDChannel.h)
7 
8 #include <map>
9 #include <string>
10 #include <vector>
11 
13 public:
14  typedef std::map<DetId,std::vector<PixelFEDChannel> > SiPixelFEDChannelCollection;
15  typedef std::unordered_map<std::string, SiPixelFEDChannelCollection> SiPixelBadFEDChannelsScenarioMap;
16 
20 
21  void setScenario(const std::string &theScenarioId, const SiPixelFEDChannelCollection &theBadFEDChannels);
22 
23  const SiPixelBadFEDChannelsScenarioMap& getScenarioMap () const {return m_scenarioMap;}
24 
25  SiPixelFEDChannelCollection getSiPixelBadFedChannels(const std::string &ScenarioId) const;
26  const SiPixelFEDChannelCollection & getSiPixelBadFedChannels(const std::string &ScenarioId);
27 
28  const std::vector<PixelFEDChannel>& getSiPixelBadFedChannelsInDetId(const std::string &theScenarioId,DetId theDetId);
29 
30  std::unique_ptr<PixelFEDChannelCollection> getDetSetBadPixelFedChannels(const std::string &ScenarioId) const;
31 
32  double size()const {return m_scenarioMap.size();}
33  std::vector<std::string> getScenarioList() const;
34 
35  void printAll() const;
36 
37  //dumping values on output stream
38  void print(std::ostream & os) const;
39 
40 private:
41 
42  SiPixelBadFEDChannelsScenarioMap m_scenarioMap;
43 
45 
46 };
47 
48 std::ostream & operator<<( std::ostream &, SiPixelFEDChannelContainer FEDChannels);
49 
50 #endif //CondFormats_SiPixelObjects_SiPixelFEDChannelContainer_h
SiPixelBadFEDChannelsScenarioMap m_scenarioMap
std::ostream & operator<<(std::ostream &, SiPixelFEDChannelContainer FEDChannels)
std::vector< std::string > getScenarioList() const
void print(std::ostream &os) const
const SiPixelBadFEDChannelsScenarioMap & getScenarioMap() const
Definition: DetId.h:18
void setScenario(const std::string &theScenarioId, const SiPixelFEDChannelCollection &theBadFEDChannels)
#define COND_SERIALIZABLE
Definition: Serializable.h:38
SiPixelFEDChannelCollection getSiPixelBadFedChannels(const std::string &ScenarioId) const
std::unique_ptr< PixelFEDChannelCollection > getDetSetBadPixelFedChannels(const std::string &ScenarioId) const
std::map< DetId, std::vector< PixelFEDChannel > > SiPixelFEDChannelCollection
std::unordered_map< std::string, SiPixelFEDChannelCollection > SiPixelBadFEDChannelsScenarioMap
const std::vector< PixelFEDChannel > & getSiPixelBadFedChannelsInDetId(const std::string &theScenarioId, DetId theDetId)
SiPixelFEDChannelContainer(const SiPixelFEDChannelContainer &rhs)