CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/EventFilter/StorageManager/interface/I2OChain.h

Go to the documentation of this file.
00001 // $Id: I2OChain.h,v 1.16 2012/04/20 10:48:18 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 "EventFilter/StorageManager/interface/FragKey.h"
00013 #include "EventFilter/StorageManager/interface/QueueID.h"
00014 #include "EventFilter/StorageManager/interface/StreamID.h"
00015 #include "EventFilter/StorageManager/interface/Utils.h"
00016 
00017 #include "IOPool/Streamer/interface/MsgTools.h"
00018 
00019 namespace stor {
00020 
00021   class DQMKey;
00022 
00023 
00037   // We need only declare ChainData here; it is defined in I2OChain.cc.
00038   namespace detail
00039   {
00040     class ChainData;
00041   }
00042 
00043   class I2OChain
00044   {
00045   public:
00046 
00047 
00051     I2OChain();
00052 
00062     explicit I2OChain(toolbox::mem::Reference* pRef);
00063 
00068     I2OChain(I2OChain const& other);
00069 
00074     ~I2OChain();
00075 
00084     I2OChain& operator=(I2OChain const& rhs);
00085 
00089     void swap(I2OChain& other);
00090 
00094     bool empty() const;
00095 
00099     bool complete() const;
00100 
00106     bool faulty() const;
00107 
00111     unsigned int faultyBits() const;
00112 
00127     void addToChain(I2OChain& newpart);
00128 
00132     //void markComplete();
00133 
00140     void markFaulty();
00141 
00147     unsigned long* getBufferData() const;
00148 
00149 
00155     void release();
00156 
00166     utils::TimePoint_t creationTime() const;
00167 
00176     utils::TimePoint_t lastFragmentTime() const;
00177 
00187     utils::TimePoint_t staleWindowStartTime() const;
00188 
00192     void addToStaleWindowStartTime(const utils::Duration_t);
00193 
00197     void resetStaleWindowStartTime();
00198 
00204     void tagForStream(StreamID);
00205 
00211     void tagForEventConsumer(QueueID);
00212 
00218     void tagForDQMEventConsumer(QueueID);
00219 
00224     bool isTaggedForAnyStream() const;
00225 
00230     bool isTaggedForAnyEventConsumer() const;
00231 
00236     bool isTaggedForAnyDQMEventConsumer() const;
00237 
00246     std::vector<StreamID> getStreamTags() const;
00247 
00256     QueueIDs getEventConsumerTags() const;
00257 
00266     QueueIDs getDQMEventConsumerTags() const;
00267 
00271     unsigned int droppedEventsCount() const;
00272 
00277     void setDroppedEventsCount(unsigned int);
00278 
00284     unsigned int messageCode() const;
00285 
00291     unsigned short i2oMessageCode() const;
00292 
00299     unsigned int rbBufferId() const;
00300 
00307     unsigned int hltLocalId() const;
00308 
00315     unsigned int hltInstance() const;
00316 
00323     unsigned int hltTid() const;
00324 
00331     std::string hltURL() const;
00332 
00339     std::string hltClassName() const;
00340 
00347     unsigned int fuProcessId() const;
00348 
00355     unsigned int fuGuid() const;
00356 
00362     FragKey fragmentKey() const;
00363 
00364 
00369     size_t memoryUsed() const;
00370 
00380     unsigned int fragmentCount() const;
00381 
00392     unsigned long totalDataSize() const;
00393 
00404     unsigned long dataSize(int fragmentIndex) const;
00405 
00416     unsigned char* dataLocation(int fragmentIndex) const;
00417 
00424     unsigned int getFragmentID(int fragmentIndex) const;
00425 
00433     unsigned long headerSize() const;
00434 
00442     unsigned char* headerLocation() const;
00443 
00454     unsigned int copyFragmentsIntoBuffer(std::vector<unsigned char>& buff) const;
00455 
00461     std::string outputModuleLabel() const;
00462 
00468     uint32_t outputModuleId() const;
00469 
00475     uint32_t nExpectedEPs() const;
00476 
00482     std::string topFolderName() const;
00483 
00490     DQMKey dqmKey() const;
00491 
00497     void hltTriggerNames(Strings& nameList) const;
00498 
00504     void hltTriggerSelections(Strings& nameList) const;
00505 
00511     void l1TriggerNames(Strings& nameList) const;
00512 
00518     uint32_t hltTriggerCount() const;
00519 
00527     void hltTriggerBits(std::vector<unsigned char>& bitList) const;
00528 
00534     uint32_t runNumber() const;
00535 
00541     uint32_t lumiSection() const;
00542 
00548     uint32_t eventNumber() const;
00549 
00554     uint32_t adler32Checksum() const;
00555 
00564     void assertRunNumber(uint32_t runNumber);
00565 
00570     bool isEndOfLumiSectionMessage() const;
00571 
00572   private:
00573 
00574     boost::shared_ptr<detail::ChainData> data_;
00575   };
00576   
00577 } // namespace stor
00578 
00579 #endif // EventFilter_StorageManager_I2OChain_h 
00580 
00581