test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DummyCondObjPrinter.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripESProducer_DummyCondObjPrinter_h
2 #define CalibTracker_SiStripESProducer_DummyCondObjPrinter_h
3 
4 // user include files
11 #include <string>
12 
13 
14 
15 template< typename TObject, typename TRecord>
17 
18 public:
19 
20  explicit DummyCondObjPrinter(const edm::ParameterSet& iConfig);
22  void analyze(const edm::Event& e, const edm::EventSetup&es);
23 
24 
25  private:
27  unsigned long long cacheID;
28 };
29 
30 template< typename TObject, typename TRecord>
32  edm::LogInfo("DummyCondObjPrinter") << "DummyCondObjPrinter constructor for typename " << typeid(TObject).name() << " and record " << typeid(TRecord).name() << std::endl;
33 }
34 
35 
36 template< typename TObject, typename TRecord>
38  edm::LogInfo("DummyCondObjPrinter") << "DummyCondObjPrinter::~DummyCondObjPrinter()" << std::endl;
39 }
40 
41 template< typename TObject,typename TRecord>
43 
44  if( cacheID == es.get<TRecord>().cacheIdentifier())
45  return;
46 
47  cacheID = es.get<TRecord>().cacheIdentifier();
48 
50  es.get<TRecord>().get( esobj );
51  std::stringstream sSummary, sDebug;
52  esobj->printSummary(sSummary);
53  esobj->printDebug(sDebug);
54 
55  // edm::LogInfo("DummyCondObjPrinter") << "\nPrintSummary \n" << sSummary.str() << std::endl;
56  // edm::LogWarning("DummyCondObjPrinter") << "\nPrintDebug \n" << sDebug.str() << std::endl;
57  edm::LogPrint("DummyCondObjContentPrinter") << "\nPrintSummary \n" << sSummary.str() << std::endl;
58  edm::LogVerbatim("DummyCondObjContentPrinter") << "\nPrintDebug \n" << sDebug.str() << std::endl;
59 }
60 
61 #endif
edm::ParameterSet iConfig_
void analyze(const edm::Event &e, const edm::EventSetup &es)
const T & get() const
Definition: EventSetup.h:56
DummyCondObjPrinter(const edm::ParameterSet &iConfig)
unsigned long long cacheID