CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
npstat::StorableMultivariateFunctor Class Referenceabstract

#include <StorableMultivariateFunctor.h>

Inheritance diagram for npstat::StorableMultivariateFunctor:
npstat::AbsMultivariateFunctor npstat::StorableHistoNDFunctor< Numeric, Axis, Converter > npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >

Public Member Functions

virtual gs::ClassId classId () const =0
 
const std::string & description () const
 
bool operator!= (const StorableMultivariateFunctor &r) const
 
bool operator== (const StorableMultivariateFunctor &r) const
 
void setDescription (const std::string &newDescription)
 
 StorableMultivariateFunctor ()
 
 StorableMultivariateFunctor (const std::string &descr)
 
void validateDescription (const std::string &description) const
 
virtual bool write (std::ostream &of) const =0
 
 ~StorableMultivariateFunctor () override
 
- Public Member Functions inherited from npstat::AbsMultivariateFunctor
virtual unsigned maxDim () const
 
virtual unsigned minDim () const =0
 
virtual double operator() (const double *point, unsigned dim) const =0
 
virtual ~AbsMultivariateFunctor ()
 

Static Public Member Functions

static const char * classname ()
 
static StorableMultivariateFunctorread (const gs::ClassId &id, std::istream &in)
 
static unsigned version ()
 

Protected Member Functions

virtual bool isEqual (const StorableMultivariateFunctor &) const =0
 

Private Attributes

std::string description_
 

Detailed Description

Base class for storable multivariate functors

Definition at line 23 of file StorableMultivariateFunctor.h.

Constructor & Destructor Documentation

◆ StorableMultivariateFunctor() [1/2]

npstat::StorableMultivariateFunctor::StorableMultivariateFunctor ( )
inline

Definition at line 25 of file StorableMultivariateFunctor.h.

25 {}

◆ StorableMultivariateFunctor() [2/2]

npstat::StorableMultivariateFunctor::StorableMultivariateFunctor ( const std::string &  descr)
inlineexplicit

Functor description can be an arbitrary string

Definition at line 28 of file StorableMultivariateFunctor.h.

29  : AbsMultivariateFunctor(), description_(descr) {}

◆ ~StorableMultivariateFunctor()

npstat::StorableMultivariateFunctor::~StorableMultivariateFunctor ( )
inlineoverride

Definition at line 31 of file StorableMultivariateFunctor.h.

31 {}

Member Function Documentation

◆ classId()

virtual gs::ClassId npstat::StorableMultivariateFunctor::classId ( ) const
pure virtual

◆ classname()

static const char* npstat::StorableMultivariateFunctor::classname ( )
inlinestatic

Definition at line 63 of file StorableMultivariateFunctor.h.

63 { return "npstat::StorableMultivariateFunctor"; }

◆ description()

const std::string& npstat::StorableMultivariateFunctor::description ( ) const
inline

◆ isEqual()

virtual bool npstat::StorableMultivariateFunctor::isEqual ( const StorableMultivariateFunctor ) const
protectedpure virtual

Method needed to compare objects for equality. Must be overriden by derived classes. It is left up to the derived classes to decide whether they should compare description strings in order to establish equality.

Implemented in npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >, and npstat::StorableHistoNDFunctor< Numeric, Axis, Converter >.

Referenced by operator==().

◆ operator!=()

bool npstat::StorableMultivariateFunctor::operator!= ( const StorableMultivariateFunctor r) const
inline

Definition at line 53 of file StorableMultivariateFunctor.h.

53 { return !(*this == r); }

References alignCSCRings::r.

◆ operator==()

bool npstat::StorableMultivariateFunctor::operator== ( const StorableMultivariateFunctor r) const
inline

Do not override comparison operators in the derived classes, override the method "isEqual" instead.

Definition at line 50 of file StorableMultivariateFunctor.h.

50  {
51  return (typeid(*this) == typeid(r)) && this->isEqual(r);
52  }

References isEqual(), and alignCSCRings::r.

◆ read()

StorableMultivariateFunctor * npstat::StorableMultivariateFunctor::read ( const gs::ClassId &  id,
std::istream &  in 
)
static

Definition at line 19 of file StorableMultivariateFunctor.cc.

19  {
21  }

References recoMuon::in, and instance.

Referenced by edmIntegrityCheck.PublishToFileSystem::get().

◆ setDescription()

void npstat::StorableMultivariateFunctor::setDescription ( const std::string &  newDescription)
inline

Change the functor description

Definition at line 37 of file StorableMultivariateFunctor.h.

37 { description_ = newDescription; }

References description_.

◆ validateDescription()

void npstat::StorableMultivariateFunctor::validateDescription ( const std::string &  description) const

This method will throw npstat::NpstatRuntimeError in case functor description is different from the provided argument

Definition at line 6 of file StorableMultivariateFunctor.cc.

6  {
7  if (description_ != description) {
8  std::string mesage =
9  "In StorableMultivariateFunctor::validateDescription: "
10  "argument description string \"";
11  mesage += description;
12  mesage += "\" is different from the object description string \"";
13  mesage += description_;
14  mesage += "\"";
15  throw npstat::NpstatRuntimeError(mesage);
16  }
17  }

References description(), description_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ version()

static unsigned npstat::StorableMultivariateFunctor::version ( )
inlinestatic

Definition at line 64 of file StorableMultivariateFunctor.h.

64 { return 1; }

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

◆ write()

virtual bool npstat::StorableMultivariateFunctor::write ( std::ostream &  of) const
pure virtual

Member Data Documentation

◆ description_

std::string npstat::StorableMultivariateFunctor::description_
private

Definition at line 78 of file StorableMultivariateFunctor.h.

Referenced by description(), setDescription(), and validateDescription().

npstat::StorableMultivariateFunctor::description
const std::string & description() const
Definition: StorableMultivariateFunctor.h:34
npstat::NpstatRuntimeError
Definition: NpstatException.h:46
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
recoMuon::in
Definition: RecoMuonEnumerators.h:6
npstat::StorableMultivariateFunctor::isEqual
virtual bool isEqual(const StorableMultivariateFunctor &) const =0
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
alignCSCRings.r
r
Definition: alignCSCRings.py:93
npstat::StorableMultivariateFunctor::description_
std::string description_
Definition: StorableMultivariateFunctor.h:78