CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DTLocalTriggerBaseTest Class Referenceabstract

#include <DTLocalTriggerBaseTest.h>

Inheritance diagram for DTLocalTriggerBaseTest:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper DTLocalTriggerEfficiencyTest DTLocalTriggerLutTest DTLocalTriggerSynchTest DTLocalTriggerTest DTLocalTriggerTPTest DTTriggerEfficiencyTest DTTriggerLutTest

Public Member Functions

 DTLocalTriggerBaseTest ()
 Constructor. More...
 
 ~DTLocalTriggerBaseTest () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void beginRun (edm::Run const &run, edm::EventSetup const &context) override
 BeginRun. More...
 
void bookCmsHistos (DQMStore::IBooker &, std::string hTag, std::string folder="", bool isGlb=false)
 Book the new MEs (CMS summary) More...
 
void bookSectorHistos (DQMStore::IBooker &, int wheel, int sector, std::string hTag, std::string folder="")
 Book the new MEs (for each sector) More...
 
void bookWheelHistos (DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
 Book the new MEs (for each wheel) More...
 
std::string category ()
 Get message logger name. More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 Perform client diagnostic in online. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &context) override
 Perform client diagnostic in offline. More...
 
std::string fullName (std::string htype)
 Create fullname from histo partial name. More...
 
template<class T >
TgetHisto (MonitorElement *me)
 Convert ME to Histogram fo type T. More...
 
std::string getMEName (std::string histoTag, std::string subfolder, const DTChamberId &chambid)
 Get the ME name (by chamber) More...
 
std::string getMEName (std::string histoTag, std::string subfolder, int wh)
 Get the ME name (by wheel) More...
 
std::pair< float, float > phiRange (const DTChamberId &id)
 Calculate phi range for histograms. More...
 
virtual void runClientDiagnostic (DQMStore::IBooker &, DQMStore::IGetter &)=0
 Perform client analysis. More...
 
void setConfig (const edm::ParameterSet &ps, std::string name)
 Set configuration variables. More...
 
std::string & topFolder ()
 Get top folder name. More...
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Protected Attributes

std::string baseFolderTM
 
std::map< std::string, MonitorElement * > cmsME
 
std::string hwSource
 
std::vector< std::string > hwSources
 
const DTGeometrymuonGeom
 
edm::ESGetToken< DTGeometry, MuonGeometryRecordmuonGeomToken_
 
int nevents
 
unsigned int nLumiSegs
 
edm::ParameterSet parameters
 
int prescaleFactor
 
int run
 
bool runOnline
 
std::map< int, std::map< std::string, MonitorElement * > > secME
 
std::string sourceFolder
 
std::string testName
 
std::string trigSource
 
std::vector< std::string > trigSources
 
std::map< int, std::map< std::string, MonitorElement * > > whME
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 38 of file DTLocalTriggerBaseTest.h.

Constructor & Destructor Documentation

◆ DTLocalTriggerBaseTest()

DTLocalTriggerBaseTest::DTLocalTriggerBaseTest ( )
inline

Constructor.

Definition at line 41 of file DTLocalTriggerBaseTest.h.

41 : muonGeomToken_(esConsumes<edm::Transition::BeginRun>()){};
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_

◆ ~DTLocalTriggerBaseTest()

DTLocalTriggerBaseTest::~DTLocalTriggerBaseTest ( )
override

Destructor.

Definition at line 32 of file DTLocalTriggerBaseTest.cc.

References validateAlignments::category, createIOVlist::nevents, and L1TBPTX_cfi::testName.

32  {
33  LogVerbatim(category()) << "[" << testName << "Test]: analyzed " << nevents << " events";
34 }
Log< level::Info, true > LogVerbatim
std::string category()
Get message logger name.

Member Function Documentation

◆ beginRun()

void DTLocalTriggerBaseTest::beginRun ( edm::Run const &  run,
edm::EventSetup const &  context 
)
overrideprotected

◆ bookCmsHistos()

void DTLocalTriggerBaseTest::bookCmsHistos ( DQMStore::IBooker ,
std::string  hTag,
std::string  folder = "",
bool  isGlb = false 
)
protected

Book the new MEs (CMS summary)

Definition at line 193 of file DTLocalTriggerBaseTest.cc.

