Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:27

0001 #ifndef CondFormatsRPCObjectsLinkBoardSpec_H
0002 #define CondFormatsRPCObjectsLinkBoardSpec_H
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 
0006 #include "CondFormats/RPCObjects/interface/FebConnectorSpec.h"
0007 #include <string>
0008 
0009 /** \class LinkBoardSpec
0010  * RPC LinkBoard Specification for readout decoding. Provide chamber location specification (as in DB throught FEBs) 
0011  */
0012 
0013 class LinkBoardSpec {
0014 public:
0015   /// dummy
0016   LinkBoardSpec() : theMaster(false) {}
0017 
0018   /// real ctor specifyig LB if this LB is master,
0019   /// its number in link, and which chamber it is serving
0020   LinkBoardSpec(bool master, int linkBoardNumInLin, int lbCode);
0021 
0022   /// true if master LB (is it of any use?)
0023   bool master() { return theMaster; }
0024 
0025   /// this LB number in link
0026   int linkBoardNumInLink() const { return theLinkBoardNumInLink; }
0027 
0028   /// LB name as in OMDS
0029   std::string linkBoardName() const;
0030 
0031   /// attach feb
0032   void add(const FebConnectorSpec& feb);
0033 
0034   /// get Feb by its connection number to this board
0035   const FebConnectorSpec* feb(int febInputNum) const;
0036   const std::vector<FebConnectorSpec>& febs() const { return theFebs; }
0037 
0038   /// debud printout
0039   std::string print(int depth = 0) const;
0040 
0041 private:
0042   bool theMaster;
0043   int theLinkBoardNumInLink;
0044   int theCode;
0045   std::vector<FebConnectorSpec> theFebs;
0046 
0047   COND_SERIALIZABLE;
0048 };
0049 #endif