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::EDConsumerBase 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 ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

std::vector< int > fedUnpackList_
 
int firstFED_
 
edm::EDGetTokenT
< FEDRawDataCollection
tok_data_
 
HcalUnpacker unpacker_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 27 of file HcalHistogramRawToDigi.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file HcalHistogramRawToDigi.cc.

References fedUnpackList_, edm::ParameterSet::getParameter(), i, contentValuesCheck::ss, and tok_data_.

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

Definition at line 30 of file HcalHistogramRawToDigi.cc.

30 { }

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 33 of file HcalHistogramRawToDigi.cc.

References fedUnpackList_, edm::EventSetup::get(), edm::Event::getByToken(), i, parseEventContent::prod, edm::Event::put(), tok_data_, HcalUnpacker::unpack(), and unpacker_.

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

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

Member Data Documentation

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

Definition at line 36 of file HcalHistogramRawToDigi.h.

Referenced by HcalHistogramRawToDigi(), and produce().

int HcalHistogramRawToDigi::firstFED_
private

Definition at line 37 of file HcalHistogramRawToDigi.h.

edm::EDGetTokenT<FEDRawDataCollection> HcalHistogramRawToDigi::tok_data_
private

Definition at line 34 of file HcalHistogramRawToDigi.h.

Referenced by HcalHistogramRawToDigi(), and produce().

HcalUnpacker HcalHistogramRawToDigi::unpacker_
private

Definition at line 35 of file HcalHistogramRawToDigi.h.

Referenced by produce().