Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OnCalServer Class Reference

#include <coresoftware/blob/master/calibrations/framework/oncal/OnCalServer.h>

+ Inheritance diagram for OnCalServer:
+ Collaboration diagram for OnCalServer:

Public Member Functions

virtual ~OnCalServer ()
 
void registerHisto (TH1 *h1d, OnCal *Calibrator, const int replace=0)
 
void unregisterHisto (const std::string &calibname)
 
void Print (const std::string &what="ALL") const
 
void dumpHistos ()
 
int process_event ()
 
int BeginRun (const int runno)
 
int EndRun (const int)
 
int End ()
 
PHTimeStampGetEndValidityTS ()
 
PHTimeStampGetBeginValidityTS ()
 
void printStamps ()
 
PHTimeStampGetLastGoodRunTS (OnCal *calibrator, const int irun)
 
void recordDataBase (const bool bookkeep=false)
 
void RunNumber (const int runnum)
 
int RunNumber () const
 
void BeginTimeStamp (const PHTimeStamp &TimeStp)
 
void EndTimeStamp (const PHTimeStamp &TimeStp)
 
int SyncCalibTimeStampsToOnCal (const OnCal *calibrator, const std::string &table, const int commit=0)
 
int SyncCalibTimeStampsToOnCal (const OnCal *calibrator, const int commit=0)
 
int SyncOncalTimeStampsToRunDB (const int commit=0)
 
int ClosestGoodRun (OnCal *calibrator, const int runno, const int previous=fetchrun::CLOSEST)
 
int CopyTables (const OnCal *calibrator, const int FromRun, const int ToRun, const int commit=0) const
 
int CopySnglTable (const std::string &pdbclass, const std::string &tablename, const int bankid, const int FromRun, const int ToRun, const int commit)
 
int CopySnglTableNewBankId (const std::string &pdbclass, const std::string &tablename, const int bankid, const int Tobankid, const int FromRun, const int ToRun, const int commit)
 
int OverwriteCalibration (OnCal *calibrator, const int runno, const int commit=0, const int fromrun=-1)
 
int FixMissingCalibration (OnCal *calibrator, const int runno, const int commit=0, const int fromrun=-1)
 
int SetBorTime (const int runno)
 
int SetEorTime (const int runno)
 
int requiredCalibration (SubsysReco *reco, const std::string &calibratorname)
 
int FindClosestCalibratedRun (const int irun)
 
int FillRunListFromFileList ()
 
int AdjustRichTimeStampForMultipleRuns ()
 
int CreateCalibration (OnCal *calibrator, const int myrunnumber, const std::string &what, const int commit=0)
 
int GetCalibStatus (const std::string &calibname, const int runno)
 
int DisconnectDB ()
 
void TestMode (const int i=1)
 
bool updateDBRunRange (const char *table, const char *column, const int value, const int firstrun, const int lastrun)
 
void EventCheckFrequency (const unsigned int i)
 
- Public Member Functions inherited from Fun4AllServer
 ~Fun4AllServer () override
 
virtual bool registerHisto (const std::string &hname, TNamed *h1d, const int replace=0)
 
virtual bool registerHisto (TNamed *h1d, const int replace=0)
 
template<typename T >
TmakeHisto (T *t)
 
virtual int isHistoRegistered (const std::string &name) const
 
int registerSubsystem (SubsysReco *subsystem, const std::string &topnodename="TOP")
 
void addNewSubsystem (SubsysReco *subsystem, const std::string &topnodename="TOP")
 
int unregisterSubsystem (SubsysReco *subsystem)
 
SubsysRecogetSubsysReco (const std::string &name)
 
int registerOutputManager (Fun4AllOutputManager *manager)
 
Fun4AllOutputManagergetOutputManager (const std::string &name)
 
int registerHistoManager (Fun4AllHistoManager *manager)
 
Fun4AllHistoManagergetHistoManager (const std::string &name)
 
TNamed * getHisto (const std::string &hname) const
 
TNamed * getHisto (const unsigned int ihisto) const
 
std::string getHistoName (const unsigned int ihisto) const
 
void Print (const std::string &what="ALL") const override
 
void InitAll ()
 
int BeginRunTimeStamp (PHTimeStamp &TimeStp)
 
