CMS 3D CMS Logo

InitMsgCollection.h

Go to the documentation of this file.
00001 #ifndef STOR_INITMSG_COLLECTION_H
00002 #define STOR_INITMSG_COLLECTION_H
00003 
00012 #include "IOPool/Streamer/interface/InitMessage.h"
00013 #include "boost/shared_ptr.hpp"
00014 #include "boost/thread/thread.hpp"
00015 #include <vector>
00016 #include <map>
00017 
00018 namespace stor
00019 {
00020   typedef std::vector<unsigned char> InitMsgBuffer;
00021   typedef boost::shared_ptr<InitMsgBuffer> InitMsgSharedPtr;
00022 
00023   class InitMsgCollection
00024   {
00025 
00026   public:
00027 
00028     InitMsgCollection();
00029     ~InitMsgCollection();
00030 
00031 #if 0
00032     // 29-Apr-2008 KAB - replaced the following methods as part of the switch
00033     // to the newer HLT output module selection scheme (in which the HLT
00034     // output module needs to be explicitly specified)
00035     //
00036     // testAndAddIfUnique() replaced by addIfUnique()
00037     // getElementForSelection() replaced by getElementForOutputModule()
00038     //
00039     bool testAndAddIfUnique(InitMsgView const& initMsgView);
00040     InitMsgSharedPtr getElementForSelection(Strings const& triggerSelection);
00041 #endif
00042     bool addIfUnique(InitMsgView const& initMsgView);
00043     InitMsgSharedPtr getElementForOutputModule(std::string requestedOMLabel);
00044     InitMsgSharedPtr getLastElement();
00045     InitMsgSharedPtr getElementAt(unsigned int index);
00046     InitMsgSharedPtr getFullCollection() { return serializedFullSet_; }
00047 
00048     void clear();
00049     int size();
00050 
00051     std::string getSelectionHelpString();
00052     std::string getOutputModuleName(uint32 outputModuleId);
00053     static std::string stringsToText(Strings const& list,
00054                                      unsigned int maxCount = 0);
00055 
00056   private:
00057 
00058     void add(InitMsgView const& initMsgView);
00059 
00060     std::vector<InitMsgSharedPtr> initMsgList_;
00061     InitMsgSharedPtr serializedFullSet_;
00062 
00063     std::map<uint32, std::string> outModNameTable_;
00064 
00065     boost::mutex listLock_;
00066 
00067   };
00068 }
00069 
00070 #endif

Generated on Tue Jun 9 17:34:52 2009 for CMSSW by  doxygen 1.5.4