/*************************************************************************** PInstrumentDef.cpp Author: Andreas Suter e-mail: andreas.suter@psi.ch ***************************************************************************/ /*************************************************************************** * Copyright (C) 2007-2020 by Andreas Suter * * andreas.suter@psi.ch * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "PInstrumentDef.h" //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /** * */ PSetup::PSetup() { fName = ""; fNoOfDetectors = -1; fFgbOffset = -1; fLgb = -1; fBkgStartBin = -1; fBkgEndBin = -1; } //-------------------------------------------------------------------------- /** * @brief PSetup::getDetector * @param idx * @return */ PDetector* PSetup::getDetector(int idx) { if (idx >= fLogicDetectors.size()) return 0; return &fLogicDetectors[idx]; } //-------------------------------------------------------------------------- /** * @brief PSetup::getAsymDetector * @param idx * @return */ PDetector* PSetup::getAsymDetector(int idx) { if (idx >= fLogicAsymDetectors.size()) return 0; return &fLogicAsymDetectors[idx]; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /** * */ PInstrument::PInstrument() { fRunNameTemplate = ""; fBeamline = ""; fDataFileFormat = ""; fInstitue = ""; fName = ""; } //-------------------------------------------------------------------------- /** * @brief PInstrument::getZFSetup * @param name * @return */ PSetup* PInstrument::getZFSetup(QString name) { for (int i=0; i