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 Types | Private Member Functions | Private Attributes
DQMDaqInfo Class Reference

#include <CondCore/DQMDaqInfo/src/DQMDaqInfo.cc>

Inheritance diagram for DQMDaqInfo:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 DQMDaqInfo (const edm::ParameterSet &)
 
 ~DQMDaqInfo ()
 
- 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 Types

enum  subDetList {
  Pixel, SiStrip, EcalBarrel, EcalEndcap,
  Hcal, DT, CSC, RPC,
  L1T
}
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 

Private Attributes

std::pair< int, int > CSCRange
 
MonitorElementDaqFraction [9]
 
DQMStoredbe_
 
std::pair< int, int > DTRange
 
std::pair< int, int > ECALBarrRange
 
std::pair< int, int > ECALEndcapRangeHigh
 
std::pair< int, int > ECALEndcapRangeLow
 
std::pair< int, int > HcalRange
 
std::pair< int, int > L1TRange
 
float NumberOfFeds [9]
 
std::pair< int, int > PixelRange
 
std::pair< int, int > RPCRange
 
std::pair< int, int > TrackerRange
 

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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 48 of file DQMDaqInfo.h.

Member Enumeration Documentation

enum DQMDaqInfo::subDetList
private
Enumerator
Pixel 
SiStrip 
EcalBarrel 
EcalEndcap 
Hcal 
DT 
CSC 
RPC 
L1T 

Definition at line 63 of file DQMDaqInfo.h.

Constructor & Destructor Documentation

DQMDaqInfo::DQMDaqInfo ( const edm::ParameterSet iConfig)
explicit

Definition at line 4 of file DQMDaqInfo.cc.

5 {
6 }
DQMDaqInfo::~DQMDaqInfo ( )

Definition at line 8 of file DQMDaqInfo.cc.

9 {
10 }

Member Function Documentation

void DQMDaqInfo::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 159 of file DQMDaqInfo.cc.

160 {
161 
162 
163 }
void DQMDaqInfo::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 62 of file DQMDaqInfo.cc.

References DQMStore::bookFloat(), CSC, CSCRange, DaqFraction, dbe_, DT, DTRange, EcalBarrel, ECALBarrRange, EcalEndcap, ECALEndcapRangeHigh, ECALEndcapRangeLow, Hcal, HcalRange, L1T, L1TRange, FEDNumbering::MAXCSCFEDID, FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MAXTriggerGTPFEDID, FEDNumbering::MINCSCFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, FEDNumbering::MINTriggerGTPFEDID, NumberOfFeds, cppFunctionSkipper::operator, Pixel, PixelRange, RPC, RPCRange, DQMStore::setCurrentFolder(), SiStrip, AlCaHLTBitMon_QueryRunRegistry::string, and TrackerRange.

63 {
64  dbe_ = 0;
66 
67  std::string commonFolder = "/EventInfo/DAQContents";
68  std::string subsystFolder;
69  std::string curentFolder;
70 
71  subsystFolder="Pixel";
72  curentFolder= subsystFolder+commonFolder;
73  dbe_->setCurrentFolder(curentFolder.c_str());
74  DaqFraction[Pixel] = dbe_->bookFloat("PixelDaqFraction");
75 
76 
77  subsystFolder="SiStrip";
78  curentFolder=subsystFolder+commonFolder;
79  dbe_->setCurrentFolder(curentFolder.c_str());
80  DaqFraction[SiStrip] = dbe_->bookFloat("SiStripDaqFraction");
81 
82  subsystFolder="RPC";
83  curentFolder=subsystFolder+commonFolder;
84  dbe_->setCurrentFolder(curentFolder.c_str());
85  DaqFraction[RPC] = dbe_->bookFloat("RPCDaqFraction");
86 
87  subsystFolder="CSC";
88  curentFolder=subsystFolder+commonFolder;
89  dbe_->setCurrentFolder(curentFolder.c_str());
90  DaqFraction[CSC] = dbe_->bookFloat("CSCDaqFraction");
91 
92  subsystFolder="DT";
93  curentFolder=subsystFolder+commonFolder;
94  dbe_->setCurrentFolder(curentFolder.c_str());
95  DaqFraction[DT] = dbe_->bookFloat("DTDaqFraction");
96 
97  subsystFolder="Hcal";
98  curentFolder=subsystFolder+commonFolder;
99  dbe_->setCurrentFolder(curentFolder.c_str());
100  DaqFraction[Hcal] = dbe_->bookFloat("HcalDaqFraction");
101 
102  subsystFolder="EcalBarrel";
103  curentFolder=subsystFolder+commonFolder;
104  dbe_->setCurrentFolder(curentFolder.c_str());
105  DaqFraction[EcalBarrel] = dbe_->bookFloat("EcalBarrDaqFraction");
106 
107  subsystFolder="EcalEndcap";
108  curentFolder=subsystFolder+commonFolder;
109  dbe_->setCurrentFolder(curentFolder.c_str());
110  DaqFraction[EcalEndcap] = dbe_->bookFloat("EcalEndDaqFraction");
111 
112  subsystFolder="L1T";
113  curentFolder=subsystFolder+commonFolder;
114  dbe_->setCurrentFolder(curentFolder.c_str());
115  DaqFraction[L1T] = dbe_->bookFloat("L1TDaqFraction");
116 
117 
124  RPCRange.first = 790;
125  RPCRange.second = 792;
126  DTRange.first = 770;
127  DTRange.second = 774;
132  ECALBarrRange.first = 610;
133  ECALBarrRange.second = 645;
134  ECALEndcapRangeLow.first = 601;
135  ECALEndcapRangeLow.second = 609;
136  ECALEndcapRangeHigh.first = 646;
137  ECALEndcapRangeHigh.second = 654;
138 
139  NumberOfFeds[Pixel] = PixelRange.second-PixelRange.first +1;
140  NumberOfFeds[SiStrip] = TrackerRange.second-TrackerRange.first +1;
141  NumberOfFeds[CSC] = CSCRange.second-CSCRange.first +1;
142  NumberOfFeds[RPC] = RPCRange.second-RPCRange.first +1;
143  NumberOfFeds[DT] = DTRange.second-DTRange.first +1;
144  NumberOfFeds[Hcal] = HcalRange.second-HcalRange.first +1;
147  NumberOfFeds[L1T] = L1TRange.second-L1TRange.first +1;
148 
149 }
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:73
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:68
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:78
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:65
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:67
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:891
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:71
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:70
DQMStore * dbe_
Definition: DQMDaqInfo.h:61
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:69
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:75
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:76
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:72
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:74
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
void DQMDaqInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 12 of file DQMDaqInfo.cc.

