Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:37:04

0001 // $Id:
0002 #ifndef RBCPROCESSRPCDIGIS_H
0003 #define RBCPROCESSRPCDIGIS_H 1
0004 
0005 // Include files
0006 #include "FWCore/Framework/interface/Frameworkfwd.h"
0007 #include "FWCore/Framework/interface/ESHandle.h"
0008 
0009 #include "Geometry/RPCGeometry/interface/RPCRoll.h"
0010 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0011 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0012 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0013 
0014 #include "DataFormats/RPCDigi/interface/RPCDigi.h"
0015 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0016 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0017 
0018 // From project
0019 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h"
0020 #include "L1Trigger/RPCTechnicalTrigger/interface/RPCInputSignal.h"
0021 #include "L1Trigger/RPCTechnicalTrigger/interface/RPCData.h"
0022 #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h"
0023 
0024 #include <cstdlib>
0025 #include <iostream>
0026 #include <fstream>
0027 #include <ios>
0028 #include <cmath>
0029 #include <map>
0030 #include <vector>
0031 
0032 /** @class RBCProcessRPCDigis RBCProcessRPCDigis.h
0033  *  
0034  *
0035  *  @author Andres Felipe Osorio Oliveros
0036  *  @date   2009-04-15
0037  */
0038 
0039 class RBCProcessRPCDigis : public ProcessInputSignal {
0040 public:
0041   /// Standard constructor
0042   RBCProcessRPCDigis(const edm::ESHandle<RPCGeometry> &, const edm::Handle<RPCDigiCollection> &);
0043 
0044   ~RBCProcessRPCDigis() override;  ///< Destructor
0045 
0046   int next() override;
0047 
0048   void reset();
0049 
0050   void configure();
0051 
0052   void builddata();
0053 
0054   void print_output();
0055 
0056   RPCInputSignal *retrievedata() override { return m_lbin.get(); };
0057 
0058   void rewind() {}
0059   void showfirst() {}
0060 
0061 protected:
0062 private:
0063   void initialize(std::vector<RPCData> &) const;
0064 
0065   int getBarrelLayer(const int &, const int &);
0066 
0067   void setDigiAt(int, int, RPCData &);
0068 
0069   void setInputBit(std::bitset<15> &, int);
0070 
0071   const edm::ESHandle<RPCGeometry> *m_ptr_rpcGeom;
0072   const edm::Handle<RPCDigiCollection> *m_ptr_digiColl;
0073 
0074   std::unique_ptr<RPCInputSignal> m_lbin;
0075 
0076   std::map<int, RBCInput *> m_data;
0077 
0078   std::map<int, std::vector<RPCData> > m_vecDataperBx;
0079 
0080   std::map<int, l1trigger::Counters> m_digiCounters;
0081   const int m_maxBxWindow;
0082   const bool m_debug;
0083 };
0084 #endif  // RBCPROCESSRPCDIGIS_H