References makeHippyCampaign::basedir, dqm::implementation::IBooker::book2D(), validateAlignments::category, printsummarytable::folder, newFWLiteAna::fullName, LogTrace, hlt_dqm_clientPB-live_cfg::me, dqm::implementation::NavigatorBase::setCurrentFolder(), and L1TBPTX_cfi::testName.

193  {
194  string basedir = topFolder();
195  if (!folder.empty()) {
196  basedir += folder + "/";
197  }
198 
199  ibooker.setCurrentFolder(basedir);
200 
201  string hname = isGlb ? hTag : fullName(hTag);
202  LogTrace(category()) << "[" << testName << "Test]: booking " << basedir << hname;
203 
204  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 12, 1, 13, 5, -2, 3);
205  me->setAxisTitle("Sector", 1);
206  me->setAxisTitle("Wheel", 2);
207  cmsME[hname] = me;
208 }
std::string & topFolder()
Get top folder name.
#define LogTrace(id)
std::string category()
Get message logger name.
std::map< std::string, MonitorElement * > cmsME
std::string fullName(std::string htype)
Create fullname from histo partial name.

◆ bookSectorHistos()

void DTLocalTriggerBaseTest::bookSectorHistos ( DQMStore::IBooker ,
int  wheel,
int  sector,
std::string  hTag,
std::string  folder = "" 
)
protected

Book the new MEs (for each sector)

Definition at line 133 of file DTLocalTriggerBaseTest.cc.

References makeHippyCampaign::basedir, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), validateAlignments::category, printsummarytable::folder, newFWLiteAna::fullName, LogTrace, hlt_dqm_clientPB-live_cfg::me, hgcalTBTopologyTester_cfi::sector, dqm::implementation::NavigatorBase::setCurrentFolder(), L1TBPTX_cfi::testName, and makeMuonMisalignmentScenario::wheel.

Referenced by DTLocalTriggerEfficiencyTest::Bookings(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().

134  {
135  stringstream wh;
136  wh << wheel;
137  stringstream sc;
138  sc << sector;
139  int sectorid = (wheel + 3) + (sector - 1) * 5;
140  string basedir = topFolder() + "Wheel" + wh.str() + "/Sector" + sc.str() + "/";
141  if (!folder.empty()) {
142  basedir += folder + "/";
143  }
144 
145  ibooker.setCurrentFolder(basedir);
146 
147  string fullTag = fullName(hTag);
148  string hname = fullTag + "_W" + wh.str() + "_Sec" + sc.str();
149  LogTrace(category()) << "[" << testName << "Test]: booking " << basedir << hname;
150  if (hTag.find("BXDistribPhi") != string::npos) {
151  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 25, -4.5, 20.5, 4, 0.5, 4.5);
152  me->setBinLabel(1, "MB1", 2);
153  me->setBinLabel(2, "MB2", 2);
154  me->setBinLabel(3, "MB3", 2);
155  me->setBinLabel(4, "MB4", 2);
156  secME[sectorid][fullTag] = me;
157  return;
158  } else if (hTag.find("QualDistribPhi") != string::npos) {
159  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 7, -0.5, 6.5, 4, 0.5, 4.5);
160  me->setBinLabel(1, "MB1", 2);
161  me->setBinLabel(2, "MB2", 2);
162  me->setBinLabel(3, "MB3", 2);
163  me->setBinLabel(4, "MB4", 2);
164  me->setBinLabel(1, "LI", 1);
165  me->setBinLabel(2, "LO", 1);
166  me->setBinLabel(3, "HI", 1);
167  me->setBinLabel(4, "HO", 1);
168  me->setBinLabel(5, "LL", 1);
169  me->setBinLabel(6, "HL", 1);
170  me->setBinLabel(7, "HH", 1);
171  secME[sectorid][fullTag] = me;
172  return;
173  } else if (hTag.find("Phi") != string::npos || hTag.find("TkvsTrig") != string::npos) {
174  MonitorElement* me = ibooker.book1D(hname.c_str(), hname.c_str(), 4, 0.5, 4.5);
175  me->setBinLabel(1, "MB1", 1);
176  me->setBinLabel(2, "MB2", 1);
177  me->setBinLabel(3, "MB3", 1);
178  me->setBinLabel(4, "MB4", 1);
179  secME[sectorid][fullTag] = me;
180  return;
181  }
182 
183  if (hTag.find("Theta") != string::npos) {
184  MonitorElement* me = ibooker.book1D(hname.c_str(), hname.c_str(), 3, 0.5, 3.5);
185  me->setBinLabel(1, "MB1", 1);
186  me->setBinLabel(2, "MB2", 1);
187  me->setBinLabel(3, "MB3", 1);
188  secME[sectorid][fullTag] = me;
189  return;
190  }
191 }
std::string & topFolder()
Get top folder name.
#define LogTrace(id)
std::string category()
Get message logger name.
std::map< int, std::map< std::string, MonitorElement * > > secME
std::string fullName(std::string htype)
Create fullname from histo partial name.

