CLASS  5.1
Fuel Cycle Simulator
CLASSBackEnd.hxx
Go to the documentation of this file.
1 #ifndef _CLASSBACKEND_
2 #define _CLASSBACKEND_
3 
4 #include <string>
5 #include <fstream>
6 #include <map>
7 
8 #include "CLASSFacility.hxx"
9 #include "IsotopicVector.hxx"
10 #include "DecayDataBank.hxx"
11 
12 #include "TNamed.h"
13 
14 //________________________________________________________________________
16 
23 //________________________________________________________________________
24 
25 
27 {
28 public :
29  //{
31 
37  CLASSBackEnd ( int type = 0 );
38  //}
39 
40  //{
42 
49  CLASSBackEnd ( CLASSLogger* log , int type = 0 );
50  //}
51 
52  //{
54 
60  CLASSBackEnd ( CLASSLogger* log , cSecond cycletime, int type = 0 );
61  //}
63 
64  //********* Get Method *********//
69 
70  std::vector<IsotopicVector> GetIVArray () const;
71  std::vector<cSecond> GetIVArrayArrivalTime () const;
72 
73  int GetIVNumber () const;
74  bool GetStorageType () const;
75  IsotopicVector GetIV ( int i ) const;
76 
77 #ifndef __ROOTCLING__
80  virtual std::map<cSecond, int> GetTheBackEndTimePath();
81 #endif
82 
84 
85  //********* Set Method *********//
90  void SetIsStorageType ( bool val = true );
91  virtual void SetIVArray ( std::vector< IsotopicVector > const& ivarray );
92  void SetIVArrayArrivalTime ( std::vector< cSecond > const& IVArrayArrivalTime);
93 
94 
95 #ifndef __ROOTCLING__
96  void SetDecayDataBank ( DecayDataBank* decayDB );
97  virtual void SetOutBackEndFacility ( CLASSBackEnd* befacility );
98 #endif
99 
100  using CLASSFacility::SetName;
101 
103 
104 
109  virtual void ApplyZAIThreshold ( int z = 90 );
110  virtual void AddIV ( IsotopicVector isotopicvector );
111 
112  void ClearIVArray ();
113 
115  virtual void Evolution ( cSecond t ) {}
116 
117  void UpdateInsideIV ();
118 
119 protected :
120  IsotopicVector GetDecay ( IsotopicVector const& isotopicvector , cSecond t );
121 
122  //********* Internal Parameter *********//
123  std::vector<IsotopicVector> fIVArray;
124  std::vector<cSecond> fIVArrayArrivalTime;
125 
126 #ifndef __ROOTCLING__
128 #endif
129 
130 private :
131  bool fIsStorageType;
132 
133 #ifndef __ROOTCLING__
134  DecayDataBank* fDecayDataBase;
135 #endif
136 
137  ClassDef(CLASSBackEnd, 2);
138 };
139 
140 
142 inline std::vector<IsotopicVector> CLASSBackEnd::GetIVArray () const { return fIVArray; }
143 inline std::vector<cSecond> CLASSBackEnd::GetIVArrayArrivalTime () const { return fIVArrayArrivalTime; }
144 inline int CLASSBackEnd::GetIVNumber () const { return fIVArray.size(); }
145 inline bool CLASSBackEnd::GetStorageType () const { return fIsStorageType; }
146 inline IsotopicVector CLASSBackEnd::GetIV ( int i ) const
147 {
148  if ( i < (int)fIVArray.size() ) { return fIVArray[i]; }
149  else { return IsotopicVector(); }
150 }
151 
152 #ifndef __ROOTCLING__
153 inline DecayDataBank* CLASSBackEnd::GetDecayDataBank () { return fDecayDataBase; }
155 #endif
156 
157 inline void CLASSBackEnd::SetIsStorageType ( bool val ) { fIsStorageType = val; }
158 inline void CLASSBackEnd::SetIVArrayArrivalTime ( std::vector< cSecond > const& IVArrayArrivalTime) { fIVArrayArrivalTime = IVArrayArrivalTime; }
159 inline void CLASSBackEnd::SetIVArray ( std::vector< IsotopicVector > const& ivarray ) { fIVArray = ivarray; }
160 
161 #ifndef __ROOTCLING__
163 { fDecayDataBase = decayDB; }
165 { fOutBackEndFacility = befacility; fIsStorageType = false; }
166 #endif
167 
168 #endif
169 
void SetIVArrayArrivalTime(std::vector< cSecond > const &IVArrayArrivalTime)
Set Arrival Time in Back end.
Definition: CLASSBackEnd.hxx:158
virtual void ApplyZAIThreshold(int z=90)
Put all nuclei below the threshold in -2 -2 -2 ZAI...
Definition: CLASSBackEnd.cxx:85
void UpdateInsideIV()
Definition: CLASSBackEnd.cxx:53
IsotopicVector GetIV(int i) const
Definition: CLASSBackEnd.hxx:146
Header file for DecayDataBank class.
void ClearIVArray()
Empty the IVArray removing all fuel stored.
Definition: CLASSBackEnd.cxx:37
Allows to store & operate on radioactive sample.
Definition: IsotopicVector.hxx:37
virtual void SetIVArray(std::vector< IsotopicVector > const &ivarray)
Set The isotopicVector Array.
Definition: CLASSBackEnd.hxx:159
int GetIVNumber() const
Return the number of Isotopic Vector present in the CLASSBackEnd object.
Definition: CLASSBackEnd.hxx:144
virtual void SetOutBackEndFacility(CLASSBackEnd *befacility)
Set an out Facility.
Definition: CLASSBackEnd.hxx:164
IsotopicVector GetDecay(IsotopicVector const &isotopicvector, cSecond t)
Get IsotopicVector decay at time t [s].
Definition: CLASSBackEnd.cxx:66
std::vector< IsotopicVector > fIVArray
Vector containning all the fuel stored.
Definition: CLASSBackEnd.hxx:123
std::vector< cSecond > GetIVArrayArrivalTime() const
Vector of arrival time of each IV in the CLASSBackEnd.
Definition: CLASSBackEnd.hxx:143
virtual void Evolution(cSecond t)
Performs the Evolution until time t.
Definition: CLASSBackEnd.hxx:115
virtual std::map< cSecond, int > GetTheBackEndTimePath()
Get the full path.
Definition: CLASSBackEnd.cxx:96
void SetDecayDataBank(DecayDataBank *decayDB)
Set the Decay DataBank.
Definition: CLASSBackEnd.hxx:162
DecayDataBank * GetDecayDataBank()
Return the pointer to the decay DataBank.
Definition: CLASSBackEnd.hxx:153
CLASSBackEnd(int type=0)
Default Constructor.
virtual void AddIV(IsotopicVector isotopicvector)
Add an Isotopicvector to the IVArray.
Definition: CLASSBackEnd.cxx:45
long long int cSecond
Definition: CLASSConstante.hxx:10
CLASSBackEnd * fOutBackEndFacility
Facility getting the fuel at the end of the cycle.
Definition: CLASSBackEnd.hxx:127
Header file for IsotopicVector class.
std::vector< IsotopicVector > GetIVArray() const
Return the IsotopicVector Array.
Definition: CLASSBackEnd.hxx:142
Describes outcore radioactive decays.
Definition: DecayDataBank.hxx:45
Object to handle output messages.
Definition: CLASSLogger.hxx:144
Defines the common properties of all facilities.
Definition: CLASSFacility.hxx:30
CLASSBackEnd * GetOutBackEndFacility() const
Return the pointer to the OUtBackEndFacility.
Definition: CLASSBackEnd.hxx:154
bool GetStorageType() const
Return the storageType : True if it is a Storage.
Definition: CLASSBackEnd.hxx:145
std::vector< cSecond > fIVArrayArrivalTime
Vector containning the arrival time of each fuel in [s].
Definition: CLASSBackEnd.hxx:124
Class defining the common properties of all back end fuel cycle facilities.
Definition: CLASSBackEnd.hxx:26
void SetIsStorageType(bool val=true)
Set the fIsStorage bool.
Definition: CLASSBackEnd.hxx:157