int dumpHistos (const std::string &filename, const std::string &openmode="RECREATE")
 
int Reset ()
 
int BeginRunSubsystem (const std::pair< SubsysReco *, PHCompositeNode * > &subsys)
 
PHCompositeNodetopNode () const
 
PHCompositeNodetopNode (const std::string &name)
 
int outfileclose ()
 
PHCompositeNodegetNode (const std::string &name, const std::string &topnodename="TOP")
 
int AddTopNode (const std::string &name)
 
int MakeNodesTransient (PHCompositeNode *startNode)
 
int MakeNodesPersistent (PHCompositeNode *startNode)
 
int AddComplaint (const std::string &complaint, const std::string &remedy)
 
int registerInputManager (Fun4AllInputManager *InManager)
 
Fun4AllInputManagergetInputManager (const std::string &name)
 
int PrdfEvents () const
 
int DstEvents () const
 
int run (const int nevnts=0, const bool require_nevents=false)
 run n events (0 means up to end of file)
 
int skip (const int nevnts=0)
 skip n events (0 means up to the end of file). Skip means read, don't process.
 
int fileopen (const std::string &managername, const std::string &filename)
 
int fileclose (const std::string &managername)
 
int SegmentNumber ()
 
int ResetNodeTree ()
 
int BranchSelect (const std::string &managername, const std::string &branch, int iflag)
 
int BranchSelect (const std::string &branch, int iflag)
 
int setBranches (const std::string &managername)
 
int setBranches ()
 
virtual void identify (std::ostream &out=std::cout) const
 
unsigned GetTopNodes (std::vector< std::string > &names) const
 
void GetInputFullFileList (std::vector< std::string > &fnames) const
 
void GetOutputManagerList (std::vector< std::string > &names) const
 
void GetModuleList (std::vector< std::string > &names) const
 
Fun4AllSyncManagergetSyncManager (const std::string &name="DefaultSyncManager")
 
int registerSyncManager (Fun4AllSyncManager *newmaster)
 
int retcodestats (const int iret)
 
void EventNumber (const int evtno)
 
int EventNumber () const
 
void NodeIdentify (const std::string &name)
 
void KeepDBConnection (const int i=1)
 
void PrintTimer (const std::string &name="")
 
void PrintMemoryTracker (const std::string &name="") const
 
int RunNumber () const
 
int EventCounter () const
 
std::map< const std::string,
PHTimer >::const_iterator 
timer_begin ()
 
std::map< const std::string,
PHTimer >::const_iterator 
timer_end ()
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module.
 
virtual void Name (const std::string &name)
 Sets the name of this module.
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual int Verbosity () const
 Gets the verbosity of this module.
 

Static Public Member Functions

static OnCalServerinstance ()
 
- Static Public Member Functions inherited from Fun4AllServer
static Fun4AllServerinstance ()
 

Protected Member Functions

bool connectDB ()
 
bool insertRunNumInDB (const std::string &tableName, const int runno)
 
bool findRunNumInDB (const std::string &tableName, const int runno)
 
bool updateDB (const char *table, const char *column, int value)
 
bool updateDB (const char *table, const char *column, bool value)
 
bool updateDB (const std::string &table, const std::string &column, const std::string &value, const int runno, const bool append=false)
 
int updateDB (const std::string &table, const std::string &column, const time_t ticks)
 
int check_create_subsystable (const std::string &DBTable)
 
int check_create_successtable (const std::string &DBTable)
 
int add_calibrator_to_statustable (const std::string &calibname)
 
int check_calibrator_in_statustable (const std::string &calibname)
 
int GetRunTimeTicks (const int runno, time_t &borticks, time_t &eorticks)
 
void CreateCalibrationUpdateStatus (OnCal *calibrator, const std::string &table, const std::string &tablecomment, const int dbcode)
 
 OnCalServer (const std::string &name="OnCalServer")
 
- Protected Member Functions inherited from Fun4AllServer
 Fun4AllServer (const std::string &name="Fun4AllServer")
 
int InitNodeTree (PHCompositeNode *topNode)
 
int CountOutNodes (PHCompositeNode *startNode)
 
int CountOutNodesRecursive (PHCompositeNode *startNode, const int icount)
 