◆ bookWheelHistos()

void DTLocalTriggerBaseTest::bookWheelHistos ( DQMStore::IBooker ,
int  wheel,
std::string  hTag,
std::string  folder = "" 
)
protected

Book the new MEs (for each wheel)

Definition at line 210 of file DTLocalTriggerBaseTest.cc.

References makeHippyCampaign::basedir, dqm::implementation::IBooker::book2D(), validateAlignments::category, printsummarytable::folder, newFWLiteAna::fullName, LogTrace, hlt_dqm_clientPB-live_cfg::me, dqm::implementation::NavigatorBase::setCurrentFolder(), L1TBPTX_cfi::testName, and makeMuonMisalignmentScenario::wheel.

Referenced by DTLocalTriggerEfficiencyTest::Bookings(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().

210  {
211  stringstream wh;
212  wh << wheel;
213  string basedir;
214  if (hTag.find("Summary") != string::npos) {
215  basedir = topFolder(); //Book summary histo outside wheel directories
216  } else {
217  basedir = topFolder() + "Wheel" + wh.str() + "/";
218  }
219  if (!folder.empty()) {
220  basedir += folder + "/";
221  }
222 
223  ibooker.setCurrentFolder(basedir);
224 
225  string fullTag = fullName(hTag);
226  string hname = fullTag + "_W" + wh.str();
227 
228  LogTrace(category()) << "[" << testName << "Test]: booking " << basedir << hname;
229 
230  if (hTag.find("Phi") != string::npos || hTag.find("Summary") != string::npos) {
231  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 12, 1, 13, 4, 1, 5);
232 
233  // setLabelPh(me);
234  me->setBinLabel(1, "MB1", 2);
235  me->setBinLabel(2, "MB2", 2);
236  me->setBinLabel(3, "MB3", 2);
237  me->setBinLabel(4, "MB4", 2);
238  me->setAxisTitle("Sector", 1);
239 
240  whME[wheel][fullTag] = me;
241  return;
242  }
243 
244  if (hTag.find("Theta") != string::npos) {
245  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 12, 1, 13, 3, 1, 4);
246 
247  // setLabelTh(me);
248  me->setBinLabel(1, "MB1", 2);
249  me->setBinLabel(2, "MB2", 2);
250  me->setBinLabel(3, "MB3", 2);
251  me->setAxisTitle("Sector", 1);
252 
253  whME[wheel][fullTag] = me;
254  return;
255  }
256 }
std::string & topFolder()
Get top folder name.
#define LogTrace(id)
std::map< int, std::map< std::string, MonitorElement * > > whME
std::string category()
Get message logger name.
std::string fullName(std::string htype)
Create fullname from histo partial name.

◆ category()

std::string DTLocalTriggerBaseTest::category ( void  )
inlineprotected

◆ dqmEndJob()

void DTLocalTriggerBaseTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Reimplemented in DTLocalTriggerSynchTest.

Definition at line 64 of file DTLocalTriggerBaseTest.cc.

References validateAlignments::category, LogTrace, dtDQMOfflineClients_cff::runOnline, and L1TBPTX_cfi::testName.

Referenced by DTLocalTriggerSynchTest::dqmEndJob().

64  {
65  LogTrace(category()) << "[" << testName << "Test] endJob called!";
66 
67  if (!runOnline) {
68  LogVerbatim(category()) << "[" << testName << "Test] Client called in offline mode, performing client operations";
69  runClientDiagnostic(ibooker, igetter);
70  }
71 }
Log< level::Info, true > LogVerbatim
#define LogTrace(id)
std::string category()
Get message logger name.
virtual void runClientDiagnostic(DQMStore::IBooker &, DQMStore::IGetter &)=0
Perform client analysis.

◆ dqmEndLuminosityBlock()

void DTLocalTriggerBaseTest::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

Perform client diagnostic in online.

Reimplemented from DQMEDHarvester.

