CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::Adjuster< T > Class Template Reference

#include <Adjuster.h>

Inheritance diagram for edm::Adjuster< T >:
edm::AdjusterBase

Public Member Functions

 Adjuster (InputTag const &tag, edm::ConsumesCollector &&iC, bool wrap)
 
virtual bool checkSignal (edm::Event const &event)
 
virtual void doOffset (int bunchspace, int bcr, const edm::EventPrincipal &, ModuleCallingContext const *, unsigned int EventNr, int vertexOffset)
 
virtual ~Adjuster ()
 
- Public Member Functions inherited from edm::AdjusterBase
virtual ~AdjusterBase ()
 

Private Attributes

InputTag tag_
 
EDGetTokenT< Ttoken_
 
bool WrapT_
 

Detailed Description

template<typename T>
class edm::Adjuster< T >

Definition at line 34 of file Adjuster.h.

Constructor & Destructor Documentation

template<typename T >
edm::Adjuster< T >::Adjuster ( InputTag const &  tag,
edm::ConsumesCollector &&  iC,
bool  wrap 
)

Definition at line 78 of file Adjuster.h.

References edm::InputTag::instance(), AlCaHLTBitMon_QueryRunRegistry::string, edm::Adjuster< T >::tag_, and edm::Adjuster< T >::WrapT_.

78  : tag_(tag), token_(iC.consumes<T>(tag)) {
79  if(wrapLongTimes) {
80  std::string Musearch = tag_.instance();
81  if(Musearch.find("Muon") == 0) WrapT_ = true; // wrap time for neutrons in Muon system subdetectors
82  }
83  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
bool WrapT_
Definition: Adjuster.h:52
EDGetTokenT< T > token_
Definition: Adjuster.h:53
long double T
std::string const & instance() const
Definition: InputTag.h:37
InputTag tag_
Definition: Adjuster.h:51
template<typename T >
virtual edm::Adjuster< T >::~Adjuster ( )
inlinevirtual

Definition at line 39 of file Adjuster.h.

References DigiHGCalTB160_cff::bunchspace, and edm::AdjusterBase::doOffset().

39 {}

Member Function Documentation

template<typename T >
virtual bool edm::Adjuster< T >::checkSignal ( edm::Event const &  event)
inlinevirtual

Implements edm::AdjusterBase.

Definition at line 43 of file Adjuster.h.

43  {
44  bool got = false;
45  edm::Handle<T> result_t;
46  got = event.getByToken(token_, result_t);
47  return got;
48  }
EDGetTokenT< T > token_
Definition: Adjuster.h:53
template<typename T >
void edm::Adjuster< T >::doOffset ( int  bunchspace,
int  bcr,
const edm::EventPrincipal ep,
ModuleCallingContext const *  mcc,
unsigned int  EventNr,
int  vertexOffset 
)
virtual

Implements edm::AdjusterBase.

Definition at line 69 of file Adjuster.h.

References edm::detail::doTheOffset().

69  {
70  std::shared_ptr<Wrapper<T> const> shPtr = getProductByTag<T>(ep, tag_, mcc);
71  if (shPtr) {
72  T& product = const_cast<T&>(*shPtr->product());
73  detail::doTheOffset(bunchspace, bcr, product, eventNr, vertexOffset, WrapT_);
74  }
75  }
void doTheOffset(int bunchSpace, int bcr, std::vector< SimTrack > &simtracks, unsigned int evtNr, int vertexOffset, bool wrap)
Definition: Adjuster.cc:7
bunchspace
in terms of 25 ns
bool WrapT_
Definition: Adjuster.h:52
long double T
InputTag tag_
Definition: Adjuster.h:51

Member Data Documentation

template<typename T >
InputTag edm::Adjuster< T >::tag_
private

Definition at line 51 of file Adjuster.h.

Referenced by edm::Adjuster< T >::Adjuster().

template<typename T >
EDGetTokenT<T> edm::Adjuster< T >::token_
private

Definition at line 53 of file Adjuster.h.

template<typename T >
bool edm::Adjuster< T >::WrapT_
private

Definition at line 52 of file Adjuster.h.

Referenced by edm::Adjuster< T >::Adjuster().