Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, file /macros/calibrations/mbd/DumpMbdCalibs.C was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This example runs the CDBInterface like in the real reconstruction
0002 // once the CDBInterface instance is created it registers itself with the 
0003 // Fun4AllServer and creates (or adds to) the CdbUrl Node which contains a 
0004 // record of the files and timestamps which were used
0005 #ifndef DUMPMBDCALIBS_C
0006 #define DUMPMBDCALIBS_C
0007 
0008 #include <TSystem.h>
0009 
0010 #include <ffamodules/CDBInterface.h>
0011 
0012 #include <fun4all/Fun4AllServer.h>
0013 #include <fun4all/Fun4AllDummyInputManager.h>
0014 
0015 #include <phool/recoConsts.h>
0016 #include "mbd/MbdCalib.h"
0017 
0018 R__LOAD_LIBRARY(libffamodules.so)
0019 R__LOAD_LIBRARY(libphool.so)
0020 R__LOAD_LIBRARY(libmbd.so)
0021 R__LOAD_LIBRARY(libmbd_io.so)
0022 
0023 // pcdb001
0024 void DumpMbdCalibs(const int runno, const char* dbtag = "newcdbtag")
0025 {
0026   recoConsts *rc = recoConsts::instance();
0027   rc->set_StringFlag("CDB_GLOBALTAG",dbtag); 
0028   rc->set_uint64Flag("TIMESTAMP",runno);
0029   rc->set_uint64Flag("RUNNUMBER",runno);
0030   Fun4AllServer *se = Fun4AllServer::instance();
0031   se->Verbosity(1);
0032 
0033   /*
0034   CDBInterface *cdb = CDBInterface::instance();
0035   std::string timecorr_url = cdb->getUrl("MBD_TIMECORR");
0036   std::string slewcorr_url = cdb->getUrl("MBD_SLEWCORR");
0037   cout << "xxxurl: " << cdb->getUrl("MBD_SAMPMAX") << endl;
0038   cout << "xxxurl: " << cdb->getUrl("MBD_QFIT") << endl;
0039   cout << "xxxurl: " << cdb->getUrl("MBD_T0CORR") << endl;
0040   std::string t0corr_url = cdb->getUrl("MBD_T0CORR");
0041   cout << t0corr_url.size() << endl;
0042   */
0043 
0044   MbdCalib *mcal = new MbdCalib();
0045   mcal->Verbosity(1);
0046   mcal->Download_All();
0047   mcal->Write_All();
0048   //mcal->Download_TimeCorr(timecorr_url);
0049   //mcal->Write_TimeCorr("tcorr.calib");
0050   //mcal->Download_SlewCorr(slewcorr_url);
0051   //mcal->Write_SlewCorr("slewcorr.calib");
0052   //mcal->Write_TQT0("a.calib");
0053 
0054   std::cout << "All done" << std::endl;
0055 
0056   gSystem->Exit(0);
0057   return;
0058 }
0059 
0060 #endif  // DUMPMBDCALIBS_C
0061