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

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 ()
 

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)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

No description available.

Date:
2009/10/19 14:06:00
Revision:
1.3
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 cmsCodeRules.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:456
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:647
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:237
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:82
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.