CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
L1TCSCTPG Class Reference

#include <L1TCSCTPG.h>

Inheritance diagram for L1TCSCTPG:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1TCSCTPG (const edm::ParameterSet &ps)
 
virtual ~L1TCSCTPG ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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
 
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::vector< ModuleDescription const * > &modules, 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 updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
virtual void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
 
virtual void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Private Attributes

MonitorElementcsctpgbend
 
MonitorElementcsctpgbx
 
MonitorElementcsctpgpattern
 
MonitorElementcsctpgquality
 
edm::InputTag csctpgSource_
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectioncsctpgSource_token_
 
MonitorElementcsctpgstrip
 
MonitorElementcsctpgstriptype
 
MonitorElementcsctpgwg
 
std::ofstream logFile_
 
bool monitorDaemon_
 
int nev_
 
std::string outputFile_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 42 of file L1TCSCTPG.h.

Constructor & Destructor Documentation

L1TCSCTPG::L1TCSCTPG ( const edm::ParameterSet ps)

Definition at line 13 of file L1TCSCTPG.cc.

References gather_cfg::cout, edm::ParameterSet::getUntrackedParameter(), outputFile_, and verbose_.

14  : csctpgSource_( ps.getParameter< InputTag >("csctpgSource") ),
15  csctpgSource_token_( consumes<CSCCorrelatedLCTDigiCollection>(ps.getParameter< InputTag >("csctpgSource") ))
16 {
17 
18  // verbosity switch
19  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
20 
21  if(verbose_) cout << "L1TCSCTPG: constructor...." << endl;
22 
23  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
24  if ( outputFile_.size() != 0 ) {
25  cout << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
26  }
27 
28  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
29  if(disable){
30  outputFile_="";
31  }
32 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag csctpgSource_
Definition: L1TCSCTPG.h:75
bool verbose_
Definition: L1TCSCTPG.h:72
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > csctpgSource_token_
Definition: L1TCSCTPG.h:76
std::string outputFile_
Definition: L1TCSCTPG.h:71
L1TCSCTPG::~L1TCSCTPG ( )
virtual

Definition at line 34 of file L1TCSCTPG.cc.

35 {}

Member Function Documentation

void L1TCSCTPG::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Definition at line 64 of file L1TCSCTPG.cc.

References gather_cfg::cout, csctpgbend, csctpgbx, csctpgpattern, csctpgquality, csctpgSource_, csctpgSource_token_, csctpgstrip, csctpgstriptype, csctpgwg, MonitorElement::Fill(), edm::Event::getByToken(), edm::HandleBase::isValid(), edm::InputTag::label(), nev_, and verbose_.

65 {
66  nev_++;
67  if(verbose_) cout << "L1TCSCTPG: analyze...." << endl;
68 
69 
71  e.getByToken(csctpgSource_token_,pCSCTPGcorrlcts);
72 
73  if (!pCSCTPGcorrlcts.isValid()) {
74  edm::LogInfo("DataNotFound") << "can't find CSCCorrelatedLCTDigiCollection with label "
75  << csctpgSource_.label() ;
76  return;
77  }
78 
79 
80  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator cscItr1 = pCSCTPGcorrlcts->begin();
81  cscItr1 != pCSCTPGcorrlcts->end();
82  cscItr1++)
83  {
84  CSCCorrelatedLCTDigiCollection::Range range1 = pCSCTPGcorrlcts->get((*cscItr1).first);
85  for (CSCCorrelatedLCTDigiCollection::const_iterator lctItr1 = range1.first;
86  lctItr1 != range1.second;
87  lctItr1++)
88  {
89 
90 
91  csctpgpattern->Fill(lctItr1->getCLCTPattern());
92  if (verbose_)
93  {
94  std::cout << "CSC TPG CLCT pattern " << lctItr1->getCLCTPattern()
95  << std::endl;
96  }
97 
98  csctpgquality->Fill(lctItr1->getQuality());
99  if (verbose_)
100  {
101  std::cout << "CSC LCT quality " << lctItr1->getQuality()
102  << std::endl;
103  }
104 
105  csctpgwg->Fill(lctItr1->getKeyWG());
106  if (verbose_)
107  {
108  std::cout << "CSC LCT wire group " << lctItr1->getKeyWG()
109  << std::endl;
110  }
111 
112  csctpgstrip->Fill(lctItr1->getStrip());
113  if (verbose_)
114  {
115  std::cout << "CSC LCT strip " << lctItr1->getStrip()
116  << std::endl;
117  }
118 
119  csctpgstriptype->Fill(lctItr1->getStripType());
120  if (verbose_)
121  {
122  std::cout << "CSC LCT strip type" << lctItr1->getStripType()
123  << std::endl;
124  }
125 
126  csctpgbend->Fill(lctItr1->getBend());
127  if (verbose_)
128  {
129  std::cout << "CSC LCT bend " << lctItr1->getBend()
130  << std::endl;
131  }
132 
133  csctpgbx->Fill(lctItr1->getBX());
134  if (verbose_)
135  {
136  std::cout << "CSC LCT bx " << lctItr1->getBX()
137  << std::endl;
138  }
139 
140  }
141  }
142 
143 
144 
145 }
MonitorElement * csctpgwg
Definition: L1TCSCTPG.h:64
MonitorElement * csctpgstrip
Definition: L1TCSCTPG.h:65
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
void Fill(long long x)
edm::InputTag csctpgSource_
Definition: L1TCSCTPG.h:75
MonitorElement * csctpgbend
Definition: L1TCSCTPG.h:67
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * csctpgbx
Definition: L1TCSCTPG.h:68
int nev_
Definition: L1TCSCTPG.h:70
MonitorElement * csctpgquality
Definition: L1TCSCTPG.h:63
std::vector< CSCCorrelatedLCTDigi >::const_iterator const_iterator
std::string const & label() const
Definition: InputTag.h:36
bool verbose_
Definition: L1TCSCTPG.h:72
std::pair< const_iterator, const_iterator > Range
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > csctpgSource_token_
Definition: L1TCSCTPG.h:76
MonitorElement * csctpgstriptype
Definition: L1TCSCTPG.h:66
MonitorElement * csctpgpattern
Definition: L1TCSCTPG.h:62
void L1TCSCTPG::beginLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
overrideprotectedvirtual

