![]() |
![]() |
00001 #ifndef EventFilter_RPCRawToDigi_RPCRawSynchro_H 00002 #define EventFilter_RPCRawToDigi_RPCRawSynchro_H 00003 00004 #include <map> 00005 #include <vector> 00006 #include <string> 00007 #include "CondFormats/RPCObjects/interface/LinkBoardElectronicIndex.h" 00008 #include "EventFilter/RPCRawToDigi/interface/EventRecords.h" 00009 class RPCReadOutMapping; 00010 class TH1D; 00011 class TH2D; 00012 00013 class RPCRawSynchro { 00014 public: 00015 00016 typedef std::vector< std::pair<LinkBoardElectronicIndex, int> > ProdItem; 00017 00018 RPCRawSynchro() {} 00019 00020 static int bxDifference(const rpcrawtodigi::EventRecords & event); 00021 00022 void add(const ProdItem & item); 00023 00024 struct lessLB { bool operator () (const LinkBoardElectronicIndex& lb1, 00025 const LinkBoardElectronicIndex& lb2) const; 00026 }; 00027 00028 std::string dumpDelays(const RPCReadOutMapping *rm, TH2D * histo) const; 00029 std::string dumpDccBx(int dcc, TH1D * histo) const; 00030 private: 00031 typedef std::map<LinkBoardElectronicIndex, std::vector<int>, RPCRawSynchro::lessLB > LBCountMap; 00032 LBCountMap theSynchroCounts; 00033 }; 00034 #endif 00035