102 std::array<std::string,6> mandatories = {{
"X",
"Y",
"Z",
"thetaX",
"thetaY",
"thetaZ"}};
103 std::vector<std::string> alignables;
109 if(
std::find(alignables.begin(), alignables.end(), alignableId) == alignables.end()) {
110 alignables.push_back(alignableId);
114 for (
auto& alignable : alignables){
123 std::vector<std::string> presentDOF;
126 std::vector< AlignPCLThreshold::coordThresholds > extraDOFs = std::vector< AlignPCLThreshold::coordThresholds >();
128 for(
auto& thePSet : m_parameters){
133 const double cutoff(thePSet.getParameter<
double>(
"cut"));
134 const double sigCut(thePSet.getParameter<
double>(
"sigCut"));
135 const double maxMoveCut(thePSet.getParameter<
double>(
"maxMoveCut"));
136 const double maxErrorCut(thePSet.getParameter<
double>(
"maxErrorCut"));
138 if (alignableId == alignable){
139 presentDOF.push_back(DOF);
163 edm::LogInfo(
"AlignPCLThresholdsWriter")<<
"Appending Extra degree of freeedom: "<< DOF <<
" " <<
mapOntoEnum(DOF) << std::endl;
166 extraDOFs.push_back(ExtraDOF);
177 for(
auto& mandatory : mandatories){
178 if(
std::find(presentDOF.begin(), presentDOF.end(), mandatory) == presentDOF.end()) {
179 edm::LogWarning(
"AlignPCLThresholdsWriter")<<
"Configuration for DOF: "<<mandatory<<
" for alignable "<< alignable <<
"is not present \n" 180 <<
"Will build object with defaults!" <<std::endl;
188 edm::LogInfo(
"AlignPCLThresholdsWriter")<<
"Content of AlignPCLThresholds "<<std::endl;
void setAlignPCLThreshold(const std::string &AlignableId, const AlignPCLThreshold &Threshold)
const std::vector< edm::ParameterSet > m_parameters
DOFs::dof mapOntoEnum(std::string coord)
const unsigned int m_minNrecords
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
unsigned long long Time_t
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
void setNRecords(const int &Nrecords)
const std::string m_record
cond::Time_t currentTime() const
AlignPCLThresholds * myThresholds
void setThresholds(float theCut, float theSigCut, float theErrorCut, float theMaxMoveCut, const std::string &theLabel)