Reimplemented in DTLocalTriggerSynchTest.

Definition at line 44 of file DTLocalTriggerBaseTest.cc.

References Skims_PDWG_cff::prescaleFactor, dtDQMOfflineClients_cff::runOnline, and L1TBPTX_cfi::testName.

47  {
48  if (!runOnline)
49  return;
50 
51  LogVerbatim("DTDQM|DTMonitorClient|DTLocalTriggerTest")
52  << "[" << testName << "Test]: End of LS transition, performing the DQM client operation";
53 
54  // counts number of lumiSegs and prescale
55  nLumiSegs++;
56  if (nLumiSegs % prescaleFactor != 0)
57  return;
58 
59  LogVerbatim("DTDQM|DTMonitorClient|DTLocalTriggerTest") << "[" << testName << "Test]: " << nLumiSegs << " updates";
60 
61  runClientDiagnostic(ibooker, igetter);
62 }
Log< level::Info, true > LogVerbatim
virtual void runClientDiagnostic(DQMStore::IBooker &, DQMStore::IGetter &)=0
Perform client analysis.

◆ endRun()

void DTLocalTriggerBaseTest::endRun ( edm::Run const &  run,
edm::EventSetup const &  context 
)
overrideprotected

Perform client diagnostic in offline.

Definition at line 73 of file DTLocalTriggerBaseTest.cc.

References validateAlignments::category, LogTrace, and L1TBPTX_cfi::testName.

73  {
74  LogTrace(category()) << "[" << testName << "Test] endRun called!";
75 }
#define LogTrace(id)
std::string category()
Get message logger name.

◆ fullName()

string DTLocalTriggerBaseTest::fullName ( std::string  htype)
protected

◆ getHisto()

template<class T >
T * DTLocalTriggerBaseTest::getHisto ( MonitorElement me)
protected

Convert ME to Histogram fo type T.

Definition at line 121 of file DTLocalTriggerBaseTest.h.

References hlt_dqm_clientPB-live_cfg::me.

121  {
122  return me ? dynamic_cast<T*>(me->getRootObject()) : nullptr;
123 }
long double T

◆ getMEName() [1/2]

std::string DTLocalTriggerBaseTest::getMEName ( std::string  histoTag,
std::string  subfolder,
const DTChamberId chambid 
)
protected

◆ getMEName() [2/2]

std::string DTLocalTriggerBaseTest::getMEName ( std::string  histoTag,
std::string  subfolder,
int  wh 
)
protected

Get the ME name (by wheel)

◆ phiRange()

pair< float, float > DTLocalTriggerBaseTest::phiRange ( const DTChamberId id)
protected

Calculate phi range for histograms.

Definition at line 258 of file DTLocalTriggerBaseTest.cc.

References DTTopology::firstChannel(), DTTopology::lastChannel(), edm::max(), edm::min(), GeomDet::position(), hgcalTBTopologyTester_cfi::sector, DTLayer::specificTopology(), relativeConstraints::station, makeMuonMisalignmentScenario::wheel, DTTopology::wirePosition(), and x.

258  {
259  float min, max;
260  int station = id.station();
261  int sector = id.sector();
262  int wheel = id.wheel();
263 
264  const DTLayer* layer = muonGeom->layer(DTLayerId(id, 1, 1));
265  const DTTopology& topo = layer->specificTopology();
266  min = topo.wirePosition(topo.firstChannel());
267  max = topo.wirePosition(topo.lastChannel());
268 
269  if (station == 4) {
270  const DTLayer* layer2;
271  float lposx;
272 
273  if (sector == 4) {
274  layer2 = muonGeom->layer(DTLayerId(wheel, station, 13, 1, 1));
275  lposx = layer->toLocal(layer2->position()).x();
276  } else if (sector == 10) {
277  layer2 = muonGeom->layer(DTLayerId(wheel, station, 14, 1, 1));
278  lposx = layer->toLocal(layer2->position()).x();
279  } else
280  return make_pair(min, max);
281 
282  DTTopology topo2 = layer2->specificTopology();
283 
284  if (lposx > 0) {
285  max = lposx * .5 + topo2.wirePosition(topo2.lastChannel());
286  min -= lposx * .5;
287  } else {
288  min = lposx * .5 + topo2.wirePosition(topo2.firstChannel());
289  max -= lposx * .5;
290  }
291  }
292 
293  return make_pair(min, max);
294 }
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:79
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:81
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:63
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96

