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
SiPixelDcsInfo Class Reference

#include <SiPixelDcsInfo.h>

Inheritance diagram for SiPixelDcsInfo:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 SiPixelDcsInfo (const edm::ParameterSet &)
 
 ~SiPixelDcsInfo ()
 
- 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 &, 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 &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 

Private Attributes

DQMStoredbe_
 
std::pair< int, int > DCSPixelRange_
 
MonitorElementFraction_
 
MonitorElementFractionBarrel_
 
MonitorElementFractionEndcap_
 
int NumberOfDcsChannels_
 

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

Definition at line 25 of file SiPixelDcsInfo.h.

Constructor & Destructor Documentation

SiPixelDcsInfo::SiPixelDcsInfo ( const edm::ParameterSet ps)
explicit

Definition at line 9 of file SiPixelDcsInfo.cc.

9  {
10 
11 // DCSPixelRange_.first = ps.getUntrackedParameter<unsigned int>("MinimumPixelDcsChannel", 0);
12 // DCSPixelRange_.second = ps.getUntrackedParameter<unsigned int>("MaximumPixelDcsChannel", 39);
13 
14 // NumberOfDcsChannels_ =DCSPixelRange_.second - DCSPixelRange_.first +1;
16 }
SiPixelDcsInfo::~SiPixelDcsInfo ( )

Definition at line 18 of file SiPixelDcsInfo.cc.

18 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 144 of file SiPixelDcsInfo.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 126 of file SiPixelDcsInfo.cc.

References DQMStore::bookFloat(), dbe_, cppFunctionSkipper::operator, and DQMStore::setCurrentFolder().

126  {
127 
128  dbe_ = 0;
130 
131 
132  dbe_->setCurrentFolder("Pixel/EventInfo");
133  Fraction_= dbe_->bookFloat("DCSSummary");
134  dbe_->setCurrentFolder("Pixel/EventInfo/DCSContents");
135  FractionBarrel_= dbe_->bookFloat("PixelBarrelFraction");
136  FractionEndcap_= dbe_->bookFloat("PixelEndcapFraction");
137 }
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:879
DQMStore * dbe_
MonitorElement * Fraction_
MonitorElement * FractionEndcap_
MonitorElement * FractionBarrel_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
void SiPixelDcsInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 20 of file SiPixelDcsInfo.cc.

20 {}
void SiPixelDcsInfo::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 140 of file SiPixelDcsInfo.cc.

140 {}
void SiPixelDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 23 of file SiPixelDcsInfo.cc.

References edm::EventSetup::find(), and edm::eventsetup::heterocontainer::HCTypeTag::findType().

23  {
25  if(0 != iSetup.find( recordKey ) ) {
26  // cout<<"record key found"<<endl;
27  //get DCS channel information
28 // ESHandle<RunInfo> sumDCS;
29 // iSetup.get<RunInfoRcd>().get(sumDCS);
30 // vector<int> DcsChannelsInIds= sumDCS->m_dcs_in;
31 
32 /* int DcsCount=0;
33  int DcsCountBarrel=0;
34  int DcsCountEndcap=0;
35 */
36  //loop on all active DCS channels
37 /* for(unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
38  int fedID=FedsInIds[fedItr];
39  //make sure fed id is in allowed range
40  //cout<<fedID<<endl;
41  if(fedID>=FEDRange_.first && fedID<=FEDRange_.second){
42  ++FedCount;
43  if(fedID>=0 && fedID<=31){
44  ++FedCountBarrel;
45  }else if(fedID>=32 && fedID<=39){
46  ++FedCountEndcap;
47  }
48  }
49  }
50 */
51  //Fill active dcs fraction ME's
52 // if(NumberOfFeds_>0){
53  //all Pixel:
54  Fraction_->Fill(1.);
55  //Barrel:
56  FractionBarrel_->Fill(1.);
57  //Endcap:
58  FractionEndcap_->Fill(1.);
59 /* }else{
60  Fraction_->Fill(-1);
61  FractionBarrel_->Fill(-1);
62  FractionEndcap_->Fill(-1);
63  }
64 
65  }else{
66  Fraction_->Fill(-1);
67  FractionBarrel_->Fill(-1);
68  FractionEndcap_->Fill(-1);
69 */
70  return;
71  }
72 }
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
void Fill(long long x)
MonitorElement * Fraction_
MonitorElement * FractionEndcap_
MonitorElement * FractionBarrel_
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 SiPixelDcsInfo::endRun ( const edm::Run r,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 74 of file SiPixelDcsInfo.cc.

References edm::EventSetup::find(), and edm::eventsetup::heterocontainer::HCTypeTag::findType().

74  {
76  if(0 != iSetup.find( recordKey ) ) {
77  // cout<<"record key found"<<endl;
78  //get DCS channel information
79 // ESHandle<RunInfo> sumDCS;
80 // iSetup.get<RunInfoRcd>().get(sumDCS);
81 // vector<int> DcsChannelsInIds= sumDCS->m_dcs_in;
82 
83 /* int DcsCount=0;
84  int DcsCountBarrel=0;
85  int DcsCountEndcap=0;
86 */
87  //loop on all active DCS channels
88 /* for(unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
89  int fedID=FedsInIds[fedItr];
90  //make sure fed id is in allowed range
91  //cout<<fedID<<endl;
92  if(fedID>=FEDRange_.first && fedID<=FEDRange_.second){
93  ++FedCount;
94  if(fedID>=0 && fedID<=31){
95  ++FedCountBarrel;
96  }else if(fedID>=32 && fedID<=39){
97  ++FedCountEndcap;
98  }
99  }
100  }
101 */
102  //Fill active dcs fraction ME's
103 // if(NumberOfFeds_>0){
104  //all Pixel:
105  Fraction_->Fill(1.);
106  //Barrel:
107  FractionBarrel_->Fill(1.);
108  //Endcap:
109  FractionEndcap_->Fill(1.);
110 /* }else{
111  Fraction_->Fill(-1);
112  FractionBarrel_->Fill(-1);
113  FractionEndcap_->Fill(-1);
114  }
115 
116  }else{
117  Fraction_->Fill(-1);
118  FractionBarrel_->Fill(-1);
119  FractionEndcap_->Fill(-1);
120 */
121  return;
122  }
123 }
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
void Fill(long long x)
MonitorElement * Fraction_
MonitorElement * FractionEndcap_
MonitorElement * FractionBarrel_
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

Member Data Documentation

DQMStore* SiPixelDcsInfo::dbe_
private

Definition at line 39 of file SiPixelDcsInfo.h.

std::pair<int,int> SiPixelDcsInfo::DCSPixelRange_
private

Definition at line 45 of file SiPixelDcsInfo.h.

MonitorElement* SiPixelDcsInfo::Fraction_
private

Definition at line 41 of file SiPixelDcsInfo.h.

MonitorElement* SiPixelDcsInfo::FractionBarrel_
private

Definition at line 42 of file SiPixelDcsInfo.h.

MonitorElement* SiPixelDcsInfo::FractionEndcap_
private

Definition at line 43 of file SiPixelDcsInfo.h.

int SiPixelDcsInfo::NumberOfDcsChannels_
private

Definition at line 47 of file SiPixelDcsInfo.h.