CLASS  1.1
include/TreatmentFactory.hxx
Aller à la documentation de ce fichier.
00001 #ifndef __TreatmentFactory_HXX__
00002 #define __TreatmentFactory_HXX__
00003 
00014 #include "EvolutionDataBase.hxx"
00015 #include "CLASS.hxx"
00016 #include "IsotopicVector.hxx"
00017 #include "LogFile.hxx"
00018 
00019 #include <vector>
00020 
00021 using namespace std;
00022 
00023 
00024 
00025 class TreatmentFactory : public TObject
00026 {
00027 public :
00028         TreatmentFactory();                                             
00029 
00030         TreatmentFactory(long int abstime,
00031                          long int coolingtime = 5,
00032                          long int separationtime = 2,
00033                          EvolutionDataBase* evolutivedb = NULL);                
00034         
00035         ~TreatmentFactory();                                            
00036 
00037 
00038 
00039 
00040 //********* Set Method *********//
00041         void SetParc(CLASS* parc)                       {fParc = parc;}                         
00042         void SetLog(LogFile* Log)                       {fLog = Log;}                           
00043 
00044         void SetDecayDataBase(EvolutionDataBase* ddb)   {fDecayDataBase = ddb;}                 
00045         void SetIVWaste(IsotopicVector IV)              {fIVWaste = IV;}                        
00046         void SetCoolingTime(long int time)              {fCoolingTime = time;}                  
00047         void SetSeparationTime(long int time)           {fSeparationTime = time;}               
00048         void SetStockManagement(bool bmanagement)       {fStockManagement = bmanagement;}       
00049 
00050 
00051 
00052 //********* Get Method *********//
00053         LogFile*                GetLog()                {return fLog;}                  
00054         CLASS*                  GetParc()               {return fParc;}                 
00055         
00056         long int GetInternalTime() const                {return fInternalTime;}         
00057         long int GetCreationTime() const                {return fCreationTime;}         
00058         long int GetCoolingTime() const                 {return fCoolingTime;}          
00059         long int GetSeparationTime() const              {return fSeparationTime;}       
00060         
00061         EvolutionDataBase*      GeDecayDataBase() const {return fDecayDataBase;}        
00063         
00064         map<ZAI ,double>        GetValorisableIV() const {return fValorisableIV;}       
00065         void                    AddValorisableIV(ZAI zai, double factor);               
00066 
00067 
00068 
00069 //********* IsotopicVector Method *********//
00070 
00071 //--------- Cooling ---------//
00072         vector<long int>        GetCoolingStartingTime() const  {return fCoolingStartingTime;}
00074         vector<IsotopicVector>  GetIVCooling() const            {return fIVCooling;}    
00075         void                    AddIVCooling(IsotopicVector IV);                        
00076         void                    RemoveIVCooling(int i);                                 
00077 
00078 
00079 //---------- Waste ----------//
00080         IsotopicVector          GetIVWaste() const                      {return fIVWaste;}              
00081         void                    AddIVWaste(ZAI zai, double quantity)    {fIVWaste += zai*quantity; }    
00082         void                    AddIVWaste(IsotopicVector IV)           {fIVWaste += IV; }              
00083 
00084 
00085 //------- Separation --------//
00086         vector<long int>        GetSeparatingStartingTime() const       {return fSeparatingStartingTime;}       
00087         vector<IsotopicVector>  GetIVSeparating() const                 {return fIVSeparating;}                 
00088         
00089         void                    AddIVSeparating(IsotopicVector IV);                                             
00090         void                    AddIVSeparating(IsotopicVector IV, long int absolutadditiontime);               
00091         void                    RemoveIVSeparation(int i);                                                      
00092 
00093 //---------- Stock ----------//
00094         vector<IsotopicVector>  GetIVStock() const              {return fIVStock;}                      
00095         void SetIVStock(vector<IsotopicVector> IVsStock)        {fIVStock =IVsStock;}                   
00096         void ClearIVStock();
00097         
00098         void AddIVStock(ZAI zai, double quantity)               {AddIVStock(zai*quantity);}             
00099         void AddIVStock(IsotopicVector isotopicvector);                                                 
00100         IsotopicVector          GetIVFullStock() const          {return fIVFullStock;}                  
00101         void AddIVFullStock(ZAI zai, double quantity)           {fIVFullStock.Add(zai*quantity); }      
00102         void AddIVFullStock(IsotopicVector isotopicvector)      {fIVFullStock.Add(isotopicvector); }    
00103 
00104         void TakeFromStock(IsotopicVector isotopicvector, int index);           
00105         
00106 //-------- GodIncome --------//
00107 
00108         IsotopicVector          GetIVGodIncome() const          {return fIVGodIncome;}  
00109         void AddIVGodIncome(ZAI zai, double quantity)           {AddIVGodIncome(zai*quantity);} 
00110         void AddIVGodIncome(IsotopicVector isotopicvector)      {fIVGodIncome.Add(isotopicvector); fParc->AddTotalGodIncome(isotopicvector);}   
00111 
00112 
00113 
00114 //********* Other Method *********//
00115         void Evolution(long int t);             
00116         void Dump();                            
00117         
00118         
00119 protected :
00120         
00121         long int                fInternalTime;          
00122         bool                    IsStarted;              
00123         
00124 //********* Internal Parameter *********//
00125         CLASS*                  fParc;                  
00126         LogFile*                fLog;                   
00127 
00128         map<ZAI ,double>        fValorisableIV;         
00129         EvolutionDataBase*      fDecayDataBase;         
00130 
00131         long int                fCreationTime;          
00132         long int                fCoolingTime;           
00133         long int                fSeparationTime;        
00134 
00135 
00136 //********* Isotopic Quantity *********//
00137 //--------- Cooling ---------//
00138         vector<IsotopicVector>  fIVCooling;             
00139         vector<long int>        fCoolingStartingTime;   
00140         vector<int>             fCoolingIndex;          
00141         int                     fCoolingLastIndex;      
00142         vector<int>             fCoolingEndOfCycle;     
00143 
00144 //------- Separation --------//
00145         vector<IsotopicVector>  fIVSeparating;          
00146         vector<long int>        fSeparatingStartingTime;
00147         vector<int>             fSeparatingIndex;       
00148         int                     fSeparatingLastIndex;   
00149         vector<int>             fSeparationEndOfCycle;  
00150         
00151 //---------- Stock ----------//
00152         vector<IsotopicVector>  fIVStock;               
00153         IsotopicVector          fIVGodIncome;           
00154         IsotopicVector          fIVFullStock;           
00155         bool                    fStockManagement;       
00156 
00157         IsotopicVector          fIVWaste;               
00158 
00159 //********* Private Method *********//
00160         IsotopicVector GetDecayProduct(IsotopicVector isotopicvector, long int t);      
00161         void    CoolingEvolution(long int t);                                           
00162         void    SeparatingEvolution(long int t);                                        
00163         void    StockEvolution(long int t);                                                     
00164 
00165 
00166         void    WasteEvolution(long int t);                                                     
00167         pair<IsotopicVector, IsotopicVector> Separation(IsotopicVector isotopicvector); 
00168 
00169 
00170 
00171 
00172         ClassDef(TreatmentFactory,3);
00173 };
00174 
00175 #endif
 Tout Classes Fichiers Fonctions Variables Macros