◆ runClientDiagnostic()

virtual void DTLocalTriggerBaseTest::runClientDiagnostic ( DQMStore::IBooker ,
DQMStore::IGetter  
)
protectedpure virtual

◆ setConfig()

void DTLocalTriggerBaseTest::setConfig ( const edm::ParameterSet ps,
std::string  name 
)
protected

Set configuration variables.

Definition at line 77 of file DTLocalTriggerBaseTest.cc.

References validateAlignments::category, edm::ParameterSet::getUntrackedParameter(), dtFineDelayCorr_cfi::hwSources, LogTrace, Skims_PA_cff::name, createIOVlist::nevents, Skims_PDWG_cff::prescaleFactor, dtDQMOfflineClients_cff::runOnline, and L1TBPTX_cfi::testName.

Referenced by DTLocalTriggerEfficiencyTest::DTLocalTriggerEfficiencyTest(), and DTLocalTriggerSynchTest::DTLocalTriggerSynchTest().

77  {
78  testName = name;
79 
80  LogTrace(category()) << "[" << testName << "Test]: Constructor";
81 
82  sourceFolder = ps.getUntrackedParameter<string>("folderRoot", "");
83  runOnline = ps.getUntrackedParameter<bool>("runOnline", true);
84  hwSources = ps.getUntrackedParameter<vector<string> >("hwSources");
85 
86  if (ps.getUntrackedParameter<bool>("localrun", true)) {
87  trigSources.push_back("");
88  } else {
89  trigSources = ps.getUntrackedParameter<vector<string> >("trigSources");
90  }
91 
92  parameters = ps;
93  nevents = 0;
94 
95  prescaleFactor = parameters.getUntrackedParameter<int>("diagnosticPrescale", 1);
96 }
std::vector< std::string > trigSources
#define LogTrace(id)
T getUntrackedParameter(std::string const &, T const &) const
std::string category()
Get message logger name.
std::vector< std::string > hwSources

◆ topFolder()

std::string& DTLocalTriggerBaseTest::topFolder ( )
inlineprotected

Member Data Documentation

◆ baseFolderTM

std::string DTLocalTriggerBaseTest::baseFolderTM
protected

◆ cmsME

std::map<std::string, MonitorElement*> DTLocalTriggerBaseTest::cmsME
protected

Definition at line 117 of file DTLocalTriggerBaseTest.h.

◆ hwSource

std::string DTLocalTriggerBaseTest::hwSource
protected

◆ hwSources

std::vector<std::string> DTLocalTriggerBaseTest::hwSources
protected

◆ muonGeom

const DTGeometry* DTLocalTriggerBaseTest::muonGeom
protected

◆ muonGeomToken_

edm::ESGetToken<DTGeometry, MuonGeometryRecord> DTLocalTriggerBaseTest::muonGeomToken_
protected

Definition at line 113 of file DTLocalTriggerBaseTest.h.

◆ nevents

int DTLocalTriggerBaseTest::nevents
protected

Definition at line 96 of file DTLocalTriggerBaseTest.h.

◆ nLumiSegs

unsigned int DTLocalTriggerBaseTest::nLumiSegs
protected

Definition at line 99 of file DTLocalTriggerBaseTest.h.

◆ parameters

edm::ParameterSet DTLocalTriggerBaseTest::parameters
protected

◆ prescaleFactor

int DTLocalTriggerBaseTest::prescaleFactor
protected

Definition at line 100 of file DTLocalTriggerBaseTest.h.

◆ run

int DTLocalTriggerBaseTest::run
protected

◆ runOnline

bool DTLocalTriggerBaseTest::runOnline
protected

Definition at line 108 of file DTLocalTriggerBaseTest.h.

◆ secME

std::map<int, std::map<std::string, MonitorElement*> > DTLocalTriggerBaseTest::secME
protected

◆ sourceFolder

std::string DTLocalTriggerBaseTest::sourceFolder
protected

Definition at line 106 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerSynchTest::getFloatFromME().

◆ testName

std::string DTLocalTriggerBaseTest::testName
protected

◆ trigSource

std::string DTLocalTriggerBaseTest::trigSource
protected

◆ trigSources

std::vector<std::string> DTLocalTriggerBaseTest::trigSources
protected

◆ whME

std::map<int, std::map<std::string, MonitorElement*> > DTLocalTriggerBaseTest::whME
protected