Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:02

0001 #ifndef FWCore_Framework_EventForOutput_h
0002 #define FWCore_Framework_EventForOutput_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:     Framework
0007 // Class  :     EventForOutput
0008 //
0009 /**\class edm::EventForOutput
0010 
0011 */
0012 /*----------------------------------------------------------------------
0013 ----------------------------------------------------------------------*/
0014 
0015 #include "DataFormats/Common/interface/BasicHandle.h"
0016 #include "DataFormats/Common/interface/ConvertHandle.h"
0017 #include "DataFormats/Common/interface/Handle.h"
0018 #include "DataFormats/Common/interface/Wrapper.h"
0019 #include "DataFormats/Provenance/interface/BranchListIndex.h"
0020 #include "DataFormats/Provenance/interface/EventAuxiliary.h"
0021 #include "DataFormats/Provenance/interface/EventID.h"
0022 #include "DataFormats/Provenance/interface/EventSelectionID.h"
0023 #include "DataFormats/Provenance/interface/RunID.h"
0024 
0025 #include "FWCore/Framework/interface/Frameworkfwd.h"
0026 #include "FWCore/Framework/interface/OccurrenceForOutput.h"
0027 #include "FWCore/Utilities/interface/TypeID.h"
0028 #include "FWCore/Utilities/interface/EDGetToken.h"
0029 #include "FWCore/Utilities/interface/StreamID.h"
0030 #include "FWCore/Utilities/interface/propagate_const.h"
0031 
0032 #include <memory>
0033 #include <string>
0034 #include <typeinfo>
0035 #include <vector>
0036 
0037 class testEventGetRefBeforePut;
0038 
0039 namespace edmtest {
0040   class TestOutputModule;
0041 }
0042 
0043 namespace edm {
0044 
0045   class BranchDescription;
0046   class ModuleCallingContext;
0047   class ProductProvenanceRetriever;
0048   class EDConsumerBase;
0049 
0050   class EventForOutput : public OccurrenceForOutput {
0051   public:
0052     EventForOutput(EventTransitionInfo const&, ModuleDescription const&, ModuleCallingContext const*);
0053     EventForOutput(EventPrincipal const&, ModuleDescription const&, ModuleCallingContext const*);
0054     ~EventForOutput() override;
0055 
0056     EventAuxiliary const& eventAuxiliary() const { return aux_; }
0057     EventID const& id() const { return aux_.id(); }
0058     EventNumber_t event() const { return aux_.event(); }
0059     LuminosityBlockNumber_t luminosityBlock() const { return aux_.luminosityBlock(); }
0060     Timestamp const& time() const { return aux_.time(); }
0061 
0062     ///\return The id for the particular Stream processing the Event
0063     StreamID streamID() const { return streamID_; }
0064 
0065     LuminosityBlockForOutput const& getLuminosityBlock() const { return *luminosityBlock_; }
0066 
0067     RunForOutput const& getRun() const;
0068 
0069     RunNumber_t run() const { return id().run(); }
0070 
0071     BranchListIndexes const& branchListIndexes() const;
0072 
0073     EventToProcessBlockIndexes const& eventToProcessBlockIndexes() const;
0074 
0075     EventSelectionIDVector const& eventSelectionIDs() const;
0076 
0077     ProductProvenanceRetriever const* productProvenanceRetrieverPtr() const;
0078 
0079   private:
0080     friend class edmtest::TestOutputModule;  // For testing
0081 
0082     EventPrincipal const& eventPrincipal() const;
0083 
0084     EventAuxiliary const& aux_;
0085     std::shared_ptr<LuminosityBlockForOutput const> const luminosityBlock_;
0086 
0087     StreamID streamID_;
0088   };
0089 }  // namespace edm
0090 #endif