ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
MuonEtaPhiRIO_OnTrackErrorScalingKit Class Referenceabstract
Inheritance diagram for MuonEtaPhiRIO_OnTrackErrorScalingKit:
Collaboration diagram for MuonEtaPhiRIO_OnTrackErrorScalingKit:

Public Member Functions

 MuonEtaPhiRIO_OnTrackErrorScalingKit (const std::string &prefix)
 
 ~MuonEtaPhiRIO_OnTrackErrorScalingKit ()
 
 MuonEtaPhiRIO_OnTrackErrorScalingKit (const MuonEtaPhiRIO_OnTrackErrorScalingKit &)=delete
 
MuonEtaPhiRIO_OnTrackErrorScalingKitoperator= (const MuonEtaPhiRIO_OnTrackErrorScalingKit &)=delete
 
virtual unsigned int nParametres () const override
 
virtual const char *constparamNames () const override
 
virtual std::unique_ptr< RIO_OnTrackErrorScalingcreate () const override
 
virtual std::unique_ptr< RIO_OnTrackErrorScalingcreate () const =0
 
virtual size_t getParamIndex (const std::string &name) const
 

Private Attributes

char ** m_names
 

Detailed Description

Definition at line 8 of file RIO_OnTrackErrorScalingMuonKits.cxx.

Constructor & Destructor Documentation

◆ MuonEtaPhiRIO_OnTrackErrorScalingKit() [1/2]

MuonEtaPhiRIO_OnTrackErrorScalingKit::MuonEtaPhiRIO_OnTrackErrorScalingKit ( const std::string &  prefix)
inlineexplicit

Definition at line 12 of file RIO_OnTrackErrorScalingMuonKits.cxx.

12  {
13  // use C-style array of strings to satisfy the interface
15  for (unsigned int idx=0; idx< MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes; ++idx ) {
17  tmp.shrink_to_fit();
18  m_names[idx]=new char[ tmp.capacity() ];
19  strncpy( m_names[idx], tmp.c_str(), tmp.capacity() );
20  }
21  }

◆ ~MuonEtaPhiRIO_OnTrackErrorScalingKit()

MuonEtaPhiRIO_OnTrackErrorScalingKit::~MuonEtaPhiRIO_OnTrackErrorScalingKit ( )
inline

Definition at line 22 of file RIO_OnTrackErrorScalingMuonKits.cxx.

22  {
24  delete [] m_names[idx];
25  }
26  delete [] m_names;
27  }

◆ MuonEtaPhiRIO_OnTrackErrorScalingKit() [2/2]

MuonEtaPhiRIO_OnTrackErrorScalingKit::MuonEtaPhiRIO_OnTrackErrorScalingKit ( const MuonEtaPhiRIO_OnTrackErrorScalingKit )
delete

Member Function Documentation

◆ create() [1/2]

virtual std::unique_ptr<RIO_OnTrackErrorScaling> RIO_OnTrackErrorScalingKit::create ( ) const
pure virtualinherited

◆ create() [2/2]

virtual std::unique_ptr<RIO_OnTrackErrorScaling> RIO_OnTrackErrorScalingSpecialisedKit< MuonEtaPhiRIO_OnTrackErrorScaling >::create
inlineoverridevirtualinherited

Definition at line 27 of file RIO_OnTrackErrorScalingKit.h.

27  {
28  std::unique_ptr<RIO_OnTrackErrorScaling> error_scaling( new T);
29  error_scaling->params().resize(this->nParametres());
30  return error_scaling;
31  }

◆ getParamIndex()

size_t RIO_OnTrackErrorScalingKit::getParamIndex ( const std::string &  name) const
virtualinherited

Definition at line 6 of file RIO_OnTrackErrorScalingKit.cxx.

6  {
7  const char* const* param_names = paramNames();
8  for(size_t idx=0; idx<nParametres(); ++idx) {
9  if (strcmp(param_names[idx],name.c_str())==0) return idx;
10  }
11  std::stringstream message;
12  message << "RIO_OnTrackErrorScaling parameter " << name << " not found.";
13  throw std::runtime_error(message.str());
14  return nParametres();
15 }

◆ nParametres()

virtual unsigned int MuonEtaPhiRIO_OnTrackErrorScalingKit::nParametres ( ) const
inlineoverridevirtual

◆ operator=()

MuonEtaPhiRIO_OnTrackErrorScalingKit& MuonEtaPhiRIO_OnTrackErrorScalingKit::operator= ( const MuonEtaPhiRIO_OnTrackErrorScalingKit )
delete

◆ paramNames()

virtual const char* const* MuonEtaPhiRIO_OnTrackErrorScalingKit::paramNames ( ) const
inlineoverridevirtual

Implements RIO_OnTrackErrorScalingKit.

Definition at line 35 of file RIO_OnTrackErrorScalingMuonKits.cxx.

35  {
36  return m_names;
37  }

Member Data Documentation

◆ m_names

char** MuonEtaPhiRIO_OnTrackErrorScalingKit::m_names
private

Definition at line 39 of file RIO_OnTrackErrorScalingMuonKits.cxx.


The documentation for this class was generated from the following file:
RIO_OnTrackErrorScalingKit::nParametres
virtual unsigned int nParametres() const =0
CharPtr_t
char * CharPtr_t
Definition: RIO_OnTrackErrorScalingMuonKits.cxx:7
ReweightUtils.message
message
Definition: ReweightUtils.py:15
RIO_OnTrackErrorScalingKit::paramNames
virtual const char *const * paramNames() const =0
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes
@ kNParamTypes
Definition: MuonEtaPhiRIO_OnTrackErrorScaling.h:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonEtaPhiRIO_OnTrackErrorScaling::paramNames
static const char *const * paramNames()
Definition: MuonEtaPhiRIO_OnTrackErrorScaling.h:25
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
MuonEtaPhiRIO_OnTrackErrorScalingKit::m_names
char ** m_names
Definition: RIO_OnTrackErrorScalingMuonKits.cxx:39
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35