128 edm::LogInfo(
"AlignPCLThresholdsWriter") <<
"Size of AlignPCLThresholds object " << myThresholds.size() << std::endl;
131 std::array<std::string, 6> mandatories = {{
"X",
"Y",
"Z",
"thetaX",
"thetaY",
"thetaZ"}};
132 std::vector<std::string> alignables;
138 if (
std::find(alignables.begin(), alignables.end(), alignableId) == alignables.end()) {
139 alignables.push_back(alignableId);
143 for (
auto& alignable : alignables) {
151 std::vector<std::string> presentDOF;
154 std::vector<AlignPCLThreshold::coordThresholds> extraDOFs = std::vector<AlignPCLThreshold::coordThresholds>();
160 const double cutoff(thePSet.getParameter<
double>(
"cut"));
161 const double sigCut(thePSet.getParameter<
double>(
"sigCut"));
162 const double maxMoveCut(thePSet.getParameter<
double>(
"maxMoveCut"));
163 const double maxErrorCut(thePSet.getParameter<
double>(
"maxErrorCut"));
165 if (alignableId == alignable) {
166 presentDOF.push_back(DOF);
190 <<
"Appending Extra degree of freeedom: " << DOF <<
" " <<
mapOntoEnum(DOF) << std::endl;
193 extraDOFs.push_back(ExtraDOF);
197 myThresholds.setAlignPCLThreshold(alignableId,
a);
204 <<
"Size of AlignPCLThresholds object " << myThresholds.size() << std::endl;
205 for (
auto& mandatory : mandatories) {
206 if (
std::find(presentDOF.begin(), presentDOF.end(), mandatory) == presentDOF.end()) {
208 <<
"Configuration for DOF: " << mandatory <<
" for alignable " << alignable <<
"is not present \n" 209 <<
"Will build object with defaults!" << std::endl;
217 edm::LogInfo(
"AlignPCLThresholdsWriter") <<
"Content of AlignPCLThresholds " << std::endl;
220 if constexpr (std::is_same_v<T, AlignPCLThresholdsHG>) {
225 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