File indexing completed on 2025-08-05 08:12:20
0001 #ifndef FUN4ALL_YEAR1_C
0002 #define FUN4ALL_YEAR1_C
0003
0004 #include <caloreco/CaloTowerCalib.h>
0005 #include <caloreco/RawClusterBuilderTemplate.h>
0006 #include <caloreco/RawClusterDeadHotMask.h>
0007 #include <caloreco/RawClusterPositionCorrection.h>
0008 #include <caloreco/TowerInfoDeadHotMask.h>
0009
0010 #include <ffamodules/FlagHandler.h>
0011 #include <ffamodules/HeadReco.h>
0012 #include <ffamodules/SyncReco.h>
0013
0014 #include <fun4allraw/Fun4AllPrdfInputManager.h>
0015
0016 #include <fun4all/Fun4AllDstInputManager.h>
0017 #include <fun4all/Fun4AllDstOutputManager.h>
0018 #include <fun4all/Fun4AllInputManager.h>
0019 #include <fun4all/Fun4AllRunNodeInputManager.h>
0020 #include <fun4all/Fun4AllServer.h>
0021 #include <fun4all/Fun4AllUtils.h>
0022 #include <fun4all/SubsysReco.h>
0023
0024 #include <globalvertex/GlobalVertexReco.h>
0025 #include <mbd/MbdReco.h>
0026
0027 #include <phool/recoConsts.h>
0028
0029 #include <cdbobjects/CDBTTree.h> // for CDBTTree
0030 #include <ffamodules/CDBInterface.h>
0031 #include <GlobalVariables.C>
0032
0033 R__LOAD_LIBRARY(libcdbobjects)
0034
0035 R__LOAD_LIBRARY(libfun4all.so)
0036 R__LOAD_LIBRARY(libfun4allraw.so)
0037 R__LOAD_LIBRARY(libcalo_reco.so)
0038 R__LOAD_LIBRARY(libffamodules.so)
0039 R__LOAD_LIBRARY(libmbd.so)
0040 R__LOAD_LIBRARY(libglobalvertex.so)
0041
0042 #include <caloana/CaloAna.h>
0043 R__LOAD_LIBRARY(libcaloana.so)
0044
0045
0046 void doFitAndCalibUpdate(const std::string &hist_fname = "parallel_test/combine_out/out1.root", const std::string &calib_fname = "parallel_test/local_cdb_copy.root" ,int iter = 3)
0047 {
0048
0049
0050 Fun4AllServer *se = Fun4AllServer::instance();
0051 se->Verbosity(0);
0052
0053 CaloAna *caFit = new CaloAna("calomodulename", "bla.root");
0054 caFit->fitEtaSlices(hist_fname.c_str(), Form("fitout_iter%d.root", iter), calib_fname.c_str());
0055
0056 size_t pos = calib_fname.find_last_of('.');
0057 string f_calib_save_name = calib_fname;
0058 f_calib_save_name.insert(pos,Form("_iter%d",iter));
0059
0060 TFile* f_calib_mod = new TFile(calib_fname.c_str());
0061 f_calib_mod->Cp(f_calib_save_name.c_str());
0062
0063 gSystem->Exit(0);
0064 }
0065
0066
0067 #endif