Definition at line 61 of file L1TCSCTPG.cc.

61  {
62 }
void L1TCSCTPG::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 37 of file L1TCSCTPG.cc.

References DQMStore::IBooker::book1D(), csctpgbend, csctpgbx, csctpgpattern, csctpgquality, csctpgstrip, csctpgstriptype, csctpgwg, nev_, and DQMStore::IBooker::setCurrentFolder().

38 {
39  nev_ = 0;
40  ibooker.setCurrentFolder("L1T/L1TCSCTPG");
41 
42  csctpgpattern = ibooker.book1D("CSC TPG hit pattern",
43  "CSC TPG hit pattern", 8, -0.5, 7.5 ) ;
44  csctpgquality = ibooker.book1D("CSC TPG quality",
45  "CSC TPG quality", 16, 0.5, 16.5 ) ;
46  csctpgwg = ibooker.book1D("CSC TPG wire group",
47  "CSC TPG wire group", 116, -0.5, 115.5 ) ;
48  csctpgstrip = ibooker.book1D("CSC TPG strip",
49  "CSC TPG strip", 160, -0.5, 159.5 ) ;
50  csctpgstriptype = ibooker.book1D("CSC TPG strip type",
51  "CSC TPG strip type", 2, 0.5, 1.5 ) ;
52  csctpgbend = ibooker.book1D("CSC TPG bend",
53  "CSC TPG bend", 3, 0.5, 2.5 ) ;
54  csctpgbx = ibooker.book1D("CSC TPG bx",
55  "CSC TPG bx", 20, -0.5, 19.5 ) ;
56 }
MonitorElement * csctpgwg
Definition: L1TCSCTPG.h:64
MonitorElement * csctpgstrip
Definition: L1TCSCTPG.h:65
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * csctpgbend
Definition: L1TCSCTPG.h:67
MonitorElement * csctpgbx
Definition: L1TCSCTPG.h:68
int nev_
Definition: L1TCSCTPG.h:70
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * csctpgquality
Definition: L1TCSCTPG.h:63
MonitorElement * csctpgstriptype
Definition: L1TCSCTPG.h:66
MonitorElement * csctpgpattern
Definition: L1TCSCTPG.h:62
void L1TCSCTPG::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

Definition at line 58 of file L1TCSCTPG.cc.

58  {
59 }

Member Data Documentation

MonitorElement* L1TCSCTPG::csctpgbend
private

Definition at line 67 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgbx
private

Definition at line 68 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgpattern
private

Definition at line 62 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgquality
private

Definition at line 63 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TCSCTPG::csctpgSource_
private

Definition at line 75 of file L1TCSCTPG.h.

Referenced by analyze().

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> L1TCSCTPG::csctpgSource_token_
private

Definition at line 76 of file L1TCSCTPG.h.

Referenced by analyze().

MonitorElement* L1TCSCTPG::csctpgstrip
private

Definition at line 65 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgstriptype
private

Definition at line 66 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgwg
private

Definition at line 64 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

std::ofstream L1TCSCTPG::logFile_
private

Definition at line 74 of file L1TCSCTPG.h.

bool L1TCSCTPG::monitorDaemon_
private

Definition at line 73 of file L1TCSCTPG.h.

int L1TCSCTPG::nev_
private

Definition at line 70 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

std::string L1TCSCTPG::outputFile_
private

Definition at line 71 of file L1TCSCTPG.h.

Referenced by L1TCSCTPG().

bool L1TCSCTPG::verbose_
private

Definition at line 72 of file L1TCSCTPG.h.

Referenced by analyze(), and L1TCSCTPG().