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)
 
bool checkSignal (edm::Event const &event) override
 
void doOffset (int bunchspace, int bcr, const edm::EventPrincipal &, ModuleCallingContext const *, unsigned int EventNr, int vertexOffset) override
 
 ~Adjuster () override
 
- Public Member Functions inherited from edm::AdjusterBase
virtual ~AdjusterBase ()
 

Private Attributes

InputTag tag_
 
EDGetTokenT< Ttoken_
 
bool WrapT_ = false
 

Detailed Description

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

Definition at line 39 of file Adjuster.h.

Constructor & Destructor Documentation

◆ Adjuster()

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

Definition at line 113 of file Adjuster.h.

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

114  : tag_(tag), token_(iC.consumes<T>(tag)) {
115  if (wrapLongTimes) {
116  std::string Musearch = tag_.instance();
117  if (Musearch.find("Muon") == 0)
118  WrapT_ = true; // wrap time for neutrons in Muon system subdetectors
119  }
120  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::string const & instance() const
Definition: InputTag.h:37
bool WrapT_
Definition: Adjuster.h:61
EDGetTokenT< T > token_
Definition: Adjuster.h:62
long double T
InputTag tag_
Definition: Adjuster.h:60

◆ ~Adjuster()

template<typename T >
edm::Adjuster< T >::~Adjuster ( )
inlineoverride

Definition at line 43 of file Adjuster.h.

43 {}

Member Function Documentation

◆ checkSignal()

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

Implements edm::AdjusterBase.

Definition at line 52 of file Adjuster.h.

References edm::Adjuster< T >::token_.

52  {
53  bool got = false;
55  got = event.getByToken(token_, result_t);
56  return got;
57  }
EDGetTokenT< T > token_
Definition: Adjuster.h:62
ap_fixed< 16, 8 > result_t

◆ doOffset()

template<typename T >
void edm::Adjuster< T >::doOffset ( int  bunchspace,
int  bcr,
const edm::EventPrincipal ep,
ModuleCallingContext const *  mcc,
unsigned int  EventNr,
int  vertexOffset 
)
overridevirtual

Implements edm::AdjusterBase.

Definition at line 99 of file Adjuster.h.

References MixingModule_cfi::bunchspace, edm::detail::doTheOffset(), and SiStripBadComponentsDQMServiceTemplate_cfg::ep.

104  {
105  std::shared_ptr<Wrapper<T> const> shPtr = getProductByTag<T>(ep, tag_, mcc);
106  if (shPtr) {
107  T& product = const_cast<T&>(*shPtr->product());
108  detail::doTheOffset(bunchspace, bcr, product, eventNr, vertexOffset, WrapT_);
109  }
110  }
void doTheOffset(int bunchSpace, int bcr, std::vector< SimTrack > &simtracks, unsigned int evtNr, int vertexOffset, bool wrap)
Definition: Adjuster.cc:7
bool WrapT_
Definition: Adjuster.h:61
long double T
InputTag tag_
Definition: Adjuster.h:60

Member Data Documentation

◆ tag_

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

Definition at line 60 of file Adjuster.h.

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

◆ token_

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

Definition at line 62 of file Adjuster.h.

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

◆ WrapT_

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

Definition at line 61 of file Adjuster.h.

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