00001 #ifndef CondFormats_SiStripObjects_SiStripFedCabling_H 00002 #define CondFormats_SiStripObjects_SiStripFedCabling_H 00003 00004 #include "CondFormats/SiStripObjects/interface/FedChannelConnection.h" 00005 #include <boost/cstdint.hpp> 00006 #include <sstream> 00007 #include <vector> 00008 #include <string> 00009 00010 class SiStripFedCabling; 00011 00013 std::ostream& operator<< ( std::ostream&, const SiStripFedCabling& ); 00014 00020 class SiStripFedCabling { 00021 00022 public: 00023 00024 // -------------------- Constructors, destructors -------------------- 00025 00027 SiStripFedCabling( const std::vector<FedChannelConnection>& ); 00028 00030 SiStripFedCabling( const SiStripFedCabling& ); 00031 00033 SiStripFedCabling(); 00034 00036 ~SiStripFedCabling(); 00037 00038 // -------------------- Utility methods -------------------- 00039 00041 void buildFedCabling( const std::vector<FedChannelConnection>& connections ); 00042 00044 void print( std::stringstream& ) const; 00045 00047 void terse( std::stringstream& ) const; 00048 00050 void summary( std::stringstream& ) const; 00051 00052 // -------------------- Methods to retrieve connections -------------------- 00053 00055 const std::vector<uint16_t>& feds() const; 00056 00058 const std::vector<FedChannelConnection>& connections( uint16_t fed_id ) const; 00059 00061 const FedChannelConnection& connection( uint16_t fed_id, 00062 uint16_t fed_chan ) const; 00063 00065 inline const std::vector<FedChannelConnection>& detected() const; 00066 00068 inline const std::vector<FedChannelConnection>& undetected() const; 00069 00070 // -------------------- Private member data -------------------- 00071 00072 private: 00073 00075 std::vector<uint16_t> feds_; 00076 00085 std::vector< std::vector<FedChannelConnection> > connected_; 00086 00093 std::vector<FedChannelConnection> detected_; 00094 00103 std::vector<FedChannelConnection> undetected_; 00104 00105 }; 00106 00107 // -------------------- Inline methods -------------------- 00108 00109 const std::vector<FedChannelConnection>& SiStripFedCabling::detected() const { return detected_; } 00110 const std::vector<FedChannelConnection>& SiStripFedCabling::undetected() const{ return undetected_; } 00111 00112 #endif // CondFormats_SiStripObjects_SiStripFedCabling_H 00113