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 Member Functions | Private Attributes
EcalRawToRecHitByproductProducer Class Reference

#include <EcalRawToRecHitByproductProducer.h>

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

Public Member Functions

 EcalRawToRecHitByproductProducer (const edm::ParameterSet &)
 
 ~EcalRawToRecHitByproductProducer ()
 
- 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 Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

std::string workerName_
 

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

Definition at line 29 of file EcalRawToRecHitByproductProducer.h.

Constructor & Destructor Documentation

EcalRawToRecHitByproductProducer::EcalRawToRecHitByproductProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 6 of file EcalRawToRecHitByproductProducer.cc.

References edm::ParameterSet::getParameter(), and workerName_.

7 {
8  workerName_ = iConfig.getParameter<std::string>("workerName");
9 
10  produces<EBDigiCollection>("ebDigis");
11  produces<EEDigiCollection>("eeDigis");
12 
13  produces<EBSrFlagCollection>();
14  produces<EESrFlagCollection>();
15  produces<EcalRawDataCollection>();
16  produces<EcalPnDiodeDigiCollection>();
17  produces<EcalTrigPrimDigiCollection>("EcalTriggerPrimitives");
18  produces<EcalPSInputDigiCollection>("EcalPseudoStripInputs");
19 
20  // Integrity for xtal data
21  produces<EBDetIdCollection>("EcalIntegrityGainErrors");
22  produces<EBDetIdCollection>("EcalIntegrityGainSwitchErrors");
23  produces<EBDetIdCollection>("EcalIntegrityChIdErrors");
24 
25  // Integrity for xtal data - EE specific (to be rivisited towards EB+EE common collection)
26  produces<EEDetIdCollection>("EcalIntegrityGainErrors");
27  produces<EEDetIdCollection>("EcalIntegrityGainSwitchErrors");
28  produces<EEDetIdCollection>("EcalIntegrityChIdErrors");
29 
30  // Integrity Errors
31  produces<EcalElectronicsIdCollection>("EcalIntegrityTTIdErrors");
32  produces<EcalElectronicsIdCollection>("EcalIntegrityZSXtalIdErrors");
33  produces<EcalElectronicsIdCollection>("EcalIntegrityBlockSizeErrors");
34 
35  // Mem channels' integrity
36  produces<EcalElectronicsIdCollection>("EcalIntegrityMemTtIdErrors");
37  produces<EcalElectronicsIdCollection>("EcalIntegrityMemBlockSizeErrors");
38  produces<EcalElectronicsIdCollection>("EcalIntegrityMemChIdErrors");
39  produces<EcalElectronicsIdCollection>("EcalIntegrityMemGainErrors");
40 }
T getParameter(std::string const &) const
EcalRawToRecHitByproductProducer::~EcalRawToRecHitByproductProducer ( )
inline

Definition at line 32 of file EcalRawToRecHitByproductProducer.h.

32 {};

Member Function Documentation

void EcalRawToRecHitByproductProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 45 of file EcalRawToRecHitByproductProducer.cc.

References edm::EventSetup::get(), LogDebug, EcalUnpackerWorker::productDccHeaders, EcalUnpackerWorker::productDigisEB, EcalUnpackerWorker::productDigisEE, EcalUnpackerWorker::productEBSrFlags, EcalUnpackerWorker::productEESrFlags, EcalUnpackerWorker::productInvalidBlockLengths, EcalUnpackerWorker::productInvalidChIds, EcalUnpackerWorker::productInvalidEEChIds, EcalUnpackerWorker::productInvalidEEGains, EcalUnpackerWorker::productInvalidEEGainsSwitch, EcalUnpackerWorker::productInvalidGains, EcalUnpackerWorker::productInvalidGainsSwitch, EcalUnpackerWorker::productInvalidMemBlockSizes, EcalUnpackerWorker::productInvalidMemChIds, EcalUnpackerWorker::productInvalidMemGains, EcalUnpackerWorker::productInvalidMemTtIds, EcalUnpackerWorker::productInvalidTTIds, EcalUnpackerWorker::productInvalidZSXtalIds, EcalUnpackerWorker::productPnDiodeDigis, EcalUnpackerWorker::productPSs, EcalUnpackerWorker::productTps, edm::Event::put(), EcalUnpackerWorker::update(), and workerName_.

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

