Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:42

0001 #include "CondFormats/SiStripObjects/interface/SiStripBaseDelay.h"
0002 
0003 #include <iostream>
0004 
0005 int test( const bool testResult )
0006 {
0007   if( testResult ) {
0008     return 0;
0009   }
0010   std::cout << "test not passed" << std::endl;
0011   return 1;
0012 }
0013 
0014 int main()
0015 {
0016   int errors = 0;
0017 
0018   std::cout << "Testing SiStripBaseDelay" << std::endl;
0019 
0020   SiStripBaseDelay delay;
0021   std::cout << "Storing delay values from local file" << std::endl;
0022   delay.put(1, 0, 0);
0023 
0024   std::cout << "Reading back parameters" << std::endl;
0025   errors += test( delay.coarseDelay(1) == 0 );
0026 
0027   if( errors == 0 ) {
0028     std::cout << "All tests passed" << std::endl;
0029   }
0030   else {
0031     std::cout << "ERROR: There were " << errors << " tests not passed" << std::endl;
0032   }
0033 
0034 }