File indexing completed on 2026-04-05 08:16:03
0001 #include "ServerFuncs.C"
0002
0003 #include <onlmon/tpot/TpotMon.h>
0004 #include <onlmon/OnlMonServer.h>
0005
0006 #include <fstream>
0007
0008 R__LOAD_LIBRARY(libonltpotmon_server.so)
0009
0010 void run_tpot_server(
0011 const std::string &name = "TPOTMON",
0012 unsigned int serverid = 0,
0013 const std::string &evtfile = "/sphenix/lustre01/sphnxpro/physics/TPOT/physics/TPOT_ebdc39_physics-00051926-0000.evt"
0014 )
0015 {
0016
0017 auto m = new TpotMon(name);
0018 m->SetMonitorServerId(serverid);
0019 m->set_max_sample(1024);
0020 m->set_sample_window_signal( {3, 18} );
0021
0022
0023 const std::string local_calibration_filename( "TPOT_Pedestal-000.root" );
0024 if( std::ifstream( local_calibration_filename ).good() )
0025 { m->set_calibration_file( local_calibration_filename ); }
0026
0027
0028 auto se = OnlMonServer::instance();
0029
0030
0031 se->registerMonitor(m);
0032
0033
0034 start_server(evtfile);
0035 return;
0036 }