CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/EventFilter/StorageManager/interface/I2OChain.h

Go to the documentation of this file.
00001 // $Id: I2OChain.h,v 1.10.6.1 2011/03/07 11:33:04 mommsen Exp $
00003 
00004 #ifndef EventFilter_StorageManager_I2OChain_h
00005 #define EventFilter_StorageManager_I2OChain_h
00006 
00007 #include <vector>
00008 
00009 #include "boost/shared_ptr.hpp"
00010 #include "toolbox/mem/Reference.h"
00011 
00012 #include "IOPool/Streamer/interface/HLTInfo.h"
00013 #include "EventFilter/StorageManager/interface/QueueID.h"
00014 #include "EventFilter/StorageManager/interface/StreamID.h"
00015 #include "EventFilter/StorageManager/interface/Utils.h"
00016 
00017 
00018 namespace stor {
00019 
00020   class DQMKey;
00021 
00022 
00036   // We need only declare ChainData here; it is defined in I2OChain.cc.
00037   namespace detail
00038   {
00039     class ChainData;
00040   }
00041 
00042   class I2OChain
00043   {
00044   public:
00045 
00046 
00050     I2OChain();
00051 
00061     explicit I2OChain(toolbox::mem::Reference* pRef);
00062 
00067     I2OChain(I2OChain const& other);
00068 
00073     ~I2OChain();
00074 
00083     I2OChain& operator=(I2OChain const& rhs);
00084 
00088     void swap(I2OChain& other);
00089 
00093     bool empty() const;
00094 
00098     bool complete() const;
00099 
00105     bool faulty() const;
00106 
00110     unsigned int faultyBits() const;
00111 
00126     void addToChain(I2OChain& newpart);
00127 
00131     //void markComplete();
00132 
00139     void markFaulty();
00140 
00146     unsigned long* getBufferData() const;
00147 
00148 
00154     void release();
00155 
00165     utils::TimePoint_t creationTime() const;
00166 
00175     utils::TimePoint_t lastFragmentTime() const;
00176 
00186     utils::TimePoint_t staleWindowStartTime() const;
00187 
00191     void addToStaleWindowStartTime(const utils::Duration_t);
00192 
00196     void resetStaleWindowStartTime();
00197 
00203     void tagForStream(StreamID);
00204 
00210     void tagForEventConsumer(QueueID);
00211 
00217     void tagForDQMEventConsumer(QueueID);
00218 
00223     bool isTaggedForAnyStream() const;
00224 
00229     bool isTaggedForAnyEventConsumer() const;
00230 
00235     bool isTaggedForAnyDQMEventConsumer() const;
00236 
00245     std::vector<StreamID> getStreamTags() const;
00246 
00255     QueueIDs getEventConsumerTags() const;
00256 
00265     QueueIDs getDQMEventConsumerTags() const;
00266 
00272     unsigned int messageCode() const;
00273 
00279     unsigned short i2oMessageCode() const;
00280 
00287     unsigned int rbBufferId() const;
00288 
00295     unsigned int hltLocalId() const;
00296 
00303     unsigned int hltInstance() const;
00304 
00311     unsigned int hltTid() const;
00312 
00319     std::string hltURL() const;
00320 
00327     std::string hltClassName() const;
00328 
00335     unsigned int fuProcessId() const;
00336 
00343     unsigned int fuGuid() const;
00344 
00350     FragKey fragmentKey() const;
00351 
00352 
00357     size_t memoryUsed() const;
00358 
00368     unsigned int fragmentCount() const;
00369 
00380     unsigned long totalDataSize() const;
00381 
00392     unsigned long dataSize(int fragmentIndex) const;
00393 
00404     unsigned char* dataLocation(int fragmentIndex) const;
00405 
00412     unsigned int getFragmentID(int fragmentIndex) const;
00413 
00421     unsigned long headerSize() const;
00422 
00430     unsigned char* headerLocation() const;
00431 
00442     unsigned int copyFragmentsIntoBuffer(std::vector<unsigned char>& buff) const;
00443 
00449     std::string outputModuleLabel() const;
00450 
00456     uint32_t outputModuleId() const;
00457 
00463     std::string topFolderName() const;
00464 
00471     DQMKey dqmKey() const;
00472 
00478     void hltTriggerNames(Strings& nameList) const;
00479 
00485     void hltTriggerSelections(Strings& nameList) const;
00486 
00492     void l1TriggerNames(Strings& nameList) const;
00493 
00499     uint32_t hltTriggerCount() const;
00500 
00508     void hltTriggerBits(std::vector<unsigned char>& bitList) const;
00509 
00515     uint32_t runNumber() const;
00516 
00522     uint32_t lumiSection() const;
00523 
00529     uint32_t eventNumber() const;
00530 
00535     uint32_t adler32Checksum() const;
00536 
00545     void assertRunNumber(uint32_t runNumber);
00546 
00551     bool isEndOfLumiSectionMessage() const;
00552 
00553   private:
00554 
00555     boost::shared_ptr<detail::ChainData> data_;
00556   };
00557   
00558 } // namespace stor
00559 
00560 #endif // EventFilter_StorageManager_I2OChain_h 
00561 
00562