int UpdateEventSelector (Fun4AllOutputManager *manager)
 
int unregisterSubsystemsNow ()
 
int setRun (const int runnumber)
 
- Protected Member Functions inherited from Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 

Protected Attributes

PHTimeStamp beginTimeStamp
 
PHTimeStamp endTimeStamp
 
int testmode
 
bool recordDB
 
TH1 * OnCalServerVars
 
std::map< std::string, TH1 * > Histo
 
std::map< std::string,
std::set< std::string > > 
calibratorhistomap
 
bool SetEndTimeStampByHand
 
bool SetBeginTimeStampByHand
 
std::string successTable
 
unsigned int runNum
 
unsigned int nEvents
 
unsigned int eventcheckfrequency
 
std::string database
 
std::map< std::string,
std::set< SubsysReco * > > 
requiredCalibrators
 
std::vector< int > analysed_runs
 
std::vector< std::string > inputfilelist
 
std::set< int > runlist
 
- Protected Attributes inherited from Fun4AllServer
TH1 * FrameWorkVars = nullptr
 
Fun4AllMemoryTrackerffamemtracker = nullptr
 
Fun4AllHistoManagerServerHistoManager = nullptr
 
PHTimeStampbeginruntimestamp = nullptr
 
PHCompositeNodeTopNode = nullptr
 
Fun4AllSyncManagerdefaultSyncManager = nullptr
 
int OutNodeCount = 0
 
int bortime_override = 0
 
int ScreamEveryEvent = 0
 
int unregistersubsystem = 0
 
int runnumber = 0
 
int eventnumber = 0
 
int eventcounter = 0
 
int keep_db_connected = 0
 
std::vector< std::string > ComplaintList
 
std::vector< std::pair
< SubsysReco
*, PHCompositeNode * > > 
Subsystems
 
std::vector< std::pair
< SubsysReco
*, PHCompositeNode * > > 
DeleteSubsystems
 
std::deque< std::pair
< SubsysReco *, std::string > > 
NewSubsystems
 
std::vector< int > RetCodes
 
std::vector
< Fun4AllOutputManager * > 
OutputManager
 
std::vector< TDirectory * > TDirCollection
 
std::vector
< Fun4AllHistoManager * > 
HistoManager
 
std::map< std::string,
PHCompositeNode * > 
topnodemap
 
std::string default_Tdirectory = "Rint:/"
 
std::vector< Fun4AllSyncManager * > SyncManagers
 
std::map< int, int > retcodesmap
 
std::map< const std::string,
PHTimer
timer_map
 

Additional Inherited Members

- Public Types inherited from Fun4AllBase
enum  enu_Verbosity {
  VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3,
  VERBOSITY_A_LOT = 4, VERBOSITY_MAX = std::numeric_limits<int>::max() - 10
}
 
- Static Protected Attributes inherited from Fun4AllServer
static Fun4AllServer__instance = nullptr
 

Detailed Description

Definition at line 26 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 26 of file OnCalServer.h

Constructor & Destructor Documentation

OnCalServer::~OnCalServer ( )
virtual

Definition at line 99 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 99 of file OnCalServer.cc

References DBconnection.

OnCalServer::OnCalServer ( const std::string &  name = "OnCalServer")
protected

Definition at line 78 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 78 of file OnCalServer.cc

References beginTimeStamp, endTimeStamp, OnCalHistoBinDefs::LASTBINPLUSONE, OnCalServerVars, Fun4AllServer::registerHisto(), and PHTimeStamp::setTics().

+ Here is the call graph for this function:

Member Function Documentation

int OnCalServer::add_calibrator_to_statustable ( const std::string &  calibname)
protected

Definition at line 1137 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1137 of file OnCalServer.cc

References check_calibrator_in_statustable(), runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, odbc::Statement::executeUpdate(), odbc::SQLException::getMessage(), OnCalDBCodes::INIT, and successTable.

Referenced by BeginRun(), and CreateCalibration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::AdjustRichTimeStampForMultipleRuns ( )

Definition at line 2379 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2379 of file OnCalServer.cc

References check_create_subsystable(), OnCalDBCodes::COVERED, dummy, GetRunTimeTicks(), runlist, odbc::Timestamp::setTime(), odbc::Timestamp::toString(), and updateDB().

