File indexing completed on 2025-08-05 08:18:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <iostream>
0022 #include <time.h>
0023 #include <chrono>
0024 #include <thread>
0025
0026
0027 #include "JetScape.h"
0028 #include "JetEnergyLoss.h"
0029 #include "JetEnergyLossManager.h"
0030 #include "JetScapeWriterStream.h"
0031 #ifdef USE_HEPMC
0032 #include "JetScapeWriterHepMC.h"
0033 #endif
0034
0035
0036
0037 #include "AdSCFT.h"
0038 #include "Matter.h"
0039 #include "Martini.h"
0040 #include "Brick.h"
0041 #include "GubserHydro.h"
0042 #include "HydroFromFile.h"
0043 #include "PGun.h"
0044
0045 #ifdef USE_HDF5
0046 #include "InitialFromFile.h"
0047 #endif
0048
0049
0050 using namespace Jetscape;
0051
0052
0053 void Show();
0054
0055
0056
0057 int main(int argc, char** argv)
0058 {
0059 clock_t t; t = clock();
0060 time_t start, end; time(&start);
0061
0062 cout<<endl;
0063
0064
0065
0066 JetScapeLogger::Instance()->SetDebug(false);
0067 JetScapeLogger::Instance()->SetRemark(false);
0068
0069
0070 JetScapeLogger::Instance()->SetVerboseLevel(8);
0071
0072 Show();
0073
0074 auto jetscape = make_shared<JetScape>();
0075 jetscape->SetXMLMainFileName("../config/jetscape_main.xml");
0076 jetscape->SetXMLUserFileName("../config/jetscape_user.xml");
0077 jetscape->SetReuseHydro (true);
0078 jetscape->SetNReuseHydro (5);
0079
0080 auto jlossmanager = make_shared<JetEnergyLossManager> ();
0081 auto jloss = make_shared<JetEnergyLoss> ();
0082 auto hydro = make_shared<HydroFromFile> ();
0083
0084
0085 auto matter = make_shared<Matter> ();
0086 auto martini = make_shared<Martini> ();
0087 auto adscft = make_shared<AdSCFT> ();
0088
0089
0090
0091
0092
0093
0094
0095
0096 auto pGun= make_shared<PGun> ();
0097
0098
0099 auto writer= make_shared<JetScapeWriterAscii> ("test_out.dat");
0100
0101 #ifdef USE_HEPMC
0102 auto writerhepmc= make_shared<JetScapeWriterHepMC> ("test_out.hepmc");
0103 jetscape->Add(writerhepmc);
0104 #endif
0105
0106
0107
0108
0109
0110 #ifdef USE_HDF5
0111 auto initial = make_shared<InitialFromFile>();
0112 jetscape->Add(initial);
0113 #endif
0114
0115 jetscape->Add(pGun);
0116
0117
0118
0119 jetscape->Add(hydro);
0120
0121
0122
0123
0124
0125 jloss->Add(matter);
0126
0127
0128
0129 jlossmanager->Add(jloss);
0130
0131 jetscape->Add(jlossmanager);
0132
0133 jetscape->Add(writer);
0134
0135
0136 jetscape->Init();
0137
0138
0139 jetscape->Exec();
0140
0141
0142
0143 jetscape->Finish();
0144
0145 INFO_NICE<<"Finished!";
0146 cout<<endl;
0147
0148
0149
0150
0151 t = clock() - t;
0152 time(&end);
0153 printf ("CPU time: %f seconds.\n",((float)t)/CLOCKS_PER_SEC);
0154 printf ("Real time: %f seconds.\n",difftime(end,start));
0155
0156 return 0;
0157 }
0158
0159
0160
0161 void Show()
0162 {
0163 INFO_NICE<<"-----------------------------------------------";
0164 INFO_NICE<<"| Hydro from file Test JetScape Framework ... |";
0165 INFO_NICE<<"-----------------------------------------------";
0166 INFO_NICE;
0167 }