CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/EventFilter/StorageManager/src/EventStreamConfigurationInfo.cc

Go to the documentation of this file.
00001 // $Id: EventStreamConfigurationInfo.cc,v 1.12 2011/03/07 15:31:32 mommsen Exp $
00003 
00004 #include "EventFilter/StorageManager/interface/EventStreamConfigurationInfo.h"
00005 #include <ostream>
00006 
00007 using stor::EventStreamConfigurationInfo;
00008 
00009 
00010 bool EventStreamConfigurationInfo::operator<(const EventStreamConfigurationInfo& other) const
00011 {
00012   if ( outputModuleLabel_ != other.outputModuleLabel() )
00013     return ( outputModuleLabel_ < other.outputModuleLabel() );
00014   if ( triggerSelection_ != other.triggerSelection() )
00015     return ( triggerSelection_ < other.triggerSelection() );
00016   if ( eventSelection_ != other.eventSelection() )
00017     return ( eventSelection_ < other.eventSelection() );
00018   if ( streamLabel_ != other.streamLabel() )
00019     return ( streamLabel_ < other.streamLabel() );
00020   if ( streamId_ != other.streamId() )
00021     return ( streamId_ < other.streamId() );
00022   if ( maxFileSizeMB_ != other.maxFileSizeMB() )
00023     return ( maxFileSizeMB_ < other.maxFileSizeMB() );
00024   return ( fractionToDisk_ < other.fractionToDisk() );
00025 }
00026 
00027 
00028 std::ostream& stor::operator<<
00029 (
00030   std::ostream& os,
00031   const EventStreamConfigurationInfo& ci
00032 )
00033 {
00034   os << "EventStreamConfigurationInfo:" << std::endl
00035      << " Stream label: " << ci.streamLabel() << std::endl
00036      << " Maximum file size, MB: " << ci.maxFileSizeMB() << std::endl
00037      << " HLT output: " << ci.outputModuleLabel() << std::endl
00038      << " Fraction of events written to disk: " << ci.fractionToDisk() << std::endl
00039      << " Stream Id: " << ci.streamId() << std::endl;
00040   
00041   os << " Event filters:";
00042   if (ci.triggerSelection().size()) {
00043     os << std::endl << ci.triggerSelection();
00044   }
00045   else
00046     for( unsigned int i = 0; i < ci.eventSelection().size(); ++i )
00047     {
00048       os << std::endl << "  " << ci.eventSelection()[i];
00049     }
00050   
00051   return os;
00052 }
00053 
00054