CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/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/Frameworkfwd.h"
00017 
00018 namespace edm {
00019 
00020   class OutputWorker : public WorkerT<OutputModule> {
00021   public:
00022     OutputWorker(std::auto_ptr<OutputModule> mod, 
00023                  ModuleDescription const&,
00024                  WorkerParams const&);
00025 
00026     virtual ~OutputWorker();
00027 
00028     // Call closeFile() on the controlled OutputModule.
00029     void closeFile();
00030 
00031     // Call shouldWeCloseFile() on the controlled OutputModule.
00032     bool shouldWeCloseFile() const;
00033 
00034     void openNewFileIfNeeded();
00035 
00036     bool wantAllEvents() const;
00037 
00038     void openFile(FileBlock const& fb);
00039 
00040     void writeRun(RunPrincipal const& rp);
00041 
00042     void writeLumi(LuminosityBlockPrincipal const& lbp);
00043 
00044     bool limitReached() const;
00045 
00046     void configure(OutputModuleDescription const& desc);
00047     
00048     SelectionsArray const& keptProducts() const;
00049   };
00050 
00051 }
00052 
00053 #endif