CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/FWCore/Framework/interface/ProcessingController.h

Go to the documentation of this file.
00001 #ifndef FWCore_Framework_ProcessingController_h
00002 #define FWCore_Framework_ProcessingController_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Framework
00006 // Class  :     ProcessingController
00007 // 
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Fri Aug  6 16:06:01 CDT 2010
00019 // $Id: ProcessingController.h,v 1.2 2010/08/27 19:57:24 wdd Exp $
00020 //
00021 
00022 // system include files
00023 
00024 // user include files
00025 #include "DataFormats/Provenance/interface/EventID.h"
00026 
00027 // forward declarations
00028 namespace edm {
00029    
00030    class ProcessingController {
00031       
00032    public:
00033       enum ForwardState {
00034          kEventsAheadInFile,
00035          kNextFileExists, // but no events ahead in this file
00036          kAtLastEvent,
00037          kUnknownForward // returned by a source which is not random accessible
00038       };
00039 
00040       enum ReverseState {
00041          kEventsBackwardsInFile,
00042          kPreviousFileExists, // but no events backwards in this file
00043          kAtFirstEvent,
00044          kUnknownReverse // returned by a source which is not random accessible
00045       };
00046 
00047       ProcessingController(ForwardState forwardState, ReverseState reverseState, bool iCanRandomAccess);
00048       //virtual ~ProcessingController();
00049       
00050       // ---------- const member functions ---------------------
00051 
00053       ForwardState forwardState() const;
00054       ReverseState reverseState() const;
00055 
00057       bool canRandomAccess() const;
00058 
00059       enum Transition {
00060          kToNextEvent,
00061          kToPreviousEvent,
00062          kToSpecifiedEvent
00063       };
00064       
00065       Transition requestedTransition() const;
00066       
00069       edm::EventID specifiedEventTransition() const;
00070 
00071       bool lastOperationSucceeded() const;
00072 
00073       // ---------- static member functions --------------------
00074       
00075       // ---------- member functions ---------------------------
00076       
00080       void setTransitionToNextEvent();
00081       
00085       void setTransitionToPreviousEvent();
00086       
00090       void setTransitionToEvent( edm::EventID const& iID);
00091 
00092       void setLastOperationSucceeded(bool value);
00093 
00094    private:
00095       ProcessingController(const ProcessingController&); // stop default
00096       
00097       const ProcessingController& operator=(const ProcessingController&); // stop default
00098       
00099       // ---------- member data --------------------------------
00100       ForwardState forwardState_;
00101       ReverseState reverseState_;
00102       Transition transition_;
00103       EventID specifiedEvent_;
00104       bool canRandomAccess_;
00105       bool lastOperationSucceeded_;
00106    };
00107 }
00108 #endif