+ Here is the call graph for this function:

void OnCalServer::BeginTimeStamp ( const PHTimeStamp TimeStp)

Definition at line 1294 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1294 of file OnCalServer.cc

References beginTimeStamp.

Referenced by SetBorTime().

+ Here is the caller graph for this function:

int OnCalServer::check_calibrator_in_statustable ( const std::string &  calibname)
protected

Definition at line 1194 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1194 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, geant4_parallel::ends, odbc::Statement::executeQuery(), odbc::ResultSetMetaData::getColumnCount(), odbc::ResultSetMetaData::getColumnName(), odbc::SQLException::getMessage(), odbc::ResultSet::getMetaData(), i, successTable, Acts::Test::transform, and Fun4AllBase::Verbosity().

Referenced by add_calibrator_to_statustable(), and requiredCalibration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::check_create_subsystable ( const std::string &  DBTable)
protected

Definition at line 1050 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1050 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, geant4_parallel::ends, odbc::Statement::executeQuery(), odbc::Statement::executeUpdate(), odbc::ResultSet::findColumn(), odbc::ResultSet::first(), odbc::SQLException::getMessage(), and PHWHERE.

Referenced by AdjustRichTimeStampForMultipleRuns(), BeginRun(), and CreateCalibration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::check_create_successtable ( const std::string &  DBTable)
protected

Definition at line 1240 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1240 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, geant4_parallel::ends, odbc::Statement::executeQuery(), odbc::Statement::executeUpdate(), and odbc::SQLException::getMessage().

Referenced by recordDataBase().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::ClosestGoodRun ( OnCal calibrator,
const int  runno,
const int  previous = fetchrun::CLOSEST 
)

Definition at line 1865 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1865 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, odbc::Statement::executeQuery(), RunToTime::getBeginTime(), RunToTime::getEndTime(), odbc::ResultSet::getInt(), odbc::ResultSet::getLong(), PHTimeStamp::getTics(), RunToTime::instance(), Fun4AllBase::Name(), odbc::ResultSet::next(), PHWHERE, fetchrun::PREVIOUS, successTable, and Fun4AllBase::Verbosity().

Referenced by FixMissingCalibration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool OnCalServer::connectDB ( )
protected

Definition at line 668 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 668 of file OnCalServer.cc

References database, DBconnection, Acts::UnitConstants::e, and odbc::SQLException::getMessage().

Referenced by add_calibrator_to_statustable(), check_calibrator_in_statustable(), check_create_subsystable(), check_create_successtable(), ClosestGoodRun(), CreateCalibration(), FindClosestCalibratedRun(), findRunNumInDB(), FixMissingCalibration(), GetCalibStatus(), GetLastGoodRunTS(), updateDB(), and updateDBRunRange().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::CopySnglTable ( const std::string &  pdbclass,
const std::string &  tablename,
const int  bankid,
const int  FromRun,
const int  ToRun,
const int  commit 
)

Definition at line 1796 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1796 of file OnCalServer.cc

References CopySnglTableNewBankId().

+ Here is the call graph for this function:

int OnCalServer::CopySnglTableNewBankId ( const std::string &  pdbclass,
const std::string &  tablename,
const int  bankid,
const int  Tobankid,
const int  FromRun,
const int  ToRun,
const int  commit 
)

Definition at line 1802 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1802 of file OnCalServer.cc

References PdbApplication::abort(), assert, PHObject::clone(), PdbApplication::commit(), PdbBankManager::fetchBank(), PdbBankManager::getApplication(), RunToTime::getBeginTime(), RunToTime::getEndTime(), PdbCalBank::getEndValTime(), PdbCalBank::getLength(), PdbCalBank::getStartValTime(), i, RunToTime::instance(), PdbBankManager::instance(), PdbCalBank::printEntry(), PdbCalBank::setBankID(), PdbApplication::setDBName(), PdbCalBank::setDescription(), PdbCalBank::setEndValTime(), PdbCalBank::setInsertTime(), PdbCalBank::setLength(), PdbCalBank::setStartValTime(), PdbApplication::startUpdate(), and Fun4AllBase::Verbosity().

Referenced by CopySnglTable().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::CopyTables ( const OnCal calibrator,
const int  FromRun,
const int  ToRun,
const int  commit = 0 
) const

