Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:55:21

0001 #include "L1Trigger/L1TMuon/interface/deprecate/RPCCollector.h"
0002 #include "DataFormats/RPCDigi/interface/RPCDigi.h"
0003 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0004 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0005 
0006 #include "DataFormats/Common/interface/Handle.h"
0007 #include "FWCore/Framework/interface/Event.h"
0008 #include "FWCore/Framework/interface/EventSetup.h"
0009 
0010 using namespace L1TMuon;
0011 
0012 RPCCollector::RPCCollector(const edm::ParameterSet& ps) : SubsystemCollector(ps) {}
0013 
0014 void RPCCollector::extractPrimitives(const edm::Event& ev,
0015                                      const edm::EventSetup& es,
0016                                      std::vector<TriggerPrimitive>& out) const {
0017   edm::Handle<RPCDigiCollection> rpcDigis;
0018   ev.getByLabel(_src, rpcDigis);
0019 
0020   auto chamber = rpcDigis->begin();
0021   auto chend = rpcDigis->end();
0022   for (; chamber != chend; ++chamber) {
0023     auto digi = (*chamber).second.first;
0024     auto dend = (*chamber).second.second;
0025     for (; digi != dend; ++digi) {
0026       out.push_back(TriggerPrimitive((*chamber).first, *digi));
0027     }
0028   }
0029 }
0030 
0031 #include "L1Trigger/L1TMuon/interface/deprecate/SubsystemCollectorFactory.h"
0032 DEFINE_EDM_PLUGIN(SubsystemCollectorFactory, RPCCollector, "RPCCollector");