Go to the documentation of this file.00001 #include "EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitByproductProducer.h"
00002 #include "EventFilter/EcalRawToDigi/interface/EcalUnpackerWorkerRecord.h"
00003 #include "EventFilter/EcalRawToDigi/interface/EcalUnpackerWorker.h"
00004
00005
00006 EcalRawToRecHitByproductProducer::EcalRawToRecHitByproductProducer(const edm::ParameterSet& iConfig)
00007 {
00008 workerName_ = iConfig.getParameter<std::string>("workerName");
00009
00010 produces<EBDigiCollection>("ebDigis");
00011 produces<EEDigiCollection>("eeDigis");
00012
00013 produces<EBSrFlagCollection>();
00014 produces<EESrFlagCollection>();
00015 produces<EcalRawDataCollection>();
00016 produces<EcalPnDiodeDigiCollection>();
00017 produces<EcalTrigPrimDigiCollection>("EcalTriggerPrimitives");
00018 produces<EcalPSInputDigiCollection>("EcalPseudoStripInputs");
00019
00020
00021 produces<EBDetIdCollection>("EcalIntegrityGainErrors");
00022 produces<EBDetIdCollection>("EcalIntegrityGainSwitchErrors");
00023 produces<EBDetIdCollection>("EcalIntegrityChIdErrors");
00024
00025
00026 produces<EEDetIdCollection>("EcalIntegrityGainErrors");
00027 produces<EEDetIdCollection>("EcalIntegrityGainSwitchErrors");
00028 produces<EEDetIdCollection>("EcalIntegrityChIdErrors");
00029
00030
00031 produces<EcalElectronicsIdCollection>("EcalIntegrityTTIdErrors");
00032 produces<EcalElectronicsIdCollection>("EcalIntegrityZSXtalIdErrors");
00033 produces<EcalElectronicsIdCollection>("EcalIntegrityBlockSizeErrors");
00034
00035
00036 produces<EcalElectronicsIdCollection>("EcalIntegrityMemTtIdErrors");
00037 produces<EcalElectronicsIdCollection>("EcalIntegrityMemBlockSizeErrors");
00038 produces<EcalElectronicsIdCollection>("EcalIntegrityMemChIdErrors");
00039 produces<EcalElectronicsIdCollection>("EcalIntegrityMemGainErrors");
00040 }
00041
00042
00043
00044 void
00045 EcalRawToRecHitByproductProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)
00046 {
00047
00048 edm::ESHandle<EcalUnpackerWorkerBase> workerESH;
00049 iSetup.get<EcalUnpackerWorkerRecord>().get(workerName_, workerESH);
00050 const EcalUnpackerWorker * worker = dynamic_cast<const EcalUnpackerWorker *>(&*workerESH);
00051 if (!worker)
00052 edm::LogError("IncorrectConfiguration")<<"worker "<< workerName_ <<" could not be cast in EcalUnpackerWorker type."
00053 <<" this must be a configuration mistake. Expect a segfault right now.";
00054
00055 LogDebug("EcalRawToRecHit|Byproducts")<<"worker retrieved.";
00056
00057
00058 std::auto_ptr<EBDigiCollection> productDigisEB(worker->productDigisEB);
00059
00060
00061 std::auto_ptr<EEDigiCollection> productDigisEE(worker->productDigisEE);
00062
00063
00064 std::auto_ptr<EcalRawDataCollection> productDccHeaders(worker->productDccHeaders);
00065
00066
00067 std::auto_ptr< EBDetIdCollection> productInvalidGains(worker->productInvalidGains);
00068
00069
00070 std::auto_ptr< EBDetIdCollection> productInvalidGainsSwitch(worker->productInvalidGainsSwitch);
00071
00072
00073 std::auto_ptr< EBDetIdCollection> productInvalidChIds(worker->productInvalidChIds);
00074
00076
00077
00078 std::auto_ptr<EEDetIdCollection> productInvalidEEGains(worker->productInvalidEEGains);
00079
00080
00081 std::auto_ptr<EEDetIdCollection> productInvalidEEGainsSwitch(worker->productInvalidEEGainsSwitch);
00082
00083
00084 std::auto_ptr<EEDetIdCollection> productInvalidEEChIds(worker->productInvalidEEChIds);
00085
00087
00088
00089 std::auto_ptr<EBSrFlagCollection> productEBSrFlags(worker->productEBSrFlags);
00090
00091
00092 std::auto_ptr<EESrFlagCollection> productEESrFlags(worker->productEESrFlags);
00093
00094
00095 std::auto_ptr<EcalTrigPrimDigiCollection> productEcalTps(worker->productTps);
00096
00097
00098 std::auto_ptr<EcalPSInputDigiCollection> productEcalPSs(worker->productPSs);
00099
00101
00102
00103 std::auto_ptr<EcalElectronicsIdCollection> productInvalidTTIds(worker->productInvalidTTIds);
00104
00105
00106 std::auto_ptr<EcalElectronicsIdCollection> productInvalidZSXtalIds(worker->productInvalidZSXtalIds);
00107
00108
00109 std::auto_ptr<EcalElectronicsIdCollection> productInvalidBlockLengths(worker->productInvalidBlockLengths);
00110
00111
00112
00113 std::auto_ptr<EcalPnDiodeDigiCollection> productPnDiodeDigis(worker->productPnDiodeDigis);
00114
00115
00116 std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemTtIds(worker->productInvalidMemTtIds);
00117
00118
00119 std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemBlockSizes(worker->productInvalidMemBlockSizes);
00120
00121
00122 std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemChIds(worker->productInvalidMemChIds);
00123
00124
00125 std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemGains(worker->productInvalidMemGains);
00126
00127
00128
00129
00130
00131
00132 iEvent.put(productDigisEB,"ebDigis");
00133 iEvent.put(productDigisEE,"eeDigis");
00134 iEvent.put(productDccHeaders);
00135 iEvent.put(productInvalidGains,"EcalIntegrityGainErrors");
00136 iEvent.put(productInvalidGainsSwitch, "EcalIntegrityGainSwitchErrors");
00137 iEvent.put(productInvalidChIds, "EcalIntegrityChIdErrors");
00138
00139 iEvent.put(productInvalidEEGains,"EcalIntegrityGainErrors");
00140 iEvent.put(productInvalidEEGainsSwitch, "EcalIntegrityGainSwitchErrors");
00141 iEvent.put(productInvalidEEChIds, "EcalIntegrityChIdErrors");
00142
00143 iEvent.put(productInvalidTTIds,"EcalIntegrityTTIdErrors");
00144 iEvent.put(productInvalidZSXtalIds,"EcalIntegrityZSXtalIdErrors");
00145 iEvent.put(productInvalidBlockLengths,"EcalIntegrityBlockSizeErrors");
00146 iEvent.put(productPnDiodeDigis);
00147
00148 iEvent.put(productInvalidMemTtIds,"EcalIntegrityMemTtIdErrors");
00149 iEvent.put(productInvalidMemBlockSizes,"EcalIntegrityMemBlockSizeErrors");
00150 iEvent.put(productInvalidMemChIds,"EcalIntegrityMemChIdErrors");
00151 iEvent.put(productInvalidMemGains,"EcalIntegrityMemGainErrors");
00152
00153
00154 iEvent.put(productEBSrFlags);
00155 iEvent.put(productEESrFlags);
00156
00157
00158 iEvent.put(productEcalTps,"EcalTriggerPrimitives");
00159 iEvent.put(productEcalPSs,"EcalPseudoStripInputs");
00160
00161
00162 worker->update(iEvent);
00163 }