CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTDAQInfo Class Reference

#include <DTDAQInfo.h>

Inheritance diagram for DTDAQInfo:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 DTDAQInfo (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~DTDAQInfo ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &setup)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
 
virtual void beginRun (const edm::Run &run, const edm::EventSetup &setup)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
 

Private Attributes

std::map< int, MonitorElement * > daqFractions
 
MonitorElementdaqMap
 
edm::ESHandle< DTReadOutMappingmapping
 
DQMStoretheDbe
 
MonitorElementtotalDAQFraction
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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)
 

Detailed Description

No description available.

Date:
2010/01/05 10:15:46
Revision:
1.4
Author
G. Cerminara - INFN Torino

Definition at line 22 of file DTDAQInfo.h.

Constructor & Destructor Documentation

DTDAQInfo::DTDAQInfo ( const edm::ParameterSet pset)

Constructor.

Definition at line 38 of file DTDAQInfo.cc.

38 {}
DTDAQInfo::~DTDAQInfo ( )
virtual

Destructor.

Definition at line 43 of file DTDAQInfo.cc.

43 {}

Member Function Documentation

void DTDAQInfo::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 146 of file DTDAQInfo.cc.

146 {}
void DTDAQInfo::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 47 of file DTDAQInfo.cc.

References cppFunctionSkipper::operator, and hcal_dqm_sourceclient-file_cfg::streams.

47  {
48  // get the DQMStore
50 
51  // book the ME
52  // global fraction
53  theDbe->setCurrentFolder("DT/EventInfo");
54  totalDAQFraction = theDbe->bookFloat("DAQSummary");
56 
57  // map
58  daqMap = theDbe->book2D("DAQSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
59  daqMap->setAxisTitle("sector",1);
60  daqMap->setAxisTitle("wheel",2);
61 
62 
63  // Wheel "fractions" -> will be 0 or 1
64  theDbe->setCurrentFolder("DT/EventInfo/DAQContents");
65  for(int wheel = -2; wheel != 3; ++wheel) {
66  stringstream streams;
67  streams << "DT_Wheel" << wheel;
68  daqFractions[wheel] = theDbe->bookFloat(streams.str());
69  daqFractions[wheel]->Fill(-1);
70  }
71 
72  //
73 
74 }
std::map< int, MonitorElement * > daqFractions
Definition: DTDAQInfo.h:46
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:659
void Fill(long long x)
MonitorElement * daqMap
Definition: DTDAQInfo.h:45
MonitorElement * totalDAQFraction
Definition: DTDAQInfo.h:44
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
DQMStore * theDbe
Definition: DTDAQInfo.h:42
void DTDAQInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file DTDAQInfo.cc.

References edm::EventSetup::find(), edm::typelookup::findType(), edm::EventSetup::get(), LogTrace, FEDNumbering::MAXDTFEDID, and FEDNumbering::MINDTFEDID.

78  {
79  // create a record key for RunInfoRcd
81 
82 
83  if(setup.find(recordKey) != 0) {
84  // reset to 0
86  daqFractions[-2]->Fill(0.);
87  daqFractions[-1]->Fill(0.);
88  daqFractions[-0]->Fill(0.);
89  daqFractions[1]->Fill(0.);
90  daqFractions[2]->Fill(0.);
91 
92  daqMap->Reset();
93 
94  //get fed summary information
95  ESHandle<RunInfo> sumFED;
96  setup.get<RunInfoRcd>().get(sumFED);
97  vector<int> fedInIDs = sumFED->m_fed_in;
98 
99 
100  // the range of DT feds
101  static int FEDIDmin = FEDNumbering::MINDTFEDID;
102  static int FEDIDMax = FEDNumbering::MAXDTFEDID;
103 
104  // loop on all active feds
105  for(vector<int>::const_iterator fed = fedInIDs.begin();
106  fed != fedInIDs.end();
107  ++fed) {
108  // check if the fed is in the DT range
109  if(!(*fed >= FEDIDmin && *fed <= FEDIDMax)) continue;
110 
111  // check if the 12 channels are connected to any sector and fill the wheel percentage accordignly
112  int wheel = -99;
113  int sector = -99;
114  int dummy = -99;
115  for(int ros = 1; ros != 13; ++ros) {
116  if(!mapping->readOutToGeometry(*fed,ros,2,2,2,wheel,dummy,sector,dummy,dummy,dummy)) {
117  LogTrace("DQM|DTMonitorClient|DTDAQInfo")
118  << "FED: " << *fed << " Ch: " << ros << " wheel: " << wheel << " Sect: " << sector << endl;
119  daqFractions[wheel]->Fill(daqFractions[wheel]->getFloatValue() + 1./12.);
121  daqMap->Fill(sector,wheel);
122  }
123  }
124  }
125  } else {
126  LogWarning("DQM|DTMonitorClient|DTDAQInfo") << "*** Warning: record key not found for RunInfoRcd" << endl;
127  totalDAQFraction->Fill(-1);
128  for(int wheel = -2; wheel != 3; ++wheel) {
129  daqFractions[wheel]->Fill(-1);
130  }
131  return;
132  }
133 }
std::pair< const char *, const std::type_info * > findType(const char *iClassName)
Definition: typelookup.cc:51
std::map< int, MonitorElement * > daqFractions
Definition: DTDAQInfo.h:46
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
void Fill(long long x)
edm::ESHandle< DTReadOutMapping > mapping
Definition: DTDAQInfo.h:47
MonitorElement * daqMap
Definition: DTDAQInfo.h:45
double getFloatValue(void) const
MonitorElement * totalDAQFraction
Definition: DTDAQInfo.h:44
#define LogTrace(id)
const T & get() const
Definition: EventSetup.h:55
void Reset(void)
reset ME (ie. contents, errors, etc)
void DTDAQInfo::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 150 of file DTDAQInfo.cc.

References edm::EventSetup::get().

150  {
151  // retrieve the mapping
152  setup.get<DTReadOutMappingRcd>().get(mapping);
153 }
edm::ESHandle< DTReadOutMapping > mapping
Definition: DTDAQInfo.h:47
const T & get() const
Definition: EventSetup.h:55
void DTDAQInfo::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 142 of file DTDAQInfo.cc.

142 {}
void DTDAQInfo::endLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 138 of file DTDAQInfo.cc.

138 {}

Member Data Documentation

std::map<int, MonitorElement*> DTDAQInfo::daqFractions
private

Definition at line 46 of file DTDAQInfo.h.

MonitorElement* DTDAQInfo::daqMap
private

Definition at line 45 of file DTDAQInfo.h.

edm::ESHandle<DTReadOutMapping> DTDAQInfo::mapping
private

Definition at line 47 of file DTDAQInfo.h.

DQMStore* DTDAQInfo::theDbe
private

Definition at line 42 of file DTDAQInfo.h.

MonitorElement* DTDAQInfo::totalDAQFraction
private

Definition at line 44 of file DTDAQInfo.h.