30 printdebug_(p.getUntrackedParameter<bool>(
"printDebug",
true)),
31 formatedOutput_(p.getUntrackedParameter<std::
string>(
"outputFile",
"")) {
32 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"AlignPCLThresholdsReader" << std::endl;
36 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"~AlignPCLThresholdsReader " << std::endl;
40 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"### AlignPCLThresholdsReader::analyze ###" << std::endl;
41 edm::LogInfo(
"AlignPCLThresholdsReader") <<
" I AM IN RUN NUMBER " << e.
id().
run() << std::endl;
42 edm::LogInfo(
"AlignPCLThresholdsReader") <<
" ---EVENT NUMBER " << e.
id().
event() << std::endl;
49 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"Record \"AlignPCLThresholdsRcd"
50 <<
"\" does not exist " << std::endl;
55 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"got eshandle" << std::endl;
57 if (!thresholdHandle.
isValid()) {
58 edm::LogError(
"AlignPCLThresholdsReader") <<
" Could not get Handle" << std::endl;
63 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"got AlignPCLThresholds* " << std::endl;
64 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"print pointer address : ";
65 edm::LogInfo(
"AlignPCLThresholdsReader") << thresholds << std::endl;
67 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"Size " << thresholds->
size() << std::endl;
68 edm::LogInfo(
"AlignPCLThresholdsReader") <<
"Content of myThresholds " << std::endl;
74 FILE* pFile =
nullptr;
78 fprintf(pFile,
"AlignPCLThresholds::printAll() \n");
80 " ======================================================================================================="
82 fprintf(pFile,
"N records cut: %i \n", thresholds->
getNrecords());
86 for (
auto it = m_thresholds.begin(); it != m_thresholds.end(); ++it) {
88 " ====================================================================================================="
90 fprintf(pFile,
"key : %s \n ", (it->first).c_str());
91 fprintf(pFile,
"- Xcut : %8.3f um ", (it->second).getXcut());
92 fprintf(pFile,
"| sigXcut : %8.3f ", (it->second).getSigXcut());
93 fprintf(pFile,
"| maxMoveXcut : %8.3f um ", (it->second).getMaxMoveXcut());
94 fprintf(pFile,
"| ErrorXcut : %8.3f um\n ", (it->second).getErrorXcut());
96 fprintf(pFile,
"- thetaXcut : %8.3f urad ", (it->second).getThetaXcut());
97 fprintf(pFile,
"| sigThetaXcut : %8.3f ", (it->second).getSigThetaXcut());
98 fprintf(pFile,
"| maxMoveThetaXcut : %8.3f urad ", (it->second).getMaxMoveThetaXcut());
99 fprintf(pFile,
"| ErrorThetaXcut : %8.3f urad\n ", (it->second).getErrorThetaXcut());
101 fprintf(pFile,
"- Ycut : %8.3f um ", (it->second).getYcut());
102 fprintf(pFile,
"| sigYcut : %8.3f ", (it->second).getSigXcut());
103 fprintf(pFile,
"| maxMoveYcut : %8.3f um ", (it->second).getMaxMoveYcut());
104 fprintf(pFile,
"| ErrorYcut : %8.3f um\n ", (it->second).getErrorYcut());
106 fprintf(pFile,
"- thetaYcut : %8.3f urad ", (it->second).getThetaYcut());
107 fprintf(pFile,
"| sigThetaYcut : %8.3f ", (it->second).getSigThetaYcut());
108 fprintf(pFile,
"| maxMoveThetaYcut : %8.3f urad ", (it->second).getMaxMoveThetaYcut());
109 fprintf(pFile,
"| ErrorThetaYcut : %8.3f urad\n ", (it->second).getErrorThetaYcut());
111 fprintf(pFile,
"- Zcut : %8.3f um ", (it->second).getZcut());
112 fprintf(pFile,
"| sigZcut : %8.3f ", (it->second).getSigZcut());
113 fprintf(pFile,
"| maxMoveZcut : %8.3f um ", (it->second).getMaxMoveZcut());
114 fprintf(pFile,
"| ErrorZcut : %8.3f um\n ", (it->second).getErrorZcut());
116 fprintf(pFile,
"- thetaZcut : %8.3f urad ", (it->second).getThetaZcut());
117 fprintf(pFile,
"| sigThetaZcut : %8.3f ", (it->second).getSigThetaZcut());
118 fprintf(pFile,
"| maxMoveThetaZcut : %8.3f urad ", (it->second).getMaxMoveThetaZcut());
119 fprintf(pFile,
"| ErrorThetaZcut : %8.3f urad\n ", (it->second).getErrorThetaZcut());
121 if ((it->second).hasExtraDOF()) {
122 for (
unsigned int j = 0;
j < (it->second).extraDOFSize();
j++) {
125 "Extra DOF: %i with label %s \n ",
128 fprintf(pFile,
"- cut : %8.3f ", extraDOFCuts.at(0));
129 fprintf(pFile,
"| sigCut : %8.3f ", extraDOFCuts.at(1));
130 fprintf(pFile,
"| maxMoveCut : %8.3f ", extraDOFCuts.at(2));
131 fprintf(pFile,
"| maxErrorCut : %8.3f \n ", extraDOFCuts.at(3));
140 desc.
setComment(
"Reads payloads of type AlignPCLThresholds");
143 descriptions.
add(
"AlignPCLThresholdsReader", desc);
const threshold_map & getThreshold_Map() const
EventNumber_t event() const
const edm::EventSetup & c
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::map< std::string, AlignPCLThreshold > threshold_map
#define DEFINE_FWK_MODULE(type)
Log< level::Error, false > LogError
const edm::ESGetToken< AlignPCLThresholds, AlignPCLThresholdsRcd > thresholdToken_
~AlignPCLThresholdsReader() override
std::string getExtraDOFLabelForAlignable(const std::string &AlignableId, const unsigned int i) const
void setComment(std::string const &value)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
std::array< float, 4 > getExtraDOFCutsForAlignable(const std::string &AlignableId, const unsigned int i) const
const std::string formatedOutput_
Log< level::Info, false > LogInfo
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
AlignPCLThresholdsReader(edm::ParameterSet const &p)
const int & getNrecords() const
heterocontainer::HCTypeTag TypeTag
const TypeTag & type() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag