|
| GEMRawToDigiModule (const edm::ParameterSet &pset) |
| Constructor. More...
|
|
std::shared_ptr< GEMROMapping > | globalBeginRun (edm::Run const &, edm::EventSetup const &) const override |
|
void | globalEndRun (edm::Run const &, edm::EventSetup const &) const override |
|
void | produce (edm::StreamID, edm::Event &, edm::EventSetup const &) const override |
|
| EDProducer ()=default |
|
| EDProducer (const EDProducer &)=delete |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
EDProducer & | operator= (const EDProducer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () const final |
|
bool | wantsStreamLuminosityBlocks () const final |
|
bool | wantsStreamRuns () const final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
|
| ProducerBase () |
|
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
|
std::vector< bool > const & | recordProvenanceList () const |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
void | resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
|
TypeLabelList const & | typeLabelList () const |
| used by the fwk to register the list of products of this module More...
|
|
| ~ProducerBase () noexcept(false) override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDProducerBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces () |
| declare what type of product will make and with which optional label More...
|
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<BranchType B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<Transition B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
ProducesCollector | producesCollector () |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
\unpacker for gem \based on CSCDigiToRawModule
- Author
- J. Lee - UoS
Definition at line 34 of file GEMRawToDigiModule.cc.
Implements edm::global::EDProducerBase.
Definition at line 101 of file GEMRawToDigiModule.cc.
102 auto outGEMDigis = std::make_unique<GEMDigiCollection>();
103 auto outVFATStatus = std::make_unique<GEMVfatStatusDigiCollection>();
104 auto outGEBStatus = std::make_unique<GEMGEBdataCollection>();
105 auto outAMCdata = std::make_unique<GEMAMCdataCollection>();
106 auto outAMC13Event = std::make_unique<GEMAMC13EventCollection>();
112 auto gemROMap = runCache(
iEvent.getRun().index());
118 LogDebug(
"GEMRawToDigiModule") <<
"fedId:" <<
fedId <<
" words: " << nWords;
126 bool failTrailerCheck =
false, failTrailerMatch =
false;
127 if (!trailer.check() || (trailer.fragmentLength() *
sizeof(
uint64_t) != fedData.
size())) {
128 failTrailerCheck =
true;
131 const unsigned char*
data = fedData.
data();
135 if (amc13Event ==
nullptr) {
136 LogDebug(
"GEMRawToDigiModule") <<
"AMC13Event FAILED to be produced";
142 if ((amc13Event->fragmentLength() != trailer.fragmentLength()) || (amc13Event->crc() != trailer.crc()))
143 failTrailerMatch =
true;
145 LogDebug(
"GEMRawToDigiModule") <<
"Event bx:" <<
iEvent.bunchCrossing() <<
" lv1Id:" <<
iEvent.id().event()
146 <<
" orbitNumber:" <<
iEvent.orbitNumber();
147 LogDebug(
"GEMRawToDigiModule") <<
"AMC13 bx:" << amc13Event->bxId() <<
" lv1Id:" <<
int(amc13Event->lv1Id())
148 <<
" orbitNumber:" << amc13Event->orbitNumber();
150 if (failTrailerCheck || failTrailerMatch) {
153 <<
"FED trailer: fail check? " << failTrailerCheck <<
" fail match? " << failTrailerMatch;
157 bool unknownChamber =
false, unknownVFat =
false, badVfat =
false;
160 for (
auto amcData : *(amc13Event->getAMCpayloads())) {
161 uint16_t amcBx = amcData.bx();
162 uint8_t amcNum = amcData.amcNum();
163 LogDebug(
"GEMRawToDigiModule") <<
"AMC no.:" <<
int(amcData.amcNum()) <<
" bx:" <<
int(amcData.bx())
164 <<
" lv1Id:" <<
int(amcData.l1A()) <<
" orbitNumber:" <<
int(amcData.orbitNum());
167 for (
auto gebData : *amcData.gebs()) {
168 uint8_t gebId = gebData.inputID();
172 if (!gemROMap->isValidChamber(geb_ec)) {
173 unknownChamber =
true;
174 LogDebug(
"GEMRawToDigiModule") <<
"InValid: amcNum " <<
int(amcNum) <<
" gebId " <<
int(gebId);
182 for (
auto vfatData : *gebData.vFATs()) {
183 vfatData.setVersion(geb_dc.
vfatVer);
184 uint16_t vfatId = vfatData.vfatId();
188 if (!gemROMap->isValidChipID(vfat_ec)) {
190 LogDebug(
"GEMRawToDigiModule") <<
"InValid: amcNum " <<
int(amcNum) <<
" gebId " <<
int(gebId) <<
" vfatId "
191 <<
int(vfatId) <<
" vfat Pos " <<
int(vfatData.position());
196 if (vfatData.quality()) {
199 <<
"Quality " <<
int(vfatData.quality()) <<
" b1010 " <<
int(vfatData.b1010()) <<
" b1100 "
200 <<
int(vfatData.b1100()) <<
" b1110 " <<
int(vfatData.b1110());
201 if (vfatData.crc() != vfatData.checkCRC()) {
202 LogDebug(
"GEMRawToDigiModule") <<
"DIFFERENT CRC :" << vfatData.crc() <<
" " << vfatData.checkCRC();
210 int bx(vfatData.bc() - amcBx);
215 chan0xf = ((vfatData.lsData() >>
chan) & 0
x1);
217 chan0xf = ((vfatData.msData() >> (
chan - 64)) & 0x1);
231 <<
" fed: " <<
fedId <<
" amc:" <<
int(amcNum) <<
" geb:" <<
int(gebId) <<
" vfat:" << vfat_dc.
localPhi
232 <<
",type: " << vfat_dc.
vfatType <<
" id:" << gemId <<
" ch:" << chMap.
chNum <<
" st:" << digi.strip()
233 <<
" bx:" << digi.bx();
235 outGEMDigis.get()->insertDigi(gemId, digi);
246 gebData.clearVFATs();
247 outGEBStatus.get()->insertDigi(gemChId.
chamberId(), (gebData));
254 outAMCdata.get()->insertDigi(amcData.boardId(), (amcData));
260 amc13Event->clearAMCpayloads();
261 outAMC13Event.get()->insertDigi(amc13Event->bxId(),
AMC13Event(*amc13Event));
264 if (unknownChamber || unknownVFat || badVfat) {
265 edm::LogWarning(
"GEMRawToDigiModule") <<
"unpacking error: unknown Chamber " << unknownChamber <<
" unknown VFat "
266 << unknownVFat <<
" bad VFat " << badVfat;
References l1GtPatternGenerator_cfi::bx, GEMDigi::bx(), GEMDetId::chamberId(), officialStyle::chan, GEMROMapping::channelNum::chNum, FEDRawData::data(), data, GEMROMapping::chamDC::detId, GEMROMapping::vfatDC::detId, fed_token, FEDRawDataCollection::FEDData(), l1tstage2_dqm_sourceclient-live_cfg::fedId, gemRawToDigi_, iEvent, createfilelist::int, FEDTrailer::length, GEMROMapping::vfatDC::localPhi, LogDebug, GEMeMap::maxChan_, FEDNumbering::MAXGEMFEDID, FEDNumbering::MINGEMFEDID, eostools::move(), ecaldqm::nChannels, FEDRawData::size(), GEMROMapping::stripNum::stNum, GEMDigi::strip(), unPackStatusDigis_, GEMROMapping::vfatDC::vfatType, GEMROMapping::chamDC::vfatVer, and testProducerWithPsetDescEmpty_cfi::x1.