#include "ICOMETLog.hxx" #include "ICalibApplyEventFunction.hxx" ICalibApplyEventFunction::ICalibApplyEventFunction(const Char_t* name) : IVEventFunction(name) {} ICalibApplyEventFunction::~ICalibApplyEventFunction() {} //====================================================================== // ProcessCore //====================================================================== int ICalibApplyEventFunction::ProcessCore(COMET::ICOMETEvent& event) { int ret; try{ ret = ApplyCalibration(event); } catch(COMET::ECalibApply& excep){ COMETError("Caught exception associated with calib. apply. " << "Function name: " << GetName() << " / Exception: " << excep.what() ); return 1; } return ret; } //====================================================================== // UsageOfCommonOptions //====================================================================== void ICalibApplyEventFunction::UsageOfCommonOptions() { std::cout << "Common Options for Calib. Apply:\n" << " Options common among all the calib. apply event functions named XXXX." << std::endl; // Describe options common among calib. apply event functions std::cout << std::endl << " -O XXXX-calibapply-disable Disable calib. apply function of XXXX.\n" << std::endl << std::endl; } //================================================================================ // SetCommonOption //================================================================================ bool ICalibApplyEventFunction::SetCommonOption(TString option, TString value) { if(option == "calibapply-disable"){ COMETInfo(GetFullName() << " is disabled."); Enable(kFALSE); } else return false; return true; } //====================================================================== // ApplyCalibration //====================================================================== int ICalibApplyEventFunction::ApplyCalibration(COMET::ICOMETEvent& event) { COMETWarn("No calibration is implemented by user code. " << event.GetName() ); return 1; }