CMS 3D CMS Logo

DaqSource.h

Go to the documentation of this file.
00001 #ifndef DaqSource_DaqSource_H
00002 #define DaqSource_DaqSource_H
00003 
00013 #include <memory>
00014 #include "boost/shared_ptr.hpp"
00015 #include "FWCore/Framework/interface/InputSource.h"
00016 #include "FWCore/Framework/interface/Frameworkfwd.h"
00017 #include "EventFilter/Utilities/interface/ModuleWeb.h"
00018 
00019 #include "xdata/UnsignedInteger32.h"
00020 #include "xdata/Boolean.h"
00021 
00022 #include <pthread.h>
00023 
00024 class DaqBaseReader;
00025 
00026 namespace edm {
00027   class ParameterSet;
00028   class Timestamp;
00029   class InputSourceDescription;
00030   class EventPrincipal;
00031 
00032 
00033   class DaqSource : public InputSource, private evf::ModuleWeb {
00034 
00035    public:
00036     explicit DaqSource(const ParameterSet& pset, 
00037                      const InputSourceDescription& desc);
00038   
00039     virtual ~DaqSource();
00040     
00041    private:
00042   
00043     virtual std::auto_ptr<EventPrincipal> readEvent_();
00044     virtual boost::shared_ptr<LuminosityBlockPrincipal> readLuminosityBlock_();
00045     virtual boost::shared_ptr<RunPrincipal> readRun_();
00046     virtual std::auto_ptr<EventPrincipal> readIt(EventID const& eventID);
00047     virtual void skip(int offset);
00048     virtual void setLumi(LuminosityBlockNumber_t lb);
00049     virtual void setRun(RunNumber_t r);
00050     virtual ItemType getNextItemType();
00051   
00052 
00053     virtual void publish(xdata::InfoSpace *);
00054     virtual void publishToXmas(xdata::InfoSpace *);
00055     virtual void openBackDoor(unsigned int);
00056     virtual void closeBackDoor();
00057 
00058 
00059     DaqBaseReader*  reader_;
00060     unsigned int    lumiSegmentSizeInEvents_; //temporary kludge, LS# will come from L1 Global record
00061     bool            fakeLSid_;
00062   
00063     RunNumber_t runNumber_;
00064     LuminosityBlockNumber_t luminosityBlockNumber_;
00065     bool noMoreEvents_;
00066     bool newRun_;
00067     bool newLumi_;
00068     std::auto_ptr<EventPrincipal> ep_;
00069     
00070     pthread_mutex_t mutex_;
00071     pthread_cond_t cond_;
00072     xdata::UnsignedInteger32         lumiSectionIndex_;
00073     xdata::UnsignedInteger32         prescaleSetIndex_;
00074     xdata::Boolean                   lsTimedOut_;
00075     xdata::InfoSpace                *is_;
00076     xdata::InfoSpace                *mis_;
00077     int count;
00078   };
00079   
00080 }
00081   
00082 #endif

Generated on Tue Jun 9 17:39:23 2009 for CMSSW by  doxygen 1.5.4