Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Documentation
CodingRules
ExampleClass.cc
Go to the documentation of this file.
1
//#include "Utilities/Configuration/interface/Architecture.h"
2
3
/* \file ExampleClass.cc
4
*
5
* $Date: 2005/07/26 10:13:49 $
6
* $Revision: 1.1 $
7
* \author W. Woodpecker - CERN
8
*/
9
10
//#include "Subsystem/Package/interface/ExampleClass.h"
11
//#include "Subsystem/Package/interface/SomeAlgorithm.h"
12
13
using namespace
std;
14
15
#include "
ExampleClass.h
"
16
class
SomeAlgorithm
{
17
public
:
SomeAlgorithm
(){};
18
};
19
20
21
22
// Constructor
23
ExampleClass::ExampleClass
() :
24
theCount(0),
25
theAlgo(new
SomeAlgorithm
())
26
{}
27
28
// Destructor
29
ExampleClass::~ExampleClass
(){
30
delete
theAlgo
;
31
}
32
33
34
// A simple setter
35
void
ExampleClass::setCount
(
int
ticks
){
36
theCount
=
ticks
;
37
}
38
39
40
// A simple getter
41
int
ExampleClass::count
()
const
{
42
return
theCount
;
43
}
44
45
46
47
// Another setter
48
void
ExampleClass::setValues
(
const
vector<float>&
entries
) {
49
theValues
=
entries
;
50
}
51
52
53
// A getter returning a const reference
54
const
vector<float>&
ExampleClass::values
()
const
{
55
return
theValues
;
56
}
57
58
59
60
// A member function
61
float
ExampleClass::computeMean
()
const
{
62
float
result
= 1.;
63
//... do all necessary computations...
64
return
result
;
65
}
66
ExampleClass::setValues
void setValues(const std::vector< float > &entries)
Another setter.
Definition:
ExampleClass.cc:48
ExampleClass::computeMean
float computeMean() const
A member function.
Definition:
ExampleClass.cc:61
ExampleClass::theValues
std::vector< float > theValues
Definition:
ExampleClass.h:49
ExampleClass::count
int count() const
A simple getter.
Definition:
ExampleClass.cc:41
ExampleClass::theCount
int theCount
Definition:
ExampleClass.h:48
python.tagInventory.entries
list entries
Definition:
tagInventory.py:532
ExampleClass::ExampleClass
ExampleClass()
Constructor.
Definition:
ExampleClass.cc:23
ExampleClass::values
const std::vector< float > & values() const
A getter returning a const reference.
Definition:
ExampleClass.cc:54
ExampleClass::theAlgo
SomeAlgorithm * theAlgo
Definition:
ExampleClass.h:50
ExampleClass.h
prof2calltree.ticks
tuple ticks
Definition:
prof2calltree.py:120
query.result
tuple result
Definition:
query.py:137
ExampleClass::setCount
void setCount(int ticks)
A simple setter.
Definition:
ExampleClass.cc:35
SomeAlgorithm::SomeAlgorithm
SomeAlgorithm()
Definition:
ExampleClass.cc:17
ExampleClass::~ExampleClass
virtual ~ExampleClass()
Virtual Destructor.
Definition:
ExampleClass.cc:29
SomeAlgorithm
Definition:
ExampleClass.cc:16
Generated for CMSSW Reference Manual by
1.8.5