CMS 3D CMS Logo

NoDataException Class Reference

#include <Exception/interface/NoDataException.h>

Detailed Description

Description: An exception that is thrown whenever data was not available in the Frame

Usage: NoDataException<> is thrown whenever an extract call fails because the type of data being extract was not available in the Frame.

If your program should continue even if the extract call fails, you should catch this exception.

try {
Item<DBEventHeader> eventHeader;
extract(iFrame.record(Stream::kBeginRun), eventHeader);
report(INFO, kFacilityString) << "run # " << eventHeader->runNumber()
<< "event # " << eventHeader->number()
<< std::endl;
report(WARNING, kFacilityString) << iException.what() << std::endl;
}

To make it easier to catch exceptions, all of the FAXXX types provide C preprocessor macros of the form

NO_XXX_DATA_EXCEPTION(type)

which are just shorthand ways of writing

E.g.

NO_ITEM_DATA_EXCEPTION(DBEventHeader)

is the same as writing

NOTE: NoDataException<> is only thrown when the data is unavailable. If the data should have been available but a problem occurred while obtaining the data, then a different type of exception will be thrown.

To catch ALL possible exceptions that can occur from the Data Access system you should catch exceptions of the type DAExceptionBase.

relmon_rootfiles_spy.contents
contents
Definition: relmon_rootfiles_spy.py:129
NoDataException
unpackBuffers-CaloStage2.INFO
INFO
Definition: unpackBuffers-CaloStage2.py:169
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
remoteMonitoring_LED_IterMethod_cfg.WARNING
WARNING
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
edmIntegrityCheck.report
report
Definition: edmIntegrityCheck.py:348
extract
int extract(std::vector< int > *output, const std::string &dati)
Definition: InvMatrixUtils.cc:251