CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/Framework/src/OutputWorker.h

Go to the documentation of this file.
00001 #ifndef Framework_OutputWorker_h
00002 #define Framework_OutputWorker_h
00003 
00004 /*----------------------------------------------------------------------
00005   
00006 OutputWorker: The OutputModule as the schedule sees it.  The job of
00007 this object is to call the output module.
00008 
00009 According to our current definition, a single output module can only
00010 appear in one worker.
00011 ----------------------------------------------------------------------*/
00012 
00013 #include <memory>
00014 
00015 #include "FWCore/Framework/src/WorkerT.h"
00016 #include "FWCore/Framework/interface/OutputModule.h"
00017 #include "FWCore/Framework/interface/Frameworkfwd.h"
00018 
00019 namespace edm {
00020 
00021   class OutputWorker : public WorkerT<OutputModule> {
00022   public:
00023     OutputWorker(std::auto_ptr<OutputModule> mod, 
00024                  ModuleDescription const&,
00025                  WorkerParams const&);
00026 
00027     virtual ~OutputWorker();
00028 
00029     // Call closeFile() on the controlled OutputModule.
00030     void closeFile();
00031 
00032     // Call shouldWeCloseFile() on the controlled OutputModule.
00033     bool shouldWeCloseFile() const;
00034 
00035     void openNewFileIfNeeded();
00036 
00037     bool wantAllEvents() const;
00038 
00039     void openFile(FileBlock const& fb);
00040 
00041     void writeRun(RunPrincipal const& rp);
00042 
00043     void writeLumi(LuminosityBlockPrincipal const& lbp);
00044 
00045     bool limitReached() const;
00046 
00047     void configure(OutputModuleDescription const& desc);
00048   };
00049 
00050 }
00051 
00052 #endif