127 edm::LogInfo(
"AlignPCLThresholdsWriter") <<
"Size of AlignPCLThresholds object " << myThresholds.size() << std::endl;
130 std::array<std::string, 6> mandatories = {{
"X",
"Y",
"Z",
"thetaX",
"thetaY",
"thetaZ"}};
131 std::vector<std::string> alignables;
137 if (
std::find(alignables.begin(), alignables.end(), alignableId) == alignables.end()) {
138 alignables.push_back(alignableId);
142 for (
auto& alignable : alignables) {
150 std::vector<std::string> presentDOF;
153 std::vector<AlignPCLThreshold::coordThresholds> extraDOFs = std::vector<AlignPCLThreshold::coordThresholds>();
159 const double cutoff(thePSet.getParameter<
double>(
"cut"));
160 const double sigCut(thePSet.getParameter<
double>(
"sigCut"));
161 const double maxMoveCut(thePSet.getParameter<
double>(
"maxMoveCut"));
162 const double maxErrorCut(thePSet.getParameter<
double>(
"maxErrorCut"));
164 if (alignableId == alignable) {
165 presentDOF.push_back(DOF);
189 <<
"Appending Extra degree of freeedom: " << DOF <<
" " <<
mapOntoEnum(DOF) << std::endl;
192 extraDOFs.push_back(ExtraDOF);
196 myThresholds.setAlignPCLThreshold(alignableId,
a);
203 <<
"Size of AlignPCLThresholds object " << myThresholds.size() << std::endl;
204 for (
auto& mandatory : mandatories) {
205 if (
std::find(presentDOF.begin(), presentDOF.end(), mandatory) == presentDOF.end()) {
207 <<
"Configuration for DOF: " << mandatory <<
" for alignable " << alignable <<
"is not present \n" 208 <<
"Will build object with defaults!" << std::endl;
216 edm::LogInfo(
"AlignPCLThresholdsWriter") <<
"Content of AlignPCLThresholds " << std::endl;
219 if constexpr (std::is_same_v<T, AlignPCLThresholdsHG>) {
224 myThresholds.printAll();
const std::string m_record
void storeHGthresholds(AlignPCLThresholdsHG &myThresholds, const std::vector< std::string > &alignables)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
unsigned long long Time_t
cond::Time_t currentTime() const
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
Log< level::Info, false > LogInfo
const unsigned int m_minNrecords
DOFs::dof mapOntoEnum(std::string coord)
Log< level::Warning, false > LogWarning
void setThresholds(float theCut, float theSigCut, float theErrorCut, float theMaxMoveCut, const std::string &theLabel)
const std::vector< edm::ParameterSet > m_parameters