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