Definition at line 1663 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1663 of file OnCalServer.cc

References OnCal::CopyTables().

Referenced by OverwriteCalibration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::CreateCalibration ( OnCal calibrator,
const int  myrunnumber,
const std::string &  what,
const int  commit = 0 
)
void OnCalServer::CreateCalibrationUpdateStatus ( OnCal calibrator,
const std::string &  table,
const std::string &  tablecomment,
const int  dbcode 
)
protected

Definition at line 1753 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1753 of file OnCalServer.cc

References beginTimeStamp, OnCal::CommitedToPdbCalOK(), cvstag, endTimeStamp, OnCal::GetLocalFileList(), PHTimeStamp::getTics(), infile, insertRunNumInDB(), Fun4AllBase::Name(), RunNumber(), successTable, Acts::Test::time, updateDB(), and OnCal::VerificationOK().

Referenced by CreateCalibration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::DisconnectDB ( )

Definition at line 705 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 705 of file OnCalServer.cc

References DBconnection.

Referenced by BeginRun().

+ Here is the caller graph for this function:

void OnCalServer::dumpHistos ( )

Definition at line 137 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 137 of file OnCalServer.cc

References calibratorhistomap, end, filename, Fun4AllServer::getHisto(), PHWHERE, and RunNumber().

Referenced by End().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::EndRun ( const int  )
inlinevirtual

Reimplemented from Fun4AllServer.

Definition at line 39 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 39 of file OnCalServer.h

void OnCalServer::EndTimeStamp ( const PHTimeStamp TimeStp)

Definition at line 1300 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1300 of file OnCalServer.cc

References endTimeStamp.

Referenced by SetEorTime().

+ Here is the caller graph for this function:

void OnCalServer::EventCheckFrequency ( const unsigned int  i)
inline

Definition at line 85 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 85 of file OnCalServer.h

References eventcheckfrequency, and i.

int OnCalServer::FillRunListFromFileList ( )

Definition at line 2360 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2360 of file OnCalServer.cc

References Fun4AllInputManager::GetFileList(), Fun4AllSyncManager::GetInputManagers(), Fun4AllUtils::GetRunSegment(), infile, runlist, and Fun4AllServer::SyncManagers.

Referenced by BeginRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::FindClosestCalibratedRun ( const int  irun)

Definition at line 2223 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2223 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, odbc::Statement::executeQuery(), RunToTime::getBeginTime(), RunToTime::getEndTime(), odbc::ResultSet::getInt(), odbc::ResultSet::getLong(), PHTimeStamp::getTics(), RunToTime::instance(), odbc::ResultSet::next(), PHWHERE, requiredCalibrators, and successTable.

Referenced by BeginRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool OnCalServer::findRunNumInDB ( const std::string &  tableName,
const int  runno 
)
protected

Definition at line 752 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 752 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), DBconnection, Acts::UnitConstants::e, entry, odbc::Statement::executeQuery(), odbc::ResultSet::getInt(), odbc::SQLException::getMessage(), odbc::ResultSet::next(), PHWHERE, and Fun4AllBase::Verbosity().

Referenced by insertRunNumInDB().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::FixMissingCalibration ( OnCal calibrator,
const int  runno,
const int  commit = 0,
const int  fromrun = -1 
)

Definition at line 2015 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2015 of file OnCalServer.cc

References ClosestGoodRun(), runCondor_beamspot::cmd, comment, connectDB(), OnCalDBCodes::COPIEDLATER, OnCalDBCodes::COPIEDPREVIOUS, odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, odbc::Statement::executeQuery(), odbc::SQLException::getMessage(), insertRunNumInDB(), Fun4AllBase::Name(), odbc::ResultSet::next(), OverwriteCalibration(), PHWHERE, runNum, successTable, and updateDB().

+ Here is the call graph for this function:

PHTimeStamp * OnCalServer::GetBeginValidityTS ( )

Definition at line 122 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 122 of file OnCalServer.cc

References beginTimeStamp, PHTimeStamp::getTics(), and PHWHERE.

+ Here is the call graph for this function:

int OnCalServer::GetCalibStatus ( const std::string &  calibname,
const int  runno 
)

