CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/FWCore/Framework/interface/RunPrincipal.h

Go to the documentation of this file.
00001 #ifndef FWCore_Framework_RunPrincipal_h
00002 #define FWCore_Framework_RunPrincipal_h
00003 
00004 /*----------------------------------------------------------------------
00005 
00006 RunPrincipal: This is the class responsible for management of
00007 per run EDProducts. It is not seen by reconstruction code;
00008 such code sees the Run class, which is a proxy for RunPrincipal.
00009 
00010 The major internal component of the RunPrincipal
00011 is the DataBlock.
00012 
00013 ----------------------------------------------------------------------*/
00014 
00015 #include <string>
00016 #include <vector>
00017 
00018 #include "boost/shared_ptr.hpp"
00019 
00020 #include "DataFormats/Provenance/interface/RunAuxiliary.h"
00021 #include "FWCore/Framework/interface/Principal.h"
00022 
00023 namespace edm {
00024 
00025   class HistoryAppender;
00026   class UnscheduledHandler;
00027 
00028   class RunPrincipal : public Principal {
00029   public:
00030     typedef RunAuxiliary Auxiliary;
00031     typedef Principal Base;
00032 
00033     RunPrincipal(
00034         boost::shared_ptr<RunAuxiliary> aux,
00035         boost::shared_ptr<ProductRegistry const> reg,
00036         ProcessConfiguration const& pc,
00037         HistoryAppender* historyAppender = 0);
00038     ~RunPrincipal() {}
00039 
00040     void fillRunPrincipal(DelayedReader* reader = 0);
00041 
00042     RunAuxiliary const& aux() const {
00043       return *aux_;
00044     }
00045 
00046     RunNumber_t run() const {
00047       return aux().run();
00048     }
00049 
00050     RunID const& id() const {
00051       return aux().id();
00052     }
00053 
00054     Timestamp const& beginTime() const {
00055       return aux().beginTime();
00056     }
00057 
00058     Timestamp const& endTime() const {
00059       return aux().endTime();
00060     }
00061 
00062     void setEndTime(Timestamp const& time) {
00063       aux_->setEndTime(time);
00064     }
00065 
00066     void mergeAuxiliary(RunAuxiliary const& aux) {
00067       return aux_->mergeAuxiliary(aux);
00068     }
00069 
00070     void setUnscheduledHandler(boost::shared_ptr<UnscheduledHandler>) {}
00071 
00072     void put(
00073         ConstBranchDescription const& bd,
00074         WrapperOwningHolder const& edp);
00075 
00076     void readImmediate() const;
00077 
00078   private:
00079 
00080     virtual bool unscheduledFill(std::string const&) const {return false;}
00081 
00082     void resolveProductImmediate(Group const& g) const;
00083 
00084     // A vector of groups.
00085     boost::shared_ptr<RunAuxiliary> aux_;
00086   };
00087 }
00088 #endif
00089