CMS 3D CMS Logo

LuminosityBlockBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Common_LuminosityBlockBase_h
2 #define FWCore_Common_LuminosityBlockBase_h
3 
4 // -*- C++ -*-
5 //
6 // Package: FWCore/Common
7 // Class : LuminosityBlockBase
8 //
19 //
20 // Original Author: Eric Vaandering
21 // Created: Tue Jan 12 15:31:00 CDT 2010
22 //
23 
31 
32 namespace edm {
33 
35  public:
37  virtual ~LuminosityBlockBase();
38 
39  // AUX functions.
41 
42  RunNumber_t run() const { return luminosityBlockAuxiliary().run(); }
43 
45 
46  Timestamp const& beginTime() const { return luminosityBlockAuxiliary().beginTime(); }
47  Timestamp const& endTime() const { return luminosityBlockAuxiliary().endTime(); }
48 
50 
52  template <typename PROD>
53  bool getByLabel(InputTag const& tag, Handle<PROD>& result) const;
54 
55  private:
56  virtual BasicHandle getByLabelImpl(std::type_info const& iWrapperType,
57  std::type_info const& iProductType,
58  const InputTag& iTag) const = 0;
59  };
60 
61  template <class T>
63  result.clear();
64  BasicHandle bh = this->getByLabelImpl(typeid(Wrapper<T>), typeid(T), tag);
65  result = convert_handle<T>(std::move(bh));
66  if (result.failedToGet()) {
67  return false;
68  }
69  return true;
70  }
71 
72 } // namespace edm
73 #endif
LuminosityBlockID id() const
virtual BasicHandle getByLabelImpl(std::type_info const &iWrapperType, std::type_info const &iProductType, const InputTag &iTag) const =0
virtual edm::LuminosityBlockAuxiliary const & luminosityBlockAuxiliary() const =0
Timestamp const & beginTime() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
same as above, but using the InputTag class
unsigned int LuminosityBlockNumber_t
LuminosityBlockNumber_t luminosityBlock() const
Timestamp const & endTime() const
RunNumber_t run() const
Timestamp const & endTime() const
Timestamp const & beginTime() const
LuminosityBlockNumber_t luminosityBlock() const
bool failedToGet() const
Definition: HandleBase.h:78
HLT enums.
unsigned int RunNumber_t
long double T
def move(src, dest)
Definition: eostools.py:511
LuminosityBlockID const & id() const