Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:01

0001 #ifndef FUN4ALL_WAVEFIT_C
0002 #define FUN4ALL_WAVEFIT_C
0003 
0004 #include <caloreco/CaloTowerBuilder.h>
0005 #include <caloreco/CaloWaveformProcessing.h>
0006 #include <caloreco/CaloGeomMapping.h>
0007 
0008 #include <ffamodules/FlagHandler.h>
0009 #include <ffamodules/HeadReco.h>
0010 #include <ffamodules/SyncReco.h>
0011 #include <ffamodules/CDBInterface.h>
0012 
0013 #include <fun4allraw/Fun4AllPrdfInputManager.h>
0014 
0015 #include <fun4all/Fun4AllDstOutputManager.h>
0016 #include <fun4all/Fun4AllInputManager.h>
0017 #include <fun4all/Fun4AllServer.h>
0018 #include <fun4all/SubsysReco.h>
0019 
0020 #include <phool/recoConsts.h>
0021 #include "/sphenix/u/bseidlitz/work/waveform_cemc_gen_template/source/BeamWaveform.h"
0022 
0023 R__LOAD_LIBRARY(libfun4all.so)
0024 R__LOAD_LIBRARY(libfun4allraw.so)
0025 R__LOAD_LIBRARY(libcalo_reco.so)
0026 R__LOAD_LIBRARY(libffamodules.so)
0027 R__LOAD_LIBRARY(libBeamWaveform.so)
0028 
0029 void Fun4All_WaveFit(int nevents = 10, const std::string &fname = "/sphenix/lustre01/sphnxpro/commissioning/aligned_prdf/beam-00021796-0076.prdf")
0030 {
0031     Fun4AllServer *se = Fun4AllServer::instance();
0032     se->Verbosity(0);
0033     recoConsts *rc = recoConsts::instance();
0034 
0035     //===============
0036     // conditions DB flags
0037     //===============
0038     rc->set_StringFlag("CDB_GLOBALTAG", "ProdA_2023");
0039     rc->set_uint64Flag("TIMESTAMP", 0);
0040     
0041     Fun4AllInputManager *in = new Fun4AllPrdfInputManager("in");
0042     in->fileopen(fname);
0043     se->registerInputManager(in);
0044  
0045     BeamWaveform *bw = new BeamWaveform("BeamWaveform");
0046     bw->SetDetector("CEMC");
0047     bw->SetPacketRange(6001, 6128);
0048 //    bw->SetPacketRange(8003,8006);
0049     se->registerSubsystem(bw);
0050 
0051     se->run(nevents);
0052     se->End();
0053     se->PrintTimer();
0054     gSystem->Exit(0);
0055 }
0056 #endif