test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
edm::ESWatcher< T > Class Template Reference

#include <ESWatcher.h>

Classes

struct  NullFunction
 

Public Member Functions

bool check (const edm::EventSetup &iSetup)
 
 ESWatcher ()
 
template<class TFunc >
 ESWatcher (TFunc iFunctor)
 
template<class TObj , class TMemFunc >
 ESWatcher (TObj const &iObj, TMemFunc iFunc)
 

Private Member Functions

 ESWatcher (const ESWatcher &)
 
const ESWatcheroperator= (const ESWatcher &)
 

Private Attributes

unsigned long long cacheId_
 
std::function< void(const T &)> callback_
 

Detailed Description

template<class T>
class edm::ESWatcher< T >

Definition at line 31 of file ESWatcher.h.

Constructor & Destructor Documentation

template<class T>
edm::ESWatcher< T >::ESWatcher ( )
inline

Definition at line 40 of file ESWatcher.h.

40 :callback_(NullFunction()), cacheId_(0) {}
unsigned long long cacheId_
Definition: ESWatcher.h:73
std::function< void(const T &)> callback_
Definition: ESWatcher.h:72
template<class T>
template<class TFunc >
edm::ESWatcher< T >::ESWatcher ( TFunc  iFunctor)
inline

Definition at line 43 of file ESWatcher.h.

43 :callback_(iFunctor),cacheId_(0) {}
unsigned long long cacheId_
Definition: ESWatcher.h:73
std::function< void(const T &)> callback_
Definition: ESWatcher.h:72
template<class T>
template<class TObj , class TMemFunc >
edm::ESWatcher< T >::ESWatcher ( TObj const &  iObj,
TMemFunc  iFunc 
)
inline

Definition at line 46 of file ESWatcher.h.

46  :
47  callback_(std::bind(iFunc,iObj,std::placeholders::_1)),
48  cacheId_(0)
49  {}
unsigned long long cacheId_
Definition: ESWatcher.h:73
std::function< void(const T &)> callback_
Definition: ESWatcher.h:72
template<class T>
edm::ESWatcher< T >::ESWatcher ( const ESWatcher< T > &  )
private

Member Function Documentation

template<class T>
bool edm::ESWatcher< T >::check ( const edm::EventSetup iSetup)
inline

Definition at line 57 of file ESWatcher.h.

Referenced by BTagPerformaceRootProducerFromSQLITE::analyze(), DisplayGeom::analyze(), DummyEvelyser::analyze(), GeometryInfoModule::analyze(), RPCUnpackingModule::beginRun(), AlCaRecoTriggerBitsRcdRead::beginRun(), FWFFLooper::beginRun(), APVCyclePhaseProducerFromL1TS::beginRun(), SeedingLayerSetsBuilder::check(), SiStripBackplaneCalibration::checkBackPlaneCorrectionInput(), SiStripLorentzAngleCalibration::checkLorentzAngleInput(), SiPixelLorentzAngleCalibration::checkLorentzAngleInput(), RPCMonitorLinkSynchro::dqmBeginRun(), FWFFLooper::duringLoop(), HLTLevel1Pattern::filter(), TriggerResultsFilterFromDB::filter(), HLTHighLevel::filter(), CosmicLayerTriplets::init(), RunManager::initG4(), PixelUnpackingRegions::initialize(), CSCConditions::initializeEvent(), TriggerHelper::initRun(), GenericTriggerEventFlag::initRun(), CaloTowersCreator::produce(), JetTagProducer::produce(), RPCPackingModule::produce(), SiPixelDigiToRaw::produce(), SiPixelRawToDigi::produce(), TotemRPLocalTrackFitter::produce(), TotemRPUVPatternFinder::produce(), EcalRawToDigi::produce(), NuclearInteractionEDProducer::produce(), HiEvtPlaneFlatProducer::produce(), EvtPlaneProducer::produce(), OscarMTMasterThread::readES(), AlignmentProducer::readInSurveyRcds(), MuonCkfTrajectoryBuilder::setEvent_(), BetafuncEvtVtxGenerator::update(), and edm::BMixingModule::update().

57  {
58  const T& record = iSetup.template get<T>();
59  bool result = cacheId_ != record.cacheIdentifier();
60  if(result) {
61  callback_(record);
62  }
63  cacheId_ = record.cacheIdentifier();
64  return result;
65  }
JetCorrectorParameters::Record record
Definition: classes.h:7
tuple result
Definition: mps_fire.py:83
unsigned long long cacheId_
Definition: ESWatcher.h:73
std::function< void(const T &)> callback_
Definition: ESWatcher.h:72
long double T
template<class T>
const ESWatcher& edm::ESWatcher< T >::operator= ( const ESWatcher< T > &  )
private

Member Data Documentation

template<class T>
unsigned long long edm::ESWatcher< T >::cacheId_
private

Definition at line 73 of file ESWatcher.h.

Referenced by edm::ESWatcher< JetTagComputerRecord >::check().

template<class T>
std::function<void (const T&)> edm::ESWatcher< T >::callback_
private

Definition at line 72 of file ESWatcher.h.

Referenced by edm::ESWatcher< JetTagComputerRecord >::check().