CMS 3D CMS Logo

MVAComputerCache.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_MVAComputer_MVAComputerCache_h
2 #define PhysicsTools_MVAComputer_MVAComputerCache_h
3 // -*- C++ -*-
4 //
5 // Package: MVAComputerCache
6 // Class : MVAComputerCache
7 //
8 
9 //
10 // Author: Christophe Saout <christophe.saout@cern.ch>
11 // Created: Sat Feb 23 15:38 CEST 2007
12 //
13 
14 #include <memory>
15 
18 
19 namespace PhysicsTools {
20 
27  public:
30 
32  bool update(const Calibration::MVAComputerContainer *container, const char *calib);
33 
34  operator bool() const { return computer.get(); }
35 
36  MVAComputer &operator*() { return *computer; }
37  const MVAComputer &operator*() const { return *computer; }
38 
39  MVAComputer *operator->() { return computer.get(); }
40  const MVAComputer *operator->() const { return computer.get(); }
41 
42  MVAComputer *get() { return computer.get(); }
43  const MVAComputer *get() const { return computer.get(); }
44 
45  std::unique_ptr<MVAComputer> release();
46 
47  void reset() { computer.reset(); }
48 
49  private:
52  std::unique_ptr<MVAComputer> computer;
53  };
54 
55 } // namespace PhysicsTools
56 
57 #endif // PhysicsTools_MVAComputer_MVAComputerCache_h
const MVAComputer & operator*() const
Calibration::MVAComputer::CacheId computerCacheId
const MVAComputer * operator->() const
Calibration::MVAComputerContainer::CacheId containerCacheId
std::unique_ptr< MVAComputer > release()
Main interface class to the generic discriminator computer framework.
Definition: MVAComputer.h:39
std::unique_ptr< MVAComputer > computer
bool update(const Calibration::MVAComputer *computer)
Creates and and MVAComputer from calibrations via EventSetup.