CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/EventFilter/StorageManager/interface/FragKey.h

Go to the documentation of this file.
00001 #ifndef EventFilter_StorageManager_FragKey_h
00002 #define EventFilter_StorageManager_FragKey_h
00003 
00004 // -*- C++ -*-
00005 
00006 /*
00007  */
00008 
00009 #include "IOPool/Streamer/interface/MsgTools.h"
00010 
00011 namespace stor 
00012 {
00013 
00014   struct FragKey
00015   {
00017     FragKey(uint8 msgcode, uint32 run, uint32 event, uint32 secondaryId):
00018       code_(msgcode), run_(run), event_(event), secondaryId_(secondaryId) {}
00019     FragKey(uint8 msgcode, uint32 run, uint32 event, uint32 secondaryId,
00020             uint32 originatorPid, uint32 originatorGuid):
00021       code_(msgcode), run_(run), event_(event), secondaryId_(secondaryId),
00022       originatorPid_(originatorPid), originatorGuid_(originatorGuid) {}
00023     bool operator<(FragKey const& b) const {
00024       if(code_ != b.code_) return code_ < b.code_;
00025       if(run_ != b.run_) return run_ < b.run_;
00026       if(event_ != b.event_) return event_ < b.event_;
00027       if(originatorPid_ != b.originatorPid_) return originatorPid_ < b.originatorPid_;
00028       if(originatorGuid_ != b.originatorGuid_) return originatorGuid_ < b.originatorGuid_;
00029       return secondaryId_ < b.secondaryId_;
00030     }
00031     // the data for the key
00032     uint8 code_;
00033     uint32 run_;
00034     uint32 event_;
00035     // the secondary ID is populated with different values depending
00036     // on the context.  For EVENT messages, the output module ID is used.
00037     // For DQMEVENT messages, the folder ID is used.
00038     uint32 secondaryId_;
00039     uint32 originatorPid_;
00040     uint32 originatorGuid_;
00041   };
00042 
00043 }
00044 
00045 #endif