69 vector<string>::const_iterator iTr =
trigSources.begin();
70 vector<string>::const_iterator trEnd =
trigSources.end();
71 vector<string>::const_iterator iHw =
hwSources.begin();
72 vector<string>::const_iterator hwEnd =
hwSources.end();
76 for (; iTr != trEnd; ++iTr) {
78 for (; iHw != hwEnd; ++iHw) {
80 std::vector<const DTChamber*>::const_iterator chambIt =
muonGeom->
chambers().begin();
81 std::vector<const DTChamber*>::const_iterator chambEnd =
muonGeom->
chambers().end();
82 for (; chambIt != chambEnd; ++chambIt) {
103 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw) {
105 std::vector<const DTChamber*>::const_iterator chambIt =
muonGeom->
chambers().begin();
106 std::vector<const DTChamber*>::const_iterator chambEnd =
muonGeom->
chambers().end();
107 for (; chambIt != chambEnd; ++chambIt) {
109 uint32_t indexCh = chId.
rawId();
117 std::map<std::string, MonitorElement*> innerME =
chambME[indexCh];
122 TF1 mypol8(
"mypol8",
"pol8");
123 getHisto<TH1F>(ratioH)->
Fit(&mypol8,
"CQO");
126 <<
" returned 0" << endl;
129 if (!numH || !denH) {
131 <<
"Test]: At least one of the required Histograms was not found for chamber " << chId
132 <<
". Peaks not computed" << endl;
135 <<
" is less than minEntries=" <<
minEntries <<
". Peaks not computed" << endl;
152 std::vector<const DTChamber*>::const_iterator chambIt =
muonGeom->
chambers().begin();
153 std::vector<const DTChamber*>::const_iterator chambEnd =
muonGeom->
chambers().end();
154 for (; chambIt != chambEnd; ++chambIt) {
157 int coarseDelay =
static_cast<int>(
165 TF1* fitF = ratioH->GetFunction(
"mypol8");
167 fineDelay = fitF->GetMaximumX(0,
bxTime);
171 <<
" is empty. Worst Phase value set to 0." << endl;
174 if (fineDiff || coarseDiff) {
179 fineDelay = wFine - fineDelay;
182 coarseDelay = wCoarse - coarseDelay;
188 std::vector<std::pair<DTTPGParametersId, DTTPGParametersData> >::const_iterator dbIt = delayMap.
begin();
189 std::vector<std::pair<DTTPGParametersId, DTTPGParametersData> >::const_iterator dbEnd = delayMap.
end();
190 for (; dbIt != dbEnd; ++dbIt) {
192 << (*dbIt).first.sectorId <<
" St " << (*dbIt).first.stationId <<
" has coarse " 193 << (*dbIt).second.nClock <<
" and phase " << (*dbIt).second.tPhase << std::endl;
196 string delayRecord =
"DTTPGParametersRcd";
221 return me->getFloatValue();
245 if (!subfolder.empty()) {
246 folder +=
"7" + subfolder;
253 uint32_t indexChId = chambId.
rawId();
edm::ESGetToken< DTTPGParameters, DTTPGParametersRcd > wPhaseMapToken_
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
constexpr int32_t ceil(float num)
std::vector< std::string > trigSources
T getParameter(std::string const &) const
static void writeToDB(std::string record, const T &payload)
std::string & topFolder()
Get top folder name.
virtual void setCurrentFolder(std::string const &fullpath)
const_iterator end() const
int set(int wheelId, int stationId, int sectorId, int nc, float ph, DTTimeUnits::type unit)
std::string ratioHistoTag
const DTTPGParameters * wPhaseMap
const_iterator begin() const
void runClientDiagnostic(DQMStore::IBooker &, DQMStore::IGetter &) override
DQM Client Diagnostic.
T getUntrackedParameter(std::string const &, T const &) const
int get(int wheelId, int stationId, int sectorId, int &nc, float &ph, DTTimeUnits::type unit) const
get content
Log< level::Warning, true > LogPrint
float getFloatFromME(DQMStore::IGetter &, DTChamberId chId, std::string meType)
Get float MEs.
std::string category()
Get message logger name.
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
edm::ParameterSet parameters
Log< level::Info, false > LogInfo
DTLocalTriggerSynchTest(const edm::ParameterSet &ps)
Constructor.
const DTGeometry * muonGeom
constexpr uint32_t rawId() const
get the raw id
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
begin Run
virtual MonitorElement * get(std::string const &fullpath) const
void makeRatioME(TH1F *numerator, TH1F *denominator, MonitorElement *result)
Compute efficiency plots.
std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId &chambid)
Get the ME name (by chamber)
const std::string & getName() const
get name of ME
std::map< uint32_t, std::map< std::string, MonitorElement * > > chambME
void bookChambHistos(DQMStore::IBooker &, DTChamberId chambId, std::string htype, std::string subfolder="")
Book the new MEs (for each chamber)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
int wheel() const
Return the wheel number.
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
Perform client diagnostic in online.
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::vector< std::string > hwSources
std::string fullName(std::string htype)
Create fullname from histo partial name.
~DTLocalTriggerSynchTest() override
Destructor.
Log< level::Error, true > LogProblem