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
12 #include <string>
13 
14 
15 
16 template< typename TObject, typename TRecord>
18 
19 public:
20 
21  explicit DummyCondObjPrinter(const edm::ParameterSet& iConfig);
23  void analyze(const edm::Event& e, const edm::EventSetup&es);
24 
25 
26  private:
28  unsigned long long cacheID;
29 };
30 
31 template< typename TObject, typename TRecord>
33  edm::LogInfo("DummyCondObjPrinter") << "DummyCondObjPrinter constructor for typename " << typeid(TObject).name() << " and record " << typeid(TRecord).name() << std::endl;
34 }
35 
36 
37 template< typename TObject, typename TRecord>
39  edm::LogInfo("DummyCondObjPrinter") << "DummyCondObjPrinter::~DummyCondObjPrinter()" << std::endl;
40 }
41 
42 template< typename TObject,typename TRecord>
44 
45  if( cacheID == es.get<TRecord>().cacheIdentifier())
46  return;
47 
48  cacheID = es.get<TRecord>().cacheIdentifier();
49 
51  es.get<TRecord>().get( esobj );
52  std::stringstream sSummary, sDebug;
53  esobj->printSummary(sSummary);
54  esobj->printDebug(sDebug);
55 
56  edm::LogInfo("DummyCondObjPrinter") << "\nPrintSummary \n" << sSummary.str() << std::endl;
57  edm::LogWarning("DummyCondObjPrinter") << "\nPrintDebug \n" << sDebug.str() << std::endl;
58 }
59 
60 #endif
edm::ParameterSet iConfig_
void analyze(const edm::Event &e, const edm::EventSetup &es)
const T & get() const
Definition: EventSetup.h:55
DummyCondObjPrinter(const edm::ParameterSet &iConfig)
unsigned long long cacheID