Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:12

0001 // -*- C++ -*-
0002 //
0003 // Package:     Framework
0004 // Class  :     NoRecordException
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Fri Aug 28 13:27:25 CDT 2009
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "FWCore/Framework/interface/NoRecordException.h"
0017 #include "FWCore/Framework/interface/EventSetupRecordKey.h"
0018 #include "FWCore/Framework/interface/IOVSyncValue.h"
0019 #include "FWCore/Framework/interface/EventSetupImpl.h"
0020 #include "FWCore/Utilities/interface/Exception.h"
0021 
0022 bool edm::eventsetup::recordDoesExist(EventSetupImpl const& iES, EventSetupRecordKey const& iKey) {
0023   return iES.recordIsProvidedByAModule(iKey);
0024 }
0025 
0026 void edm::eventsetup::no_record_exception_message_builder(cms::Exception& oException,
0027                                                           const char* iName,
0028                                                           bool iKnownRecord) {
0029   oException << "No \"" << iName << "\" record found in the EventSetup.\n";
0030   if (iKnownRecord) {
0031     oException << "\n The Record is delivered by an ESSource or ESProducer but there is no valid IOV for the "
0032                   "synchronization value.\n"
0033                   " Please check \n"
0034                   "   a) if the synchronization value is reasonable and report to the hypernews if it is not.\n"
0035                   "   b) else check that all ESSources have been properly configured. \n";
0036   } else {
0037     oException << "\n Please add an ESSource or ESProducer that delivers such a record.\n";
0038   }
0039 }