32 printdebug_(
p.getUntrackedParameter<
bool>(
"printDebug",
true)),
33 formatedOutput_(
p.getUntrackedParameter<
std::
string>(
"outputFile",
"")) {
34 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
"SiPixelQualityProbabilitiesTestReader" << std::endl;
38 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
"~SiPixelQualityProbabilitiesTestReader " << std::endl;
43 <<
"### SiPixelQualityProbabilitiesTestReader::analyze ###" << std::endl;
44 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
" I AM IN RUN NUMBER " <<
e.id().run() << std::endl;
45 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
" ---EVENT NUMBER " <<
e.id().event() << std::endl;
52 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
"Record \"SiPixelStatusScenarioProbabilityRcd" 53 <<
"\" does not exist " << std::endl;
58 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
"got eshandle from context" << std::endl;
61 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
"got SiPixelQualityProbabilities* " << std::endl;
62 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
"print pointer address : " << myProbabilities << std::endl;
64 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
"Size " << myProbabilities->
size() << std::endl;
65 edm::LogInfo(
"SiPixelQualityProbabilitiesTestReader") <<
"Content of my Probabilities " << std::endl;
71 FILE* pFile =
nullptr;
75 fprintf(pFile,
"SiPixelQualityProbabilities::printAll() \n");
77 " =========================================================================================================" 82 for (
auto it = m_probabilities.begin();
it != m_probabilities.end(); ++
it) {
84 " =======================================================================================================" 86 fprintf(pFile,
"PU bin : %i \n ", (
it->first));
87 for (
const auto&
entry :
it->second) {
88 fprintf(pFile,
"Quality snapshot %s, probability %f \n", (
entry.first).c_str(),
entry.second);
96 desc.setComment(
"Reads payloads of type SiPixelQualityProbabilities");
97 desc.addUntracked<
bool>(
"printDebug",
true);
99 descriptions.
add(
"SiPixelQualityProbabilitiesTestReader",
desc);
const TypeTag & type() const
void analyze(const edm::Event &e, const edm::EventSetup &c) override
std::map< unsigned int, probabilityVec > probabilityMap
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string formatedOutput_
T const * product() const
SiPixelQualityProbabilitiesTestReader(edm::ParameterSet const &p)
#define DEFINE_FWK_MODULE(type)
~SiPixelQualityProbabilitiesTestReader() override
Log< level::Info, false > LogInfo
const probabilityMap & getProbability_Map() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
heterocontainer::HCTypeTag TypeTag
const edm::ESGetToken< SiPixelQualityProbabilities, SiPixelStatusScenarioProbabilityRcd > siPixelQPToken_
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag