Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:22

0001 /** \class HLTGetRaw
0002  *
0003  * See header file for documentation
0004  *
0005  *
0006  *  \author various
0007  *
0008  */
0009 
0010 #include "DataFormats/Common/interface/Handle.h"
0011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0012 #include "FWCore/Utilities/interface/InputTag.h"
0013 
0014 #include "HLTGetRaw.h"
0015 
0016 //
0017 // constructors and destructor
0018 //
0019 HLTGetRaw::HLTGetRaw(const edm::ParameterSet& ps)
0020     : rawDataCollection_(ps.getParameter<edm::InputTag>("RawDataCollection")),
0021       rawDataToken_(consumes<FEDRawDataCollection>(rawDataCollection_)) {}
0022 
0023 HLTGetRaw::~HLTGetRaw() = default;
0024 
0025 void HLTGetRaw::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0026   edm::ParameterSetDescription desc;
0027   desc.add<edm::InputTag>("RawDataCollection", edm::InputTag("rawDataCollector"));
0028   descriptions.add("hltGetRaw", desc);
0029 }
0030 
0031 //
0032 // member functions
0033 //
0034 
0035 // ------------ method called to analyze the data  ------------
0036 void HLTGetRaw::analyze(edm::StreamID sid, edm::Event const& event, edm::EventSetup const& setup) const {
0037   edm::Handle<FEDRawDataCollection> rawDataHandle;
0038   event.getByToken(rawDataToken_, rawDataHandle);
0039 
0040   LogDebug("DigiInfo") << "Loaded Raw Data Collection: " << rawDataCollection_;
0041 }
0042 
0043 // declare this class as a framework plugin
0044 #include "FWCore/Framework/interface/MakerMacros.h"
0045 DEFINE_FWK_MODULE(HLTGetRaw);