62 virtual void endJob()
override ;
95 _selectedparts(iConfig.getUntrackedParameter<std::vector<std::
string> >(
"selectedPartitions",std::vector<std::
string>())),
96 _selectedvectorparts(iConfig.getUntrackedParameter<std::vector<std::
string> >(
"selectedVectorPartitions",std::vector<std::
string>())),
97 m_maxLS(iConfig.getUntrackedParameter<unsigned int>(
"maxLSBeforeRebin",125)),
98 m_LSfrac(iConfig.getUntrackedParameter<unsigned int>(
"startingLSFraction",16)),
99 m_rhm(consumesCollector()),
100 _hphases(),_hselectedphases(),_hselectedphasesvector(),_hselectedphasessize(),
101 _hphasevsorbit(),_hselectedphasevsorbit(),_hselectedphasevectorvsorbit(),
112 sprintf(hname,
"selected_phase_%s",
part->c_str());
113 edm::LogInfo(
"SelectedTH1FBeingBooked") <<
"TH1F " << hname <<
" being booked" ;
116 sprintf(hname,
"selected_phasevsorbit_%s",
part->c_str());
117 edm::LogInfo(
"SelectedTProfileBeingBooked") <<
"TProfile " << hname <<
" being booked" ;
126 sprintf(hname,
"selected_phase_vector_%s",
part->c_str());
127 edm::LogInfo(
"SelectedVectTH1FBeingBooked") <<
"TH1F " << hname <<
" being booked" ;
130 sprintf(hname,
"selected_phase_size_%s",
part->c_str());
131 edm::LogInfo(
"SelectedVectSizeTH1FBeingBooked") <<
"TH1F " << hname <<
" being booked" ;
134 sprintf(hname,
"selected_phasevectorvsorbit_%s",
part->c_str());
135 edm::LogInfo(
"SelectedVectTProfileBeingBooked") <<
"TProfile " << hname <<
" being booked" ;
171 for(std::map<std::string,int>::const_iterator phase = apvphases->get().begin(); phase != apvphases->get().end(); ++phase) {
175 sprintf(dirname,
"run_%d",iEvent.
run());
180 sprintf(hname,
"phase_%s",phase->first.c_str());
181 edm::LogInfo(
"TH1FBeingBooked") <<
"TH1F " << hname <<
" being booked" ;
182 _hphases[phase->first] = subrun.make<TH1F>(hname,hname,70,-0.5,69.5);
183 _hphases[phase->first]->GetXaxis()->SetTitle(
"BX mod 70");
_hphases[phase->first]->GetYaxis()->SetTitle(
"Events");
185 sprintf(hname,
"phasevsorbit_%s",phase->first.c_str());
186 edm::LogInfo(
"TProfileBeingBooked") <<
"TProfile " << hname <<
" being booked" ;
192 _hphases[phase->first]->Fill(phase->second);
210 const std::vector<int>
phases = apvphases->getPhases(*
part);
216 for(std::vector<int>::const_iterator phase=phases.begin();phase!=phases.end();++phase) {
239 if(*(
hist->second)) {
240 (*(
hist->second))->GetXaxis()->SetTitle(
"BX mod 70"); (*(
hist->second))->GetYaxis()->SetTitle(
"Events");
244 if(*(prof->second)) {
245 (*(prof->second))->SetCanExtend(TH1::kXaxis);
246 (*(prof->second))->GetXaxis()->SetTitle(
"time [orbit#]");
247 (*(prof->second))->GetYaxis()->SetTitle(
"Phase");
251 if(*(
hist->second)) {
252 (*(
hist->second))->GetXaxis()->SetTitle(
"BX mod 70"); (*(
hist->second))->GetYaxis()->SetTitle(
"Events");
256 if(*(
hist->second)) {
257 (*(
hist->second))->GetXaxis()->SetTitle(
"Number of Phases"); (*(
hist->second))->GetYaxis()->SetTitle(
"Events");
261 if(*(prof->second)) {
262 (*(prof->second))->SetCanExtend(TH1::kXaxis);
263 (*(prof->second))->GetXaxis()->SetTitle(
"time [orbit#]");
264 (*(prof->second))->GetYaxis()->SetTitle(
"Phase");
T getParameter(std::string const &) const
std::map< std::string, TH1F ** > _hselectedphasesvector
std::vector< std::string > _selectedparts
edm::EDGetTokenT< APVCyclePhaseCollection > _apvphasecollectionToken
std::map< std::string, TProfile ** > _hselectedphasevectorvsorbit
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::map< std::string, TProfile ** > _hselectedphasevsorbit
virtual void endJob() override
std::map< std::string, TH1F * > _hphases
virtual void endRun(const edm::Run &, const edm::EventSetup &) override
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
m_rhm(consumesCollector())
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
APVCyclePhaseMonitor(const edm::ParameterSet &)
std::map< std::string, TH1F ** > _hselectedphasessize
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
const unsigned int m_maxLS
std::vector< std::string > _selectedvectorparts
std::vector< int > phases
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
void beginRun(const edm::Run &iRun)
std::map< std::string, TH1F ** > _hselectedphases
virtual void beginJob() override
std::map< std::string, TProfile * > _hphasevsorbit
RunHistogramManager m_rhm
const unsigned int m_LSfrac