Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /*
0002  *  eventsetup_get_check_compile_time_error_t.cc
0003  *  EDMProto
0004  *
0005  *  Created by Chris Jones on 3/25/05.
0006  *
0007  */
0008 
0009 #include "FWCore/Framework/interface/EventSetup.h"
0010 #include "FWCore/Framework/interface/EventSetupProvider.h"
0011 #include "FWCore/Framework/interface/IOVSyncValue.h"
0012 
0013 using namespace edm;
0014 class NotAGoodRecord {};
0015 
0016 int main() {
0017   eventsetup::EventSetupProvider provider;
0018   auto const& eventSetup = provider.eventSetupForInstance(IOVSyncValue(0));
0019   //This should cause a compile time failure since NotAGoodRecord
0020   /// does not inherit from edm::eventsetup::EventSetupRecord
0021   eventSetup.get<NotAGoodRecord>();
0022 
0023   return 0;
0024 }