94 _apvphasecollection(iConfig.getParameter<edm::InputTag>(
"apvCyclePhaseCollection")),
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 _hphases(),_hselectedphases(),_hselectedphasesvector(),_hselectedphasessize(),
100 _hphasevsorbit(),_hselectedphasevsorbit(),_hselectedphasevectorvsorbit(),
111 sprintf(hname,
"selected_phase_%s",
part->c_str());
112 edm::LogInfo(
"SelectedTH1FBeingBooked") <<
"TH1F " << hname <<
" being booked" ;
115 sprintf(hname,
"selected_phasevsorbit_%s",
part->c_str());
116 edm::LogInfo(
"SelectedTProfileBeingBooked") <<
"TProfile " << hname <<
" being booked" ;
125 sprintf(hname,
"selected_phase_vector_%s",
part->c_str());
126 edm::LogInfo(
"SelectedVectTH1FBeingBooked") <<
"TH1F " << hname <<
" being booked" ;
129 sprintf(hname,
"selected_phase_size_%s",
part->c_str());
130 edm::LogInfo(
"SelectedVectSizeTH1FBeingBooked") <<
"TH1F " << hname <<
" being booked" ;
133 sprintf(hname,
"selected_phasevectorvsorbit_%s",
part->c_str());
134 edm::LogInfo(
"SelectedVectTProfileBeingBooked") <<
"TProfile " << hname <<
" being booked" ;
170 for(std::map<std::string,int>::const_iterator phase = apvphases->get().begin(); phase != apvphases->get().end(); ++phase) {
174 sprintf(dirname,
"run_%d",iEvent.
run());
179 sprintf(hname,
"phase_%s",phase->first.c_str());
180 edm::LogInfo(
"TH1FBeingBooked") <<
"TH1F " << hname <<
" being booked" ;
181 _hphases[phase->first] = subrun.make<TH1F>(hname,hname,70,-0.5,69.5);
182 _hphases[phase->first]->GetXaxis()->SetTitle(
"BX mod 70");
_hphases[phase->first]->GetYaxis()->SetTitle(
"Events");
184 sprintf(hname,
"phasevsorbit_%s",phase->first.c_str());
185 edm::LogInfo(
"TProfileBeingBooked") <<
"TProfile " << hname <<
" being booked" ;
191 _hphases[phase->first]->Fill(phase->second);
209 const std::vector<int> phases = apvphases->getPhases(*
part);
215 for(std::vector<int>::const_iterator phase=phases.begin();phase!=phases.end();++phase) {
238 if(*(
hist->second)) {
239 (*(
hist->second))->GetXaxis()->SetTitle(
"BX mod 70"); (*(
hist->second))->GetYaxis()->SetTitle(
"Events");
243 if(*(prof->second)) {
244 (*(prof->second))->SetBit(TH1::kCanRebin);
245 (*(prof->second))->GetXaxis()->SetTitle(
"time [orbit#]");
246 (*(prof->second))->GetYaxis()->SetTitle(
"Phase");
250 if(*(
hist->second)) {
251 (*(
hist->second))->GetXaxis()->SetTitle(
"BX mod 70"); (*(
hist->second))->GetYaxis()->SetTitle(
"Events");
255 if(*(
hist->second)) {
256 (*(
hist->second))->GetXaxis()->SetTitle(
"Number of Phases"); (*(
hist->second))->GetYaxis()->SetTitle(
"Events");
260 if(*(prof->second)) {
261 (*(prof->second))->SetBit(TH1::kCanRebin);
262 (*(prof->second))->GetXaxis()->SetTitle(
"time [orbit#]");
263 (*(prof->second))->GetYaxis()->SetTitle(
"Phase");
std::map< std::string, TH1F ** > _hselectedphasesvector
std::vector< std::string > _selectedparts
std::map< std::string, TProfile ** > _hselectedphasevectorvsorbit
#define DEFINE_FWK_MODULE(type)
std::map< std::string, TProfile ** > _hselectedphasevsorbit
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)
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< std::string > _selectedvectorparts
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
const edm::InputTag _apvphasecollection
std::map< std::string, TProfile * > _hphasevsorbit
RunHistogramManager m_rhm
const unsigned int m_LSfrac