46 {
47  //retrieve the unpacker worker
49  iSetup.get<EcalUnpackerWorkerRecord>().get(workerName_, workerESH);
50  const EcalUnpackerWorker * worker = dynamic_cast<const EcalUnpackerWorker *>(&*workerESH);
51  if (!worker)
52  edm::LogError("IncorrectConfiguration")<<"worker "<< workerName_ <<" could not be cast in EcalUnpackerWorker type."
53  <<" this must be a configuration mistake. Expect a segfault right now.";
54 
55  LogDebug("EcalRawToRecHit|Byproducts")<<"worker retrieved.";
56 
57  //prepare output collections
58  std::auto_ptr<EBDigiCollection> productDigisEB(worker->productDigisEB);
59 
60  // create the collection of Ecal Digis
61  std::auto_ptr<EEDigiCollection> productDigisEE(worker->productDigisEE);
62 
63  // create the collection for headers
64  std::auto_ptr<EcalRawDataCollection> productDccHeaders(worker->productDccHeaders);
65 
66  // create the collection for invalid gains
67  std::auto_ptr< EBDetIdCollection> productInvalidGains(worker->productInvalidGains);
68 
69  // create the collection for invalid gain Switch
70  std::auto_ptr< EBDetIdCollection> productInvalidGainsSwitch(worker->productInvalidGainsSwitch);
71 
72  // create the collection for invalid chids
73  std::auto_ptr< EBDetIdCollection> productInvalidChIds(worker->productInvalidChIds);
74 
76 
77  // create the collection for invalid gains
78  std::auto_ptr<EEDetIdCollection> productInvalidEEGains(worker->productInvalidEEGains);
79 
80  // create the collection for invalid gain Switch
81  std::auto_ptr<EEDetIdCollection> productInvalidEEGainsSwitch(worker->productInvalidEEGainsSwitch);
82 
83  // create the collection for invalid chids
84  std::auto_ptr<EEDetIdCollection> productInvalidEEChIds(worker->productInvalidEEChIds);
85 
87 
88  // create the collection for EB srflags
89  std::auto_ptr<EBSrFlagCollection> productEBSrFlags(worker->productEBSrFlags);
90 
91  // create the collection for EB srflags
92  std::auto_ptr<EESrFlagCollection> productEESrFlags(worker->productEESrFlags);
93 
94  // create the collection for ecal trigger primitives
95  std::auto_ptr<EcalTrigPrimDigiCollection> productEcalTps(worker->productTps);
96 
97  // create the collection for ecal trigger primitives
98  std::auto_ptr<EcalPSInputDigiCollection> productEcalPSs(worker->productPSs);
99 
101 
102  // create the collection for invalid TTIds
103  std::auto_ptr<EcalElectronicsIdCollection> productInvalidTTIds(worker->productInvalidTTIds);
104 
105  // create the collection for invalid XtalIds
106  std::auto_ptr<EcalElectronicsIdCollection> productInvalidZSXtalIds(worker->productInvalidZSXtalIds);
107 
108  // create the collection for invalid BlockLengths
109  std::auto_ptr<EcalElectronicsIdCollection> productInvalidBlockLengths(worker->productInvalidBlockLengths);
110 
111  // MEMs Collections
112  // create the collection for the Pn Diode Digis
113  std::auto_ptr<EcalPnDiodeDigiCollection> productPnDiodeDigis(worker->productPnDiodeDigis);
114 
115  // create the collection for invalid Mem Tt id
116  std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemTtIds(worker->productInvalidMemTtIds);
117 
118  // create the collection for invalid Mem Block Size
119  std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemBlockSizes(worker->productInvalidMemBlockSizes);
120 
121  // create the collection for invalid Mem Block Size
122  std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemChIds(worker->productInvalidMemChIds);
123 
124  // create the collection for invalid Mem Gain Errors
125  std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemGains(worker->productInvalidMemGains);
126 
127 
128  //---------------------------
129  //write outputs to the event
130  //---------------------------
131 
132  iEvent.put(productDigisEB,"ebDigis");
133  iEvent.put(productDigisEE,"eeDigis");
134  iEvent.put(productDccHeaders);
135  iEvent.put(productInvalidGains,"EcalIntegrityGainErrors");
136  iEvent.put(productInvalidGainsSwitch, "EcalIntegrityGainSwitchErrors");
137  iEvent.put(productInvalidChIds, "EcalIntegrityChIdErrors");
138  // EE (leaving for now the same names as in EB)
139  iEvent.put(productInvalidEEGains,"EcalIntegrityGainErrors");
140  iEvent.put(productInvalidEEGainsSwitch, "EcalIntegrityGainSwitchErrors");
141  iEvent.put(productInvalidEEChIds, "EcalIntegrityChIdErrors");
142  // EE
143  iEvent.put(productInvalidTTIds,"EcalIntegrityTTIdErrors");
144  iEvent.put(productInvalidZSXtalIds,"EcalIntegrityZSXtalIdErrors");
145  iEvent.put(productInvalidBlockLengths,"EcalIntegrityBlockSizeErrors");
146  iEvent.put(productPnDiodeDigis);
147  // errors
148  iEvent.put(productInvalidMemTtIds,"EcalIntegrityMemTtIdErrors");
149  iEvent.put(productInvalidMemBlockSizes,"EcalIntegrityMemBlockSizeErrors");
150  iEvent.put(productInvalidMemChIds,"EcalIntegrityMemChIdErrors");
151  iEvent.put(productInvalidMemGains,"EcalIntegrityMemGainErrors");
152 
153  // flags
154  iEvent.put(productEBSrFlags);
155  iEvent.put(productEESrFlags);
156 
157  // trigger primitives
158  iEvent.put(productEcalTps,"EcalTriggerPrimitives");
159  iEvent.put(productEcalPSs,"EcalPseudoStripInputs");
160 
161  //make new collections.
162  worker->update(iEvent);
163 }
#define LogDebug(id)
std::auto_ptr< EEDetIdCollection > productInvalidEEGainsSwitch
std::auto_ptr< EcalTrigPrimDigiCollection > productTps
std::auto_ptr< EcalPSInputDigiCollection > productPSs
std::auto_ptr< EcalElectronicsIdCollection > productInvalidBlockLengths
std::auto_ptr< EcalPnDiodeDigiCollection > productPnDiodeDigis
std::auto_ptr< EEDetIdCollection > productInvalidEEGains
std::auto_ptr< EBSrFlagCollection > productEBSrFlags
std::auto_ptr< EESrFlagCollection > productEESrFlags
std::auto_ptr< EBDetIdCollection > productInvalidChIds
std::auto_ptr< EEDigiCollection > productDigisEE
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemTtIds
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
void update(const edm::Event &e) const
std::auto_ptr< EBDetIdCollection > productInvalidGainsSwitch
std::auto_ptr< EBDigiCollection > productDigisEB
std::auto_ptr< EBDetIdCollection > productInvalidGains
const T & get() const
Definition: EventSetup.h:55
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemBlockSizes
std::auto_ptr< EEDetIdCollection > productInvalidEEChIds
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemGains
std::auto_ptr< EcalElectronicsIdCollection > productInvalidTTIds
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemChIds
std::auto_ptr< EcalElectronicsIdCollection > productInvalidZSXtalIds
std::auto_ptr< EcalRawDataCollection > productDccHeaders

Member Data Documentation

std::string EcalRawToRecHitByproductProducer::workerName_
private

Definition at line 37 of file EcalRawToRecHitByproductProducer.h.

Referenced by EcalRawToRecHitByproductProducer(), and produce().