Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr92x L1T UnpackerCaloLayer1 & DQMCaloLayer1 Adjust for Non-present FED data in MC #18703

2 changes: 1 addition & 1 deletion DQM/L1TMonitor/src/L1TdeStage2CaloLayer1.cc
Expand Up @@ -68,7 +68,7 @@ void L1TdeStage2CaloLayer1::analyze(const edm::Event & event, const edm::EventSe
}

if ( dataTowerSet.size() != emulTowerSet.size() ) {
edm::LogError("L1TdeStage2CaloLayer1") << "Data and Emulation have different number of trigger towers! data=" << dataTowerSet.size() << ", emul=" << emulTowerSet.size() << std::endl;
edm::LogInfo("L1TdeStage2CaloLayer1") << "Data and Emulation have different number of trigger towers! data=" << dataTowerSet.size() << ", emul=" << emulTowerSet.size() << std::endl;
towerCountMismatchesPerBx_->Fill(event.bunchCrossing());
return;
}
Expand Down
8 changes: 7 additions & 1 deletion EventFilter/L1TXRawToDigi/plugins/L1TCaloLayer1RawToDigi.cc
Expand Up @@ -97,6 +97,7 @@ class L1TCaloLayer1RawToDigi : public stream::EDProducer<> {
std::vector<int> fedIDs;

uint32_t event;
uint32_t warnsa;

bool verbose;

Expand Down Expand Up @@ -127,6 +128,8 @@ L1TCaloLayer1RawToDigi::L1TCaloLayer1RawToDigi(const ParameterSet& iConfig) :

consumes<FEDRawDataCollection>(fedRawDataLabel);

warnsa = 0;

}


Expand Down Expand Up @@ -168,7 +171,10 @@ L1TCaloLayer1RawToDigi::produce(Event& iEvent, const EventSetup& iSetup)
const uint64_t *fedRawDataArray = (const uint64_t *) fedRawData.data();

if ( fedRawData.size() == 0 || fedRawDataArray == nullptr ) {
LogError("L1TCaloLayer1RawToDigi") << "Could not load FED data for " << fed << ", putting empty collections!";
if (warnsa<5) {
Copy link
Contributor

@fwyzard fwyzard May 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this will print the LogInfo 5 times per stream, not just 5 times per job.

@Dr15Jones is there a way to set the default limit on the MessageLogger from within the C++ code ?
In the full process configuration one can do

process.MessageLogger.categories.append("L1TCaloLayer1RawToDigi")
process.MessageLogger.L1TCaloLayer1RawToDigi = cms.untracked.PSet(
    limit = cms.untracked.int32( 5 )
)

Is there a way to do the same in C++ within the module that will print the messages ?
Something like

if (edm::Service<MessageLogger>().isAvailable())
  edm::Service<MessageLogger>()->category("L1TCaloLayer1RawToDigi").setDefaultLimit(5);

?

warnsa++;
LogInfo("L1TCaloLayer1RawToDigi") << "Could not load FED data for " << fed << ", putting empty collections!";
}
continue;
}

Expand Down