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");
99 descriptions.
add(
"SiPixelQualityProbabilitiesTestReader", desc);
EventNumber_t event() const
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const edm::EventSetup & c
std::map< unsigned int, probabilityVec > probabilityMap
const probabilityMap & getProbability_Map() const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string formatedOutput_
void setComment(std::string const &value)
SiPixelQualityProbabilitiesTestReader(edm::ParameterSet const &p)
~SiPixelQualityProbabilitiesTestReader() override
Log< level::Info, false > LogInfo
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
heterocontainer::HCTypeTag TypeTag
const edm::ESGetToken< SiPixelQualityProbabilities, SiPixelStatusScenarioProbabilityRcd > siPixelQPToken_
const TypeTag & type() const
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