Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:30

0001 #ifndef CondFormatsRPCObjectsTriggerBoardSpec_H
0002 #define CondFormatsRPCObjectsTriggerBoardSpec_H
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 
0006 #include "CondFormats/RPCObjects/interface/LinkConnSpec.h"
0007 #include <string>
0008 #include <cstdint>
0009 
0010 /** \class TriggerBoardSpec
0011  * RPC Trigger Board specification for readout decoding
0012  */
0013 
0014 class TriggerBoardSpec {
0015 public:
0016   /// ctor with ID only
0017   TriggerBoardSpec(int num = -1, uint32_t aMask = 0);
0018 
0019   /// input channel number to DCC
0020   int dccInputChannelNum() const { return theNum; }
0021 
0022   /// link attached to this TB with given input number
0023   const LinkConnSpec* linkConn(int tbInputNumber) const;
0024 
0025   /// not masked links belonging to this TB
0026   std::vector<const LinkConnSpec*> enabledLinkConns() const;
0027 
0028   /// all links kept by this TB
0029   const std::vector<LinkConnSpec> linkConns() const { return theLinks; }
0030 
0031   ///  attach connection to TB
0032   void add(const LinkConnSpec& lc);
0033 
0034   /// set mask links
0035   void setMaskedLinks(uint32_t aMask) { theMaskedLinks = aMask; }
0036 
0037   ///  debud printaout, call its components with depth dectreased by one
0038   std::string print(int depth = 0) const;
0039 
0040 private:
0041   int theNum;
0042   uint32_t theMaskedLinks;
0043   std::vector<LinkConnSpec> theLinks;
0044 
0045   COND_SERIALIZABLE;
0046 };
0047 #endif