Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:30:33

0001 #ifndef RBCCHAMBERORLOGIC_H
0002 #define RBCCHAMBERORLOGIC_H 1
0003 
0004 // Include files
0005 
0006 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h"
0007 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h"
0008 
0009 #include <iostream>
0010 #include <vector>
0011 #include <map>
0012 #include <array>
0013 
0014 /** @class RBCChamberORLogic RBCChamberORLogic.h
0015  *  
0016  *  <p>This class works out the mapping of inputs to chambers
0017  *  and applies a Coincidence Logic. The criteria for coincidence
0018  *  is set by the parameter m_maxlevel.</p>
0019  *
0020  *  @authors <B>Andres Osorio</B>, Flavio Loddo, Marcello Maggi
0021  *
0022  *  email: aosorio@uniandes.edu.co
0023  *
0024  *
0025  *  @date   2008-10-11
0026  */
0027 class RBCChamberORLogic : public RBCLogic {
0028 public:
0029   /// Standard constructor
0030   RBCChamberORLogic();
0031 
0032   void process(const RBCInput &, std::bitset<2> &) override;
0033 
0034   void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig &) override;
0035 
0036   std::bitset<6> *getlayersignal(int _idx) override { return &m_layersignal[_idx]; };
0037 
0038   typedef std::vector<std::string>::iterator itr2names;
0039   typedef std::map<std::string, bool>::iterator itr2chambers;
0040 
0041   void copymap(const std::bitset<15> &);
0042 
0043   void createmap(const std::bitset<15> &);
0044 
0045   void reset();
0046 
0047   bool evaluateLayerOR(const char *, const char *);
0048 
0049   void setmaxlevel(int _mx) { m_maxlevel = _mx; };
0050 
0051   std::array<std::bitset<6>, 2> m_layersignal;
0052 
0053 protected:
0054 private:
0055   std::vector<std::string> m_rbname;
0056 
0057   std::map<std::string, bool> m_chamber;
0058 
0059   int m_maxcb;
0060 
0061   int m_maxlevel;
0062 };
0063 #endif  // RBCCHAMBERORLOGIC_H