21 |
|
#include <FWCore/Framework/interface/Event.h> |
22 |
|
#include <FWCore/Framework/interface/MakerMacros.h> |
23 |
|
#include "FWCore/ParameterSet/interface/ParameterSet.h" |
24 |
+ |
#include <FWCore/Utilities/interface/Exception.h> |
25 |
|
|
26 |
|
#include "DQMServices/Core/interface/DQMStore.h" |
27 |
|
#include "FWCore/ServiceRegistry/interface/Service.h" |
28 |
|
|
29 |
|
|
30 |
|
#include "TFile.h" |
31 |
+ |
#include <iostream> |
32 |
|
#include <string> |
33 |
|
|
34 |
|
class DTGeometry; |
65 |
|
void createSummaryAllPlots(); |
66 |
|
|
67 |
|
/// Get the histos |
68 |
< |
template <class T> T getHisto(std::string name); |
68 |
> |
template <class T> T* getHisto(std::string name); |
69 |
|
|
70 |
|
/// Create and save the gif files |
71 |
|
void createGifFile(std::string fileName, int wh, int sec, std::string tag, TCanvas *canvas); |
88 |
|
#endif |
89 |
|
|
90 |
|
template <class T> |
91 |
< |
T DTDPGCreateAnalyzerSummary::getHisto(std::string name) { |
92 |
< |
return static_cast<T>(myFile->Get((myMainFolder+name).c_str())); |
91 |
> |
T* DTDPGCreateAnalyzerSummary::getHisto(std::string name) { |
92 |
> |
T* t = static_cast<T*>(myFile->Get((myMainFolder+name).c_str())); |
93 |
> |
if(!t) { |
94 |
> |
throw cms::Exception("DTDPGCreateAnalyzerSummaryError")<< "[DTDPGCreateAnalyzerSummary]: Cannot get and convert histo " << name << " check for existence and correctness of the type" << std::endl; |
95 |
> |
} |
96 |
> |
return t; |
97 |
|
} |