xc
CombinationFactors.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. Pérez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //CombinationFactors.hxx
22 //Combination factors for an action.
23 
24 #ifndef COMBINATIONFACTORS_H
25 #define COMBINATIONFACTORS_H
26 
27 #include "utility/kernel/CommandEntity.h"
28 
29 namespace cmb_acc{
30 
32 //
35  {
36  private:
37  float psi_0;
38  float psi_1;
39  float psi_2;
40  public:
42  CombinationFactors(const float &p0= 1.0, const float &p1= 1.0, const float &p2= 1.0)
43  : CommandEntity(),psi_0(p0), psi_1(p1), psi_2(p2) {}
45  const float &getCombinationFactor(short int r) const;
46  void Print(std::ostream &os) const;
47  };
48 
49  inline std::ostream &operator<<(std::ostream &os, const CombinationFactors &cf)
50  {
51  cf.Print(os);
52  return os;
53  }
54 
55 } //fin namespace nmb_acc.
56 
57 #endif
Routines to generate combinations of actions.
Objet that can execute python scripts.
Definition: CommandEntity.h:40
const float & getCombinationFactor(short int r) const
Copy constructor.
Definition: CombinationFactors.cc:26
CombinationFactors(const float &p0=1.0, const float &p1=1.0, const float &p2=1.0)
Default constructor.
Definition: CombinationFactors.h:42
Coeficientes de simultaneidad de una acción.
Definition: CombinationFactors.h:34
void Print(std::ostream &os) const
Print stuff.
Definition: CombinationFactors.cc:45