Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:08

0001 #include "Utilities/StorageFactory/test/Test.h"
0002 #include "Utilities/StorageFactory/interface/Storage.h"
0003 #include "FWCore/Utilities/interface/Exception.h"
0004 #include <cassert>
0005 
0006 int main (int, char **/*argv*/) try
0007 {
0008   initTest();
0009 
0010   IOSize    n;
0011   char      buf [1024];
0012   Storage   *s = StorageFactory::get ()->open
0013     ("rfio:/castor/cern.ch/cms/reconstruction/datafiles/ORCA_7_5_2/PoolFileCatalog.xml");
0014 
0015   assert (s);
0016   while ((n = s->read (buf, sizeof (buf))))
0017     std::cout.write (buf, n);
0018 
0019   s->close();
0020   delete s;
0021 
0022   std::cerr << "stats:\n" << StorageAccount::summaryText () << std::endl;
0023   return EXIT_SUCCESS;
0024 } catch(cms::Exception const& e) {
0025   std::cerr << e.explainSelf() << std::endl;
0026   return EXIT_FAILURE;
0027 } catch(std::exception const& e) {
0028   std::cerr << e.what() << std::endl;
0029   return EXIT_FAILURE;
0030 }