29 topLevelAlignables_(alignables),
37 std::pair<IntegratedCalibrationBase*, unsigned int>
44 if (label >= iCal->second && label < iCal->
second + iCal->first->numParameters()) {
47 return std::make_pair(iCal->first, label - iCal->second);
50 edm::LogError(
"LogicError") <<
"@SUB=PedeLabelerBase::calibrationParamFromLabel" 51 <<
"Label " << label <<
"larger than first calibration's label, " 52 <<
"but no calibration fits!";
56 return std::pair<IntegratedCalibrationBase*, unsigned int>(0,0);
65 nextId += iCal->first->numParameters();
80 unsigned int paramNum)
const 83 throw cms::Exception(
"LogicError") <<
"PedeLabelerBase::calibrationLabel: " 84 <<
"nullPtr passed!\n";
89 if (iCal->first == calib) {
90 if (paramNum < iCal->
first->numParameters()) {
91 return iCal->second + paramNum;
94 <<
"@SUB=PedeLabelerBase::calibrationLabel" <<
"IntegratedCalibration " 95 << calib->
name() <<
" has only " << iCal->first->numParameters()
96 <<
" parameters, but " << paramNum <<
"requested!";
102 <<
"@SUB=PedeLabelerBase::calibrationLabel" <<
"IntegratedCalibration " 103 << calib->
name() <<
" not known or too few parameters.";
114 for (
auto iCal = iCals.begin(); iCal != iCals.end(); ++iCal) {
117 nextId += (*iCal)->numParameters();
120 <<
"@SUB=PedeLabelerBase::addCalibrations" <<
"Ignoring nullPtr.";
const TimeTypeSpecs timeTypeSpecs[]
std::vector< std::pair< IntegratedCalibrationBase *, unsigned int > > theCalibrationLabels
pairs of calibrations and their first label
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
virtual std::pair< IntegratedCalibrationBase *, unsigned int > calibrationParamFromLabel(unsigned int label) const