Definition at line 2480 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2480 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, odbc::Statement::executeQuery(), odbc::ResultSet::getInt(), odbc::ResultSet::next(), PHWHERE, and successTable.

Referenced by BeginRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHTimeStamp * OnCalServer::GetEndValidityTS ( )

Definition at line 107 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 107 of file OnCalServer.cc

References endTimeStamp, PHTimeStamp::getTics(), and PHWHERE.

+ Here is the call graph for this function:

PHTimeStamp * OnCalServer::GetLastGoodRunTS ( OnCal calibrator,
const int  irun 
)

Definition at line 1307 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1307 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), database, DBconnection, Acts::UnitConstants::e, odbc::Statement::executeQuery(), RunToTime::getBeginTime(), odbc::ResultSet::getInt(), RunToTime::instance(), Fun4AllBase::Name(), odbc::ResultSet::next(), PHWHERE, PHTimeStamp::print(), and successTable.

+ Here is the call graph for this function:

int OnCalServer::GetRunTimeTicks ( const int  runno,
time_t &  borticks,
time_t &  eorticks 
)
protected

Definition at line 2171 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2171 of file OnCalServer.cc

References RunToTime::getBeginTime(), RunToTime::getEndTime(), PHTimeStamp::getTics(), RunToTime::instance(), and PHWHERE.

Referenced by AdjustRichTimeStampForMultipleRuns(), and RunNumber().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool OnCalServer::insertRunNumInDB ( const std::string &  tableName,
const int  runno 
)
protected

Definition at line 713 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 713 of file OnCalServer.cc

References runCondor_beamspot::cmd, odbc::Connection::createStatement(), DBconnection, Acts::UnitConstants::e, odbc::Statement::executeUpdate(), findRunNumInDB(), odbc::SQLException::getMessage(), and Fun4AllBase::Verbosity().

Referenced by BeginRun(), CreateCalibration(), CreateCalibrationUpdateStatus(), FixMissingCalibration(), and RunNumber().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

OnCalServer * OnCalServer::instance ( )
static

Definition at line 64 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 64 of file OnCalServer.cc

int OnCalServer::OverwriteCalibration ( OnCal calibrator,
const int  runno,
const int  commit = 0,
const int  fromrun = -1 
)

Definition at line 2005 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2005 of file OnCalServer.cc

References CopyTables().

Referenced by FixMissingCalibration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OnCalServer::Print ( const std::string &  what = "ALL") const
virtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from Fun4AllBase.

Definition at line 530 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 530 of file OnCalServer.cc

References Fun4AllInputManager::GetFileList(), Fun4AllSyncManager::GetInputManagers(), infile, Fun4AllBase::Name(), Fun4AllServer::Print(), requiredCalibrators, runlist, Fun4AllServer::Subsystems, and Fun4AllServer::SyncManagers.

+ Here is the call graph for this function:

void OnCalServer::printStamps ( )

Definition at line 607 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 607 of file OnCalServer.cc

References beginTimeStamp, endTimeStamp, PHTimeStamp::print(), and runNum.

Referenced by End().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::process_event ( )
virtual

Reimplemented from Fun4AllServer.

Definition at line 212 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 212 of file OnCalServer.cc

References OnCal::AllDone(), eventcheckfrequency, i, j, Fun4AllBase::Name(), nEvents, Fun4AllServer::process_event(), and Fun4AllServer::Subsystems.

+ Here is the call graph for this function:

void OnCalServer::recordDataBase ( const bool  bookkeep = false)

Definition at line 1284 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1284 of file OnCalServer.cc

References check_create_successtable(), recordDB, and successTable.

+ Here is the call graph for this function:

void OnCalServer::registerHisto ( TH1 *  h1d,
OnCal Calibrator,
const int  replace = 0 
)

Definition at line 183 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 183 of file OnCalServer.cc

References calibratorhistomap, Fun4AllBase::Name(), and Fun4AllServer::registerHisto().

+ Here is the call graph for this function:

int OnCalServer::requiredCalibration ( SubsysReco reco,
const std::string &  calibratorname 
)

Definition at line 2201 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2201 of file OnCalServer.cc

References check_calibrator_in_statustable(), PHWHERE, and requiredCalibrators.

