00001 // $Id: 00002 #ifndef RBCPROCESSRPCDIGIS_H 00003 #define RBCPROCESSRPCDIGIS_H 1 00004 00005 // Include files 00006 #include "FWCore/Framework/interface/Frameworkfwd.h" 00007 #include "FWCore/Framework/interface/ESHandle.h" 00008 00009 #include "Geometry/RPCGeometry/interface/RPCRoll.h" 00010 #include "Geometry/RPCGeometry/interface/RPCGeometry.h" 00011 #include "Geometry/Records/interface/MuonGeometryRecord.h" 00012 #include "Geometry/RPCGeometry/interface/RPCGeometry.h" 00013 00014 #include "DataFormats/RPCDigi/interface/RPCDigi.h" 00015 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h" 00016 #include "DataFormats/MuonDetId/interface/RPCDetId.h" 00017 00018 // From project 00019 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h" 00020 #include "L1Trigger/RPCTechnicalTrigger/interface/RPCInputSignal.h" 00021 #include "L1Trigger/RPCTechnicalTrigger/interface/RPCData.h" 00022 #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h" 00023 00024 #include <stdlib.h> 00025 #include <iostream> 00026 #include <fstream> 00027 #include <ios> 00028 #include <cmath> 00029 #include <map> 00030 #include <vector> 00031 00039 class RBCProcessRPCDigis : public ProcessInputSignal { 00040 public: 00042 RBCProcessRPCDigis( ) {}; 00043 00044 RBCProcessRPCDigis( const edm::ESHandle<RPCGeometry> &, 00045 const edm::Handle<RPCDigiCollection> & ); 00046 00047 virtual ~RBCProcessRPCDigis( ); 00048 00049 int next(); 00050 00051 void reset(); 00052 00053 void configure(); 00054 00055 void initialize( std::vector<RPCData*> & ); 00056 00057 void builddata(); 00058 00059 void print_output(); 00060 00061 RPCInputSignal * retrievedata() { 00062 return m_lbin; 00063 }; 00064 00065 void rewind() {}; 00066 void showfirst() {}; 00067 00068 protected: 00069 00070 private: 00071 00072 int getBarrelLayer(const int &, const int &); 00073 00074 void setDigiAt( int , int ); 00075 00076 void setInputBit( std::bitset<15> & , int ); 00077 00078 const edm::ESHandle<RPCGeometry> * m_ptr_rpcGeom; 00079 const edm::Handle<RPCDigiCollection> * m_ptr_digiColl; 00080 00081 RPCDigiCollection::const_iterator m_digiItr; 00082 RPCDigiCollection::DigiRangeIterator m_detUnitItr; 00083 00084 RPCData * m_block; 00085 00086 RPCInputSignal * m_lbin; 00087 00088 std::map<int, int> m_layermap; 00089 00090 std::map<int, RBCInput*> m_data; 00091 00092 std::map<int, std::vector<RPCData*> > m_vecDataperBx; 00093 00094 bool m_debug; 00095 int m_maxBxWindow; 00096 00097 std::vector<int> m_wheelid; 00098 std::vector<int> m_sec1id; 00099 std::vector<int> m_sec2id; 00100 00101 std::map<int, Counters*> m_digiCounters; 00102 00103 }; 00104 #endif // RBCPROCESSRPCDIGIS_H