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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) 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
 
- 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::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.

Author
G. Cerminara - INFN Torino

Definition at line 20 of file DTDAQInfo.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 36 of file DTDAQInfo.cc.

36 {}
DTDAQInfo::~DTDAQInfo ( )
virtual

Destructor.

Definition at line 41 of file DTDAQInfo.cc.

41 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 144 of file DTDAQInfo.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 45 of file DTDAQInfo.cc.

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

45  {
46  // get the DQMStore
48 
49  // book the ME
50  // global fraction
51  theDbe->setCurrentFolder("DT/EventInfo");
52  totalDAQFraction = theDbe->bookFloat("DAQSummary");
54 
55  // map
56  daqMap = theDbe->book2D("DAQSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
57  daqMap->setAxisTitle("sector",1);
58  daqMap->setAxisTitle("wheel",2);
59 
60 
61  // Wheel "fractions" -> will be 0 or 1
62  theDbe->setCurrentFolder("DT/EventInfo/DAQContents");
63  for(int wheel = -2; wheel != 3; ++wheel) {
64  stringstream streams;
65  streams << "DT_Wheel" << wheel;
66  daqFractions[wheel] = theDbe->bookFloat(streams.str());
67  daqFractions[wheel]->Fill(-1);
68  }
69 
70  //
71 
72 }
std::map< int, MonitorElement * > daqFractions
Definition: DTDAQInfo.h:44
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:879
void Fill(long long x)
MonitorElement * daqMap
Definition: DTDAQInfo.h:43
MonitorElement * totalDAQFraction
Definition: DTDAQInfo.h:42
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:1070
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:655
DQMStore * theDbe
Definition: DTDAQInfo.h:40
void DTDAQInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 76 of file DTDAQInfo.cc.

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

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

References edm::EventSetup::get().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 140 of file DTDAQInfo.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 136 of file DTDAQInfo.cc.

136 {}

Member Data Documentation

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

Definition at line 44 of file DTDAQInfo.h.

MonitorElement* DTDAQInfo::daqMap
private

Definition at line 43 of file DTDAQInfo.h.

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

Definition at line 45 of file DTDAQInfo.h.

DQMStore* DTDAQInfo::theDbe
private

Definition at line 40 of file DTDAQInfo.h.

MonitorElement* DTDAQInfo::totalDAQFraction
private

Definition at line 42 of file DTDAQInfo.h.