/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/lcio/src/cpp/src/SIO/LCIORandomAccess.cc

Go to the documentation of this file.
00001 #include "SIO/LCIORandomAccess.h"
00002 
00003 
00004 namespace SIO{
00005 
00006   
00007   bool operator < ( const RunEvent& r0, const RunEvent& other) { 
00008     
00009     //std::cout << r0 << " < " << other << " : [" 
00010     //<<  ( r0.RunNum == other.RunNum ?  r0.EvtNum < other.EvtNum  :  r0.RunNum < other.RunNum )  << "]" << std::endl;
00011     
00012     if( r0.EvtNum < 0 ) { // sort run records (evtNu == -1 ) first 
00013       
00014       return ( other.EvtNum < 0 ?  r0.RunNum < other.RunNum : true ) ;
00015     }
00016     else if( other.EvtNum < 0 ) return false ;
00017     
00018     return ( r0.RunNum == other.RunNum ?  r0.EvtNum < other.EvtNum  :  r0.RunNum < other.RunNum ) ; 
00019   } 
00020   
00021   std::ostream & operator<<(std::ostream& os, const RunEvent& re ) {
00022     
00023     os << " run: " << re.RunNum << " - evt: " << re.EvtNum ;
00024     
00025     return os ;
00026   }
00027   
00028   bool operator<(const LCIORandomAccess ra0, const LCIORandomAccess& other) {  
00029     
00030     return ra0._maxRunEvt < other._minRunEvt ;
00031   } 
00032 
00033   std::ostream& operator<<(std::ostream& os, const LCIORandomAccess& ra ){
00034 
00035     os << " LCIORandomAccess:  ----------------------- " << std::endl  
00036        << " minRun " <<  ra._minRunEvt.RunNum << std::endl
00037        << " minEvt " <<  ra._minRunEvt.EvtNum  << std::endl
00038        << " maxRun " <<  ra._maxRunEvt.RunNum << std::endl  
00039        << " maxEvt " <<  ra._maxRunEvt.EvtNum << std::endl  
00040        << " nRunHeaders " <<  ra._nRunHeaders << std::endl 
00041        << " nEvents " <<  ra._nEvents  << std::endl
00042        << " recordsAreInOrder " <<  ra._recordsAreInOrder  << std::endl  
00043        << " indexLocation " <<  ra._indexLocation  << std::endl
00044        << " prevLocation " <<  ra._prevLocation  << std::endl
00045        << " nextLocation " <<  ra._nextLocation  << std::endl
00046        << " firstRecordLocation " <<  ra._firstRecordLocation  << std::endl
00047        << "---------------------------------------------"  
00048        << std::endl ;
00049 
00050     return os ;
00051   }
00052 
00053 }
00054 
00055 
00056 

Generated on Mon Jan 7 13:15:21 2013 for MicromegasFramework by  doxygen 1.4.7