CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/EventFilter/StorageManager/interface/ErrorStreamConfigurationInfo.h

Go to the documentation of this file.
00001 // $Id: ErrorStreamConfigurationInfo.h,v 1.6 2011/03/07 15:31:31 mommsen Exp $
00003 
00004 #ifndef EventFilter_StorageManager_ErrorStreamConfigurationInfo_h
00005 #define EventFilter_StorageManager_ErrorStreamConfigurationInfo_h
00006 
00007 #include "EventFilter/StorageManager/interface/StreamID.h"
00008 
00009 #include <boost/shared_ptr.hpp>
00010 
00011 #include <string>
00012 #include <vector>
00013 #include <iosfwd>
00014 
00015 namespace stor
00016 {
00017 
00026   class ErrorStreamConfigurationInfo
00027   {
00028 
00029   public:
00030 
00031     // Constructor:
00032     ErrorStreamConfigurationInfo( const std::string& streamLabel,
00033                                   int maxFileSizeMB ):
00034       streamLabel_( streamLabel ),
00035       maxFileSizeMB_( maxFileSizeMB ),
00036       streamId_(0)
00037     {}
00038 
00039     // Destructor:
00040     ~ErrorStreamConfigurationInfo() {}
00041 
00042     // Accessors:
00043     const std::string& streamLabel() const { return streamLabel_; }
00044     const int maxFileSizeMB() const { return maxFileSizeMB_; }
00045     StreamID streamId() const { return streamId_; }
00046 
00047     // Comparison:
00048     bool operator<(const ErrorStreamConfigurationInfo&) const;
00049 
00050     // Set stream Id:
00051     void setStreamId( StreamID sid ) { streamId_ = sid; }
00052 
00053     // Output:
00054     friend std::ostream& operator <<
00055       ( std::ostream&, const ErrorStreamConfigurationInfo& );
00056 
00057   private:
00058 
00059     std::string streamLabel_;
00060     int maxFileSizeMB_;
00061     StreamID streamId_;
00062 
00063   };
00064 
00065   typedef std::vector<ErrorStreamConfigurationInfo> ErrStrConfigList;
00066   typedef boost::shared_ptr<ErrStrConfigList> ErrStrConfigListPtr;
00067 
00068   std::ostream& operator << ( std::ostream&, const ErrorStreamConfigurationInfo& );
00069 
00070 } // namespace stor
00071 
00072 #endif // EventFilter_StorageManager_ErrorStreamConfigurationInfo_h
00073 
00074 
00081