1 #ifndef ConfigurableAnalysis_Plotter_H
2 #define ConfigurableAnalysis_Plotter_H
38 std::vector<std::string> th1Names;
40 for (
unsigned int iH=0;iH!=th1Names.size();++iH){
52 std::vector<std::string> tprofNames;
54 for (
unsigned int iH=0;iH!=tprofNames.size();++iH){
66 std::vector<std::string> th2Names;
68 for (
unsigned int iH=0;iH!=th2Names.size();++iH){
84 if (!insertedDirectory.
dir){
102 SubDirectories::iterator subDirectoryFindIterator=currentSetOfSubDirectories.find(subDir);
105 if (subDirectoryFindIterator==currentSetOfSubDirectories.end()){
107 SubDirectory & insertedDir = currentSetOfSubDirectories[subDir];
108 subDirectoryToUse = &insertedDir;
109 if (!insertedDir.
dir){
115 DirectoryHistos::iterator masterHistogramIterator=
master_.begin();
116 DirectoryHistos::iterator masterHistogramIterator_end=
master_.end();
117 for (; masterHistogramIterator!=masterHistogramIterator_end;++masterHistogramIterator)
120 insertedDir.
histos[masterHistogramIterator->first]=masterHistogramIterator->second->clone();
124 DirectoryHistos::iterator clonedHistogramIterator=insertedDir.
histos.begin();
125 DirectoryHistos::iterator clonedHistogramIterator_end=insertedDir.
histos.end();
126 for (; clonedHistogramIterator!=clonedHistogramIterator_end;++clonedHistogramIterator)
128 clonedHistogramIterator->second->book(insertedDir.
dir);
132 subDirectoryToUse=&subDirectoryFindIterator->second;
136 DirectoryHistos::iterator histogramIterator=subDirectoryToUse->
histos.begin();
137 DirectoryHistos::iterator histogramIterator_end=subDirectoryToUse->
histos.end();
138 for(; histogramIterator!=histogramIterator_end;++histogramIterator)
139 { histogramIterator->second->fill(iEvent); }
173 for (;dir_It!=dir_It_end;++dir_It){
174 Directory & currentDirectory=dir_It->second;
176 SubDirectories::iterator subDir_It = currentSetOfSubDirectories.begin();
177 SubDirectories::iterator subDir_It_end = currentSetOfSubDirectories.end();
179 for (;subDir_It!=subDir_It_end;++subDir_It){
180 DirectoryHistos::iterator histogramIterator=subDir_It->second.histos.begin();
181 DirectoryHistos::iterator histogramIterator_end=subDir_It->second.histos.end();
183 for(; histogramIterator!=histogramIterator_end;++histogramIterator)
184 { histogramIterator->second->complete(); }
T getParameter(std::string const &) const
void fill(std::string subDir, const edm::Event &iEvent)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::map< std::string, Directory > Directories
std::map< std::string, ConfigurableHisto * > DirectoryHistos
edmplugin::PluginFactory< Plotter *(const edm::ParameterSet &) > PlotterFactory
VariablePlotter(const edm::ParameterSet &iConfig)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
void setDir(std::string dir)
Plotter(const edm::ParameterSet &iConfig)
std::map< std::string, SubDirectory > SubDirectories
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
virtual void fill(std::string subDir, const edm::Event &iEvent)=0
virtual void complete()=0
virtual void setDir(std::string dir)=0