CMS 3D CMS Logo

HcalHistogramRawToDigi Class Reference

HcalHistogramRawToDigi is the EDProducer subclass which runs the Hcal Unpack algorithm for calibration-mode histograms. More...

#include <EventFilter/HcalRawToDigi/plugins/HcalHistogramRawToDigi.h>

Inheritance diagram for HcalHistogramRawToDigi:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 HcalHistogramRawToDigi (const edm::ParameterSet &ps)
virtual void produce (edm::Event &e, const edm::EventSetup &c)
virtual ~HcalHistogramRawToDigi ()

Private Attributes

edm::InputTag dataTag_
std::vector< intfedUnpackList_
int firstFED_
HcalUnpacker unpacker_


Detailed Description

HcalHistogramRawToDigi is the EDProducer subclass which runs the Hcal Unpack algorithm for calibration-mode histograms.

Author:
Jeremiah Mans
Version:
1st Version June 10, 2005

Definition at line 26 of file HcalHistogramRawToDigi.h.


Constructor & Destructor Documentation

HcalHistogramRawToDigi::HcalHistogramRawToDigi ( const edm::ParameterSet ps  )  [explicit]

Definition at line 13 of file HcalHistogramRawToDigi.cc.

References fedUnpackList_, i, and ss.

00013                                                                          :
00014   dataTag_(conf.getParameter<edm::InputTag>("InputLabel")),
00015   unpacker_(conf.getUntrackedParameter<int>("HcalFirstFED",FEDNumbering::getHcalFEDIds().first)),
00016   fedUnpackList_(conf.getUntrackedParameter<std::vector<int> >("FEDs")),
00017   firstFED_(conf.getUntrackedParameter<int>("HcalFirstFED",FEDNumbering::getHcalFEDIds().first))
00018 {
00019   std::ostringstream ss;
00020   for (unsigned int i=0; i<fedUnpackList_.size(); i++) 
00021     ss << fedUnpackList_[i] << " ";
00022   edm::LogInfo("HCAL") << "HcalHistogramRawToDigi will unpack FEDs ( " << ss.str() << ")";
00023     
00024   // products produced...
00025   produces<HcalHistogramDigiCollection>();
00026 }

HcalHistogramRawToDigi::~HcalHistogramRawToDigi (  )  [virtual]

Definition at line 29 of file HcalHistogramRawToDigi.cc.

00029 { }  


Member Function Documentation

void HcalHistogramRawToDigi::produce ( edm::Event e,
const edm::EventSetup c 
) [virtual]

Implements edm::EDProducer.

Definition at line 32 of file HcalHistogramRawToDigi.cc.

References dataTag_, fedUnpackList_, edm::EventSetup::get(), edm::Event::getByLabel(), i, edm::Event::put(), HcalUnpacker::unpack(), and unpacker_.

00033 {
00034   // Step A: Get Inputs 
00035   edm::Handle<FEDRawDataCollection> rawraw;  
00036   e.getByLabel(dataTag_,rawraw);
00037   // get the mapping
00038   edm::ESHandle<HcalDbService> pSetup;
00039   es.get<HcalDbRecord>().get( pSetup );
00040   const HcalElectronicsMap* readoutMap=pSetup->getHcalMapping();
00041 
00042   // Step B: Create empty output
00043   std::auto_ptr<HcalHistogramDigiCollection> prod(new HcalHistogramDigiCollection());
00044   std::vector<HcalHistogramDigi> digis;
00045 
00046   // Step C: unpack all requested FEDs
00047   for (std::vector<int>::const_iterator i=fedUnpackList_.begin(); i!=fedUnpackList_.end(); i++) {
00048     const FEDRawData& fed = rawraw->FEDData(*i);
00049 
00050     unpacker_.unpack(fed,*readoutMap,digis);
00051   }
00052 
00053   // Step B2: encapsulate vectors in actual collections
00054   prod->swap_contents(digis);
00055 
00056   // Step D: Put outputs into event
00057   prod->sort();
00058   e.put(prod);
00059 }


Member Data Documentation

edm::InputTag HcalHistogramRawToDigi::dataTag_ [private]

Definition at line 33 of file HcalHistogramRawToDigi.h.

Referenced by produce().

std::vector<int> HcalHistogramRawToDigi::fedUnpackList_ [private]

Definition at line 35 of file HcalHistogramRawToDigi.h.

Referenced by HcalHistogramRawToDigi(), and produce().

int HcalHistogramRawToDigi::firstFED_ [private]

Definition at line 36 of file HcalHistogramRawToDigi.h.

HcalUnpacker HcalHistogramRawToDigi::unpacker_ [private]

Definition at line 34 of file HcalHistogramRawToDigi.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:23:42 2009 for CMSSW by  doxygen 1.5.4