References CSC, CSCRange, DaqFraction, DT, DTRange, EcalBarrel, ECALBarrRange, EcalEndcap, ECALEndcapRangeHigh, ECALEndcapRangeLow, MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), Hcal, HcalRange, L1T, L1TRange, NumberOfFeds, Pixel, PixelRange, RPC, RPCRange, SiStrip, and TrackerRange.

12  {
13 
15 
16  if( 0 != iSetup.find( recordKey ) ) {
17 
19  iSetup.get<RunInfoRcd>().get(sumFED);
20 
21  //const RunInfo* summaryFED=sumFED.product();
22 
23  std::vector<int> FedsInIds= sumFED->m_fed_in;
24 
25  float FedCount[9]={0., 0., 0., 0., 0., 0., 0., 0., 0.};
26 
27  for(unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
28  int fedID=FedsInIds[fedItr];
29 
30  if(fedID>=PixelRange.first && fedID<=PixelRange.second) ++FedCount[Pixel];
31  if(fedID>=TrackerRange.first && fedID<=TrackerRange.second) ++FedCount[SiStrip];
32  if(fedID>=CSCRange.first && fedID<=CSCRange.second) ++FedCount[CSC];
33  if(fedID>=RPCRange.first && fedID<=RPCRange.second) ++FedCount[RPC];
34  if(fedID>=DTRange.first && fedID<=DTRange.second) ++FedCount[DT];
35  if(fedID>=HcalRange.first && fedID<=HcalRange.second) ++FedCount[Hcal];
36  if(fedID>=ECALBarrRange.first && fedID<=ECALBarrRange.second) ++FedCount[EcalBarrel];
37  if((fedID>=ECALEndcapRangeLow.first && fedID<=ECALEndcapRangeLow.second) ||
38  (fedID>=ECALEndcapRangeHigh.first && fedID<=ECALEndcapRangeHigh.second)) ++FedCount[EcalEndcap];
39  if(fedID>=L1TRange.first && fedID<=L1TRange.second) ++FedCount[L1T];
40 
41  }
42 
43  for(int detIndex=0; detIndex<9; ++detIndex) {
44  DaqFraction[detIndex]->Fill( FedCount[detIndex]/NumberOfFeds[detIndex]);
45  }
46 
47  }else{
48 
49  for(int detIndex=0; detIndex<9; ++detIndex) DaqFraction[detIndex]->Fill(-1);
50  return;
51  }
52 
53 
54 }
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:73
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:68
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:78
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:65
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:67
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:71
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
void Fill(long long x)
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:70
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:69
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:75
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:76
const T & get() const
Definition: EventSetup.h:55
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:72
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:74
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
void DQMDaqInfo::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 153 of file DQMDaqInfo.cc.

153  {
154 }
void DQMDaqInfo::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file DQMDaqInfo.cc.

57  {
58 }

Member Data Documentation

std::pair<int,int> DQMDaqInfo::CSCRange
private

Definition at line 69 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

MonitorElement* DQMDaqInfo::DaqFraction[9]
private

Definition at line 65 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

DQMStore* DQMDaqInfo::dbe_
private

Definition at line 61 of file DQMDaqInfo.h.

Referenced by beginJob().

std::pair<int,int> DQMDaqInfo::DTRange
private

Definition at line 71 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::ECALBarrRange
private

Definition at line 73 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::ECALEndcapRangeHigh
private

Definition at line 75 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::ECALEndcapRangeLow
private

Definition at line 74 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::HcalRange
private

Definition at line 72 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::L1TRange
private

Definition at line 76 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

float DQMDaqInfo::NumberOfFeds[9]
private

Definition at line 78 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::PixelRange
private

Definition at line 67 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::RPCRange
private

Definition at line 70 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::TrackerRange
private

Definition at line 68 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().