33 topLevelAlignables_(alignables),
38 unsigned int label)
const {
43 if (label >= iCal->second && label < iCal->
second + iCal->first->numParameters()) {
46 return std::make_pair(iCal->first, label - iCal->second);
49 edm::LogError(
"LogicError") <<
"@SUB=PedeLabelerBase::calibrationParamFromLabel" 50 <<
"Label " << label <<
"larger than first calibration's label, " 51 <<
"but no calibration fits!";
55 return std::pair<IntegratedCalibrationBase *, unsigned int>(
nullptr, 0);
63 nextId += iCal->first->numParameters();
77 throw cms::Exception(
"LogicError") <<
"PedeLabelerBase::calibrationLabel: " 78 <<
"nullPtr passed!\n";
83 if (iCal->first == calib) {
84 if (paramNum < iCal->
first->numParameters()) {
85 return iCal->second + paramNum;
87 edm::LogError(
"LogicError") <<
"@SUB=PedeLabelerBase::calibrationLabel" 88 <<
"IntegratedCalibration " << calib->
name() <<
" has only " 89 << iCal->first->numParameters() <<
" parameters, but " << paramNum <<
"requested!";
94 edm::LogError(
"LogicError") <<
"@SUB=PedeLabelerBase::calibrationLabel" 95 <<
"IntegratedCalibration " << calib->
name() <<
" not known or too few parameters.";
105 for (
auto iCal = iCals.begin(); iCal != iCals.end(); ++iCal) {
108 nextId += (*iCal)->numParameters();
110 edm::LogError(
"LogicError") <<
"@SUB=PedeLabelerBase::addCalibrations" 111 <<
"Ignoring nullPtr.";
const TimeTypeSpecs timeTypeSpecs[]
static AlignableObjectId commonObjectIdProvider(const AlignableObjectId &, const AlignableObjectId &)
static const unsigned int theMinLabel
const std::string & name() const
name of this calibration
virtual unsigned int firstNonAlignableLabel() const
virtual unsigned int maxNumberOfParameterInstances() const =0
returns the maximum number of instances for any parameter of an Alignable*
static const unsigned int theMaxNumParam
PedeLabelerBase(const TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
U second(std::pair< T, U > const &p)
AlignableTracker * aliTracker_
align::RunNumber RunNumber
unsigned int parameterInstanceOffset() const
offset in labels between consecutive parameter instances of Alignable*s
static const unsigned int theParamInstanceOffset
virtual unsigned int calibrationLabel(const IntegratedCalibrationBase *calib, unsigned int paramNum) const
label for parameter 'paramNum' (counted from 0) of an integrated calibration
virtual unsigned int firstFreeLabel() const
virtual void addCalibrations(const std::vector< IntegratedCalibrationBase * > &iCals)
tell labeler to treat also integrated calibrations
std::vector< std::pair< IntegratedCalibrationBase *, unsigned int > > theCalibrationLabels
pairs of calibrations and their first label
virtual std::pair< IntegratedCalibrationBase *, unsigned int > calibrationParamFromLabel(unsigned int label) const