ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArSamplesMon
src
GraphShape.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArSamplesMon/GraphShape.h
"
6
#include <algorithm>
7
8
using namespace
LArSamples
;
9
10
11
GraphShape::GraphShape
(
const
std::vector<double>& times,
const
std::vector<double>&
values
,
12
const
std::vector<double>& errors)
13
{
14
for
(
unsigned
int
k = 0; k < times.size(); k++)
15
m_points
.emplace_back(times[k],
values
[k], errors[k]);
16
}
17
18
19
GraphShape::GraphShape
(
const
AbsShape
& shape,
double
scale,
double
shift)
20
{
21
for
(
unsigned
int
k = 0; k < shape.
nPoints
(); k++)
22
m_points
.emplace_back(shape.
time
(k) + shift, shape.
value
(k)*scale, shape.
error
(k)*scale);
23
}
24
25
26
bool
GraphShape::add
(
const
AbsShape
& other)
27
{
28
for
(
unsigned
int
k = 0; k < other.nPoints(); k++)
29
m_points
.emplace_back(other.time(k), other.value(k), other.error(k));
30
31
std::sort
(
m_points
.begin(),
m_points
.end());
32
return
true
;
33
}
GraphShape.h
LArSamples::AbsShape::nPoints
virtual unsigned int nPoints() const =0
LArSamples::AbsShape::time
virtual double time(unsigned int i) const =0
LArSamples::AbsShape::values
TVectorD values(int lwb, int upb) const
Definition
AbsShape.cxx:135
LArSamples::AbsShape::AbsShape
AbsShape()
Definition
AbsShape.h:72
LArSamples::AbsShape::error
virtual double error(unsigned int i) const
Definition
AbsShape.cxx:24
LArSamples::AbsShape::value
virtual double value(unsigned int i) const =0
LArSamples::GraphShape::add
bool add(const AbsShape &other)
Definition
GraphShape.cxx:26
LArSamples::GraphShape::GraphShape
GraphShape(const std::vector< double > ×, const std::vector< double > &values, const std::vector< double > &errors)
Constructor.
Definition
GraphShape.cxx:11
LArSamples::GraphShape::m_points
std::vector< GraphPoint > m_points
Definition
GraphShape.h:57
LArSamples
Definition
AbsShape.h:24
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition
DVL_algorithms.h:554
Generated on
for ATLAS Offline Software by
1.17.0