+ Here is the call graph for this function:

void OnCalServer::RunNumber ( const int  runnum)

Definition at line 632 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 632 of file OnCalServer.cc

References GetRunTimeTicks(), insertRunNumInDB(), recordDB, runlist, runNum, SetBorTime(), SetEorTime(), odbc::Timestamp::setTime(), successTable, odbc::Timestamp::toString(), and updateDB().

+ Here is the call graph for this function:

int OnCalServer::RunNumber ( ) const
inline

Definition at line 58 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 58 of file OnCalServer.h

References runNum.

Referenced by BeginRun(), CreateCalibrationUpdateStatus(), dumpHistos(), and End().

+ Here is the caller graph for this function:

int OnCalServer::SetBorTime ( const int  runno)

Definition at line 2115 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2115 of file OnCalServer.cc

References Fun4AllServer::BeginRunTimeStamp(), BeginTimeStamp(), RunToTime::getBeginTime(), RunToTime::instance(), PHWHERE, and PHTimeStamp::print().

Referenced by CreateCalibration(), and RunNumber().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::SetEorTime ( const int  runno)

Definition at line 2140 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2140 of file OnCalServer.cc

References EndTimeStamp(), RunToTime::getEndTime(), PHTimeStamp::getTics(), and RunToTime::instance().

Referenced by CreateCalibration(), and RunNumber().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::SyncCalibTimeStampsToOnCal ( const OnCal calibrator,
const std::string &  table,
const int  commit = 0 
)

Definition at line 1364 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1364 of file OnCalServer.cc

References runCondor_beamspot::cmd, con, odbc::Connection::createStatement(), database, Acts::UnitConstants::e, odbc::PreparedStatement::executeQuery(), odbc::Statement::executeQuery(), odbc::PreparedStatement::executeUpdate(), odbc::ResultSet::getInt(), odbc::ResultSet::getLong(), odbc::SQLException::getMessage(), Fun4AllBase::Name(), perf_headwind::name, odbc::ResultSet::next(), odbc::Connection::prepareStatement(), Fun4AllServer::run(), odbc::PreparedStatement::setInt(), and successTable.

Referenced by SyncCalibTimeStampsToOnCal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnCalServer::SyncCalibTimeStampsToOnCal ( const OnCal calibrator,
const int  commit = 0 
)

Definition at line 1351 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 1351 of file OnCalServer.cc

References OnCal::GetPdbCalTables(), and SyncCalibTimeStampsToOnCal().

+ Here is the call graph for this function:

int OnCalServer::SyncOncalTimeStampsToRunDB ( const int  commit = 0)
void OnCalServer::TestMode ( const int  i = 1)

Definition at line 2519 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 2519 of file OnCalServer.cc

References i, and testmode.

void OnCalServer::unregisterHisto ( const std::string &  calibname)

Definition at line 206 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 206 of file OnCalServer.cc

References calibratorhistomap.

Referenced by BeginRun().

+ Here is the caller graph for this function:

bool OnCalServer::updateDB ( const char *  table,
const char *  column,
int  value 
)
protected

Definition at line 849 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 849 of file OnCalServer.cc

References connectDB(), odbc::Connection::createStatement(), DBconnection, Acts::UnitConstants::e, entry, odbc::Statement::executeUpdate(), odbc::SQLException::getMessage(), runNum, and Fun4AllBase::Verbosity().

Referenced by AdjustRichTimeStampForMultipleRuns(), BeginRun(), CreateCalibrationUpdateStatus(), End(), FixMissingCalibration(), and RunNumber().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool OnCalServer::updateDB ( const char *  table,
const char *  column,
bool  value 
)
protected

Definition at line 889 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 889 of file OnCalServer.cc

References connectDB(), odbc::Connection::createStatement(), DBconnection, Acts::UnitConstants::e, entry, odbc::Statement::executeUpdate(), odbc::SQLException::getMessage(), runNum, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

bool OnCalServer::updateDB ( const std::string &  table,
const std::string &  column,
const std::string &  value,
const int  runno,
const bool  append = false 
)
protected

Definition at line 969 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 969 of file OnCalServer.cc

