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[]
virtual std::pair< IntegratedCalibrationBase *, unsigned int > calibrationParamFromLabel(unsigned int label) const
static AlignableObjectId commonObjectIdProvider(const AlignableObjectId &, const AlignableObjectId &)
virtual unsigned int firstNonAlignableLabel() const
static const unsigned int theMinLabel
Log< level::Error, false > LogError
virtual unsigned int firstFreeLabel() const
static const unsigned int theMaxNumParam
virtual void addCalibrations(const std::vector< IntegratedCalibrationBase *> &iCals)
tell labeler to treat also integrated calibrations
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
virtual unsigned int calibrationLabel(const IntegratedCalibrationBase *calib, unsigned int paramNum) const
label for parameter 'paramNum' (counted from 0) of an integrated calibration
static const unsigned int theParamInstanceOffset
std::vector< std::pair< IntegratedCalibrationBase *, unsigned int > > theCalibrationLabels
pairs of calibrations and their first label
unsigned int parameterInstanceOffset() const
offset in labels between consecutive parameter instances of Alignable*s
virtual unsigned int maxNumberOfParameterInstances() const =0
returns the maximum number of instances for any parameter of an Alignable*