CMS 3D CMS Logo

Public Member Functions | Private Attributes

PhysicsTools::MVAComputerCache Class Reference

Creates and and MVAComputer from calibrations via EventSetup. More...

#include <MVAComputerCache.h>

List of all members.

Public Member Functions

MVAComputerget ()
const MVAComputerget () const
 MVAComputerCache ()
 operator bool () const
MVAComputeroperator* ()
const MVAComputeroperator* () const
const MVAComputeroperator-> () const
MVAComputeroperator-> ()
std::auto_ptr< MVAComputerrelease ()
void reset ()
bool update (const Calibration::MVAComputer *computer)
template<class T >
bool update (const char *label, const edm::EventSetup &es, const char *calib)
template<class T >
bool update (const edm::EventSetup &es, const char *calib)
template<class T >
bool update (const char *label, const edm::EventSetup &es)
template<class T >
bool update (const edm::EventSetup &es)
bool update (const Calibration::MVAComputerContainer *container, const char *calib)
 ~MVAComputerCache ()

Private Attributes

std::auto_ptr< MVAComputercomputer
Calibration::MVAComputer::CacheId computerCacheId
Calibration::MVAComputerContainer::CacheId containerCacheId

Detailed Description

Creates and and MVAComputer from calibrations via EventSetup.

Definition at line 29 of file MVAComputerCache.h.


Constructor & Destructor Documentation

PhysicsTools::MVAComputerCache::MVAComputerCache ( )
PhysicsTools::MVAComputerCache::~MVAComputerCache ( )

Definition at line 15 of file MVAComputerCache.cc.

{
}

Member Function Documentation

MVAComputer* PhysicsTools::MVAComputerCache::get ( void  ) [inline]

Definition at line 79 of file MVAComputerCache.h.

Referenced by reco::tau::RecoTauMVAHelper::setEvent().

{ return computer.get(); }
const MVAComputer* PhysicsTools::MVAComputerCache::get ( void  ) const [inline]

Definition at line 80 of file MVAComputerCache.h.

{ return computer.get(); }
PhysicsTools::MVAComputerCache::operator bool ( ) const [inline]

Definition at line 71 of file MVAComputerCache.h.

{ return computer.get(); }
MVAComputer& PhysicsTools::MVAComputerCache::operator* ( void  ) [inline]

Definition at line 73 of file MVAComputerCache.h.

References computer.

{ return *computer; }
const MVAComputer& PhysicsTools::MVAComputerCache::operator* ( void  ) const [inline]

Definition at line 74 of file MVAComputerCache.h.

References computer.

{ return *computer; }
MVAComputer* PhysicsTools::MVAComputerCache::operator-> ( ) [inline]

Definition at line 76 of file MVAComputerCache.h.

{ return computer.get(); }
const MVAComputer* PhysicsTools::MVAComputerCache::operator-> ( ) const [inline]

Definition at line 77 of file MVAComputerCache.h.

{ return computer.get(); }
std::auto_ptr< MVAComputer > PhysicsTools::MVAComputerCache::release ( )
void PhysicsTools::MVAComputerCache::reset ( void  ) [inline]

Definition at line 84 of file MVAComputerCache.h.

{ computer.reset(); }
template<class T >
bool PhysicsTools::MVAComputerCache::update ( const edm::EventSetup es) [inline]
bool PhysicsTools::MVAComputerCache::update ( const Calibration::MVAComputerContainer container,
const char *  calib 
)

Definition at line 38 of file MVAComputerCache.cc.

References PhysicsTools::Calibration::MVAComputerContainer::changed(), computer, computerCacheId, containerCacheId, PhysicsTools::Calibration::MVAComputerContainer::find(), PhysicsTools::Calibration::MVAComputerContainer::getCacheId(), query::result, and update().

{
        if (!container && !*this)
                return false;
        if (container && !container->changed(containerCacheId))
                return false;

        if (container) {
                const Calibration::MVAComputer *computer =
                                                &container->find(calib);
                bool result = update(computer);
                containerCacheId = container->getCacheId();
                return result;
        }

        this->computer.reset();

        computerCacheId = Calibration::MVAComputer::CacheId();
        containerCacheId = Calibration::MVAComputerContainer::CacheId();
        return true;
}
template<class T >
bool PhysicsTools::MVAComputerCache::update ( const char *  label,
const edm::EventSetup es,
const char *  calib 
) [inline]
bool PhysicsTools::MVAComputerCache::update ( const Calibration::MVAComputer computer)
template<class T >
bool PhysicsTools::MVAComputerCache::update ( const edm::EventSetup es,
const char *  calib 
) [inline]
template<class T >
bool PhysicsTools::MVAComputerCache::update ( const char *  label,
const edm::EventSetup es 
) [inline]

Member Data Documentation

Definition at line 89 of file MVAComputerCache.h.

Referenced by PFTauMVADiscriminator::discriminate(), operator*(), release(), and update().

Definition at line 88 of file MVAComputerCache.h.

Referenced by release(), and update().

Definition at line 87 of file MVAComputerCache.h.

Referenced by release(), and update().