File indexing completed on 2024-04-06 12:31:53
0001 #include "Utilities/StorageFactory/test/Test.h"
0002 #include "FWCore/Utilities/interface/Exception.h"
0003
0004 int main(int, char** ) try {
0005 initTest();
0006
0007 using namespace edm::storage;
0008 IOOffset size = -1;
0009 bool exists = StorageFactory::get()->check("ftp://cmsdoc.cern.ch/non-existent", &size);
0010
0011 std::cout << "exists = " << exists << ", size = " << size << "\n";
0012 std::cout << StorageAccount::summaryText(true) << std::endl;
0013 return EXIT_SUCCESS;
0014 } catch (cms::Exception const& e) {
0015 std::cerr << e.explainSelf() << std::endl;
0016 return EXIT_FAILURE;
0017 } catch (std::exception const& e) {
0018 std::cerr << e.what() << std::endl;
0019 return EXIT_FAILURE;
0020 }