CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HcalHistogramRawToDigi Class Reference

#include <HcalHistogramRawToDigi.h>

Inheritance diagram for HcalHistogramRawToDigi:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 HcalHistogramRawToDigi (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
virtual ~HcalHistogramRawToDigi ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::InputTag dataTag_
 
std::vector< int > fedUnpackList_
 
int firstFED_
 
HcalUnpacker unpacker_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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_, and i.

13  :
14  dataTag_(conf.getParameter<edm::InputTag>("InputLabel")),
15  unpacker_(conf.getUntrackedParameter<int>("HcalFirstFED",FEDNumbering::MINHCALFEDID)),
16  fedUnpackList_(conf.getUntrackedParameter<std::vector<int> >("FEDs")),
17  firstFED_(conf.getUntrackedParameter<int>("HcalFirstFED",FEDNumbering::MINHCALFEDID))
18 {
19  std::ostringstream ss;
20  for (unsigned int i=0; i<fedUnpackList_.size(); i++)
21  ss << fedUnpackList_[i] << " ";
22  edm::LogInfo("HCAL") << "HcalHistogramRawToDigi will unpack FEDs ( " << ss.str() << ")";
23 
24  // products produced...
25  produces<HcalHistogramDigiCollection>();
26 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > fedUnpackList_
tuple conf
Definition: dbtoconf.py:185
HcalHistogramRawToDigi::~HcalHistogramRawToDigi ( )
virtual

Definition at line 29 of file HcalHistogramRawToDigi.cc.

29 { }

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, parseEventContent::prod, edm::Event::put(), HcalUnpacker::unpack(), and unpacker_.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

33 {
34  // Step A: Get Inputs
36  e.getByLabel(dataTag_,rawraw);
37  // get the mapping
39  es.get<HcalDbRecord>().get( pSetup );
40  const HcalElectronicsMap* readoutMap=pSetup->getHcalMapping();
41 
42  // Step B: Create empty output
43  std::auto_ptr<HcalHistogramDigiCollection> prod(new HcalHistogramDigiCollection());
44  std::vector<HcalHistogramDigi> digis;
45 
46  // Step C: unpack all requested FEDs
47  for (std::vector<int>::const_iterator i=fedUnpackList_.begin(); i!=fedUnpackList_.end(); i++) {
48  const FEDRawData& fed = rawraw->FEDData(*i);
49 
50  unpacker_.unpack(fed,*readoutMap,digis);
51  }
52 
53  // Step B2: encapsulate vectors in actual collections
54  prod->swap_contents(digis);
55 
56  // Step D: Put outputs into event
57  prod->sort();
58  e.put(prod);
59 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > fedUnpackList_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void unpack(const FEDRawData &raw, const HcalElectronicsMap &emap, std::vector< HcalHistogramDigi > &histoDigis)
edm::SortedCollection< HcalHistogramDigi > HcalHistogramDigiCollection

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().