Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-01 22:41:10

0001 #include "FWCore/Utilities/interface/Exception.h"
0002 #include "Utilities/StorageFactory/interface/Storage.h"
0003 #include "Utilities/StorageFactory/test/Test.h"
0004 #include <cassert>
0005 
0006 int main(int, char ** /*argv*/) try {
0007   initTest();
0008 
0009   using namespace edm::storage;
0010   char buf[1024];
0011   std::unique_ptr<Storage> s = StorageFactory::get()->open(
0012       "http://i.am.davix.plugin.fake.url:1234/store/mc/HC/GenericTTbar/ "
0013       "GEN/127938CD-F8CC-E311-9250-02163E00E8E6.root");
0014   assert(s);
0015 
0016   s->read(buf, sizeof(buf));
0017   s->close();
0018 
0019   std::cout << "stats:\n" << StorageAccount::summaryText() << std::endl;
0020   return EXIT_FAILURE;
0021 } catch (cms::Exception const &e) {
0022   std::cerr << e.explainSelf() << std::endl;
0023   return EXIT_SUCCESS;
0024 } catch (std::exception const &e) {
0025   std::cerr << e.what() << std::endl;
0026   return EXIT_FAILURE;
0027 }