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.

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  }

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

◆ ~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.

52  {
53  bool got = false;
54  edm::Handle<T> result_t;
55  got = event.getByToken(token_, result_t);
56  return got;
57  }

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

◆ 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.

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  }

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

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().

edm::InputTag::instance
std::string const & instance() const
Definition: InputTag.h:37
edm::Handle
Definition: AssociativeIterator.h:50
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
edm::Adjuster::tag_
InputTag tag_
Definition: Adjuster.h:60
edm::detail::doTheOffset
void doTheOffset(int bunchSpace, int bcr, std::vector< SimTrack > &simtracks, unsigned int evtNr, int vertexOffset, bool wrap)
Definition: Adjuster.cc:7
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::Adjuster::token_
EDGetTokenT< T > token_
Definition: Adjuster.h:62
MixingModule_cfi.bunchspace
bunchspace
Definition: MixingModule_cfi.py:41
T
long double T
Definition: Basic3DVectorLD.h:48
edm::Adjuster::WrapT_
bool WrapT_
Definition: Adjuster.h:61
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86