References runCondor_beamspot::cmd, comment, connectDB(), odbc::Connection::createStatement(), DBconnection, Acts::UnitConstants::e, entry, odbc::Statement::executeQuery(), odbc::Statement::executeUpdate(), odbc::SQLException::getMessage(), odbc::ResultSet::getString(), odbc::ResultSet::next(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int OnCalServer::updateDB ( const std::string &  table,
const std::string &  column,
const time_t  ticks 
)
protected

Definition at line 929 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 929 of file OnCalServer.cc

References runCondor_beamspot::cmd, connectDB(), odbc::Connection::createStatement(), DBconnection, Acts::UnitConstants::e, odbc::Statement::executeUpdate(), odbc::SQLException::getMessage(), runNum, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

bool OnCalServer::updateDBRunRange ( const char *  table,
const char *  column,
const int  value,
const int  firstrun,
const int  lastrun 
)

Definition at line 806 of file OnCalServer.cc.

View newest version in sPHENIX GitHub at line 806 of file OnCalServer.cc

References connectDB(), odbc::Connection::createStatement(), DBconnection, Acts::UnitConstants::e, entry, odbc::Statement::executeUpdate(), odbc::SQLException::getMessage(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

Member Data Documentation

std::vector<int> OnCalServer::analysed_runs
protected

Definition at line 137 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 137 of file OnCalServer.h

Referenced by BeginRun().

PHTimeStamp OnCalServer::beginTimeStamp
protected

Definition at line 120 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 120 of file OnCalServer.h

Referenced by BeginTimeStamp(), CreateCalibrationUpdateStatus(), End(), GetBeginValidityTS(), OnCalServer(), and printStamps().

std::map<std::string, std::set<std::string> > OnCalServer::calibratorhistomap
protected

Definition at line 126 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 126 of file OnCalServer.h

Referenced by dumpHistos(), registerHisto(), and unregisterHisto().

PHTimeStamp OnCalServer::endTimeStamp
protected

Definition at line 121 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 121 of file OnCalServer.h

Referenced by CreateCalibrationUpdateStatus(), End(), EndTimeStamp(), GetEndValidityTS(), OnCalServer(), and printStamps().

unsigned int OnCalServer::eventcheckfrequency
protected

Definition at line 133 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 133 of file OnCalServer.h

Referenced by EventCheckFrequency(), and process_event().

std::map<std::string, TH1 *> OnCalServer::Histo
protected

Definition at line 125 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 125 of file OnCalServer.h

std::vector<std::string> OnCalServer::inputfilelist
protected

Definition at line 138 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 138 of file OnCalServer.h

unsigned int OnCalServer::nEvents
protected

Definition at line 132 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 132 of file OnCalServer.h

Referenced by End(), and process_event().

TH1* OnCalServer::OnCalServerVars
protected

Definition at line 124 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 124 of file OnCalServer.h

Referenced by BeginRun(), and OnCalServer().

bool OnCalServer::recordDB
protected

Definition at line 123 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 123 of file OnCalServer.h

Referenced by End(), recordDataBase(), and RunNumber().

std::map<std::string, std::set<SubsysReco *> > OnCalServer::requiredCalibrators
protected

Definition at line 136 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 136 of file OnCalServer.h

Referenced by BeginRun(), FindClosestCalibratedRun(), Print(), and requiredCalibration().

std::set<int> OnCalServer::runlist
protected

Definition at line 139 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 139 of file OnCalServer.h

Referenced by AdjustRichTimeStampForMultipleRuns(), BeginRun(), End(), FillRunListFromFileList(), Print(), and RunNumber().

unsigned int OnCalServer::runNum
protected

Definition at line 131 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 131 of file OnCalServer.h

Referenced by BeginRun(), CreateCalibration(), FixMissingCalibration(), printStamps(), RunNumber(), and updateDB().

bool OnCalServer::SetBeginTimeStampByHand
protected

Definition at line 128 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 128 of file OnCalServer.h

bool OnCalServer::SetEndTimeStampByHand
protected

Definition at line 127 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 127 of file OnCalServer.h

int OnCalServer::testmode
protected

Definition at line 122 of file OnCalServer.h.

View newest version in sPHENIX GitHub at line 122 of file OnCalServer.h

Referenced by BeginRun(), CreateCalibration(), and TestMode().


The documentation for this class was generated from the following files: