CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
ecaldqm::DQWorkerClient Class Referenceabstract

#include <DQWorkerClient.h>

Inheritance diagram for ecaldqm::DQWorkerClient:
ecaldqm::DQWorker ecaldqm::CertificationClient ecaldqm::IntegrityClient ecaldqm::LaserClient ecaldqm::OccupancyClient ecaldqm::PresampleClient ecaldqm::RawDataClient ecaldqm::SelectiveReadoutClient ecaldqm::SummaryClient ecaldqm::TimingClient ecaldqm::TrigPrimClient

Public Types

enum  Sources { nSources }
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { nMESets }
 

Public Member Functions

 DQWorkerClient (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void initialize ()
 
virtual void producePlots ()=0
 
void reset ()
 
virtual ~DQWorkerClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void bookMEs ()
 
 DQWorker (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
const std::vector< MESet * > & getMEs ()
 
virtual std::string const & getName ()
 
virtual bool isInitialized ()
 
virtual void setInitialized (bool _init)
 
virtual void setVerbosity (int _verbosity)
 
virtual ~DQWorker ()
 

Static Public Attributes

static EcalDQMChannelStatus const * channelStatus
 
static EcalDQMTowerStatus const * towerStatus
 
- Static Public Attributes inherited from ecaldqm::DQWorker
static std::map< std::string,
std::vector< MEData > > 
meData
 

Protected Member Functions

void fillQuality_ (unsigned, DetId const &, uint32_t, float)
 
void source_ (unsigned, std::string const &, unsigned, edm::ParameterSet const &)
 
- Protected Member Functions inherited from ecaldqm::DQWorker
MESetcreateMESet_ (std::string const &, MEData const &, bool _readOnly=false) const
 
void meSet_ (unsigned, edm::ParameterSet const &)
 

Protected Attributes

std::vector< MESet const * > sources_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool initialized_
 
std::vector< MESet * > MEs_
 
std::string name_
 
int verbosity_
 

Additional Inherited Members

- Static Public Member Functions inherited from ecaldqm::DQWorker
static void setMEData (std::vector< MEData > &)
 

Detailed Description

Definition at line 13 of file DQWorkerClient.h.

Member Enumeration Documentation

Enumerator
nSources 

Definition at line 26 of file DQWorkerClient.h.

Constructor & Destructor Documentation

ecaldqm::DQWorkerClient::DQWorkerClient ( const edm::ParameterSet _params,
const edm::ParameterSet _paths,
std::string const &  _name 
)

Definition at line 13 of file DQWorkerClient.cc.

13  :
14  DQWorker(_params, _paths, _name),
15  sources_(0)
16  {
17  }
DQWorker(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
Definition: DQWorker.cc:18
std::vector< MESet const * > sources_
virtual ecaldqm::DQWorkerClient::~DQWorkerClient ( )
inlinevirtual

Definition at line 16 of file DQWorkerClient.h.

16 {}

Member Function Documentation

void ecaldqm::DQWorkerClient::endLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
virtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 20 of file DQWorkerClient.cc.

References ecaldqm::MESetChannel::checkDirectory(), and sources_.

21  {
22  for(std::vector<MESet const*>::iterator sItr(sources_.begin()); sItr != sources_.end(); ++sItr){
23  MESetChannel const* meset(dynamic_cast<MESetChannel const*>(*sItr));
24  if(meset) meset->checkDirectory();
25  }
26  }
std::vector< MESet const * > sources_
void ecaldqm::DQWorkerClient::fillQuality_ ( unsigned  _iME,
DetId const &  _id,
uint32_t  _mask,
float  _quality 
)
protected

Definition at line 63 of file DQWorkerClient.cc.

References channelStatus, EcalBarrel, EcalEndcap, EcalTriggerTower, EcalCondTowerObjectContainer< T >::end(), EcalCondObjectContainer< T >::end(), EcalCondTowerObjectContainer< T >::find(), EcalCondObjectContainer< T >::find(), ecaldqm::getElectronicsMap(), ecaldqm::getTrigTowerMap(), ecaldqm::isEcalScDetId(), EcalScDetId::ix(), EcalScDetId::iy(), EcalDQMBinningService::kSuperCrystal, EcalDQMBinningService::kTriggerTower, ecaldqm::DQWorker::MEs_, DetId::rawId(), EEDetId::sc(), DetId::subdetId(), EBDetId::tower(), towerStatus, EEDetId::validDetId(), and EcalScDetId::zside().

Referenced by ecaldqm::IntegrityClient::producePlots(), ecaldqm::TrigPrimClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::RawDataClient::producePlots(), ecaldqm::PresampleClient::producePlots(), and ecaldqm::OccupancyClient::producePlots().

64  {
65  using namespace std;
66 
67  bool doMask(false);
68 
69  // turn off masking for good channel for the time being
70  // update the RP then enable again
71  if(_quality != 1. && channelStatus && towerStatus){
72  BinService::BinningType btype(MEs_[_iME]->getBinType());
73  bool searchTower(btype == BinService::kTriggerTower || btype == BinService::kSuperCrystal);
74 
75  switch(_id.subdetId()){
76  case EcalBarrel:
77  if(searchTower){
78  EcalTrigTowerDetId ttid(EBDetId(_id).tower());
79  int tccid(getElectronicsMap()->TCCid(ttid));
80  int itt(getElectronicsMap()->iTT(ttid));
81  vector<DetId> ids(getElectronicsMap()->ttConstituents(tccid, itt));
82  for(vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){
83  if(doMask) break;
85  if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask;
86  }
87  }
88  else{
90  if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask;
91  }
92 
93  if(!doMask){
94  EcalDQMTowerStatus::const_iterator tItr(towerStatus->find(EBDetId(_id).tower().rawId()));
95  if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask;
96  }
97 
98  break;
99 
100  case EcalEndcap:
101  if(isEcalScDetId(_id)){
102  EcalScDetId scid(_id);
103  for(int ix(1); ix <= 5; ix++){
104  for(int iy(1); iy <= 5; iy++){
105  if(doMask) break;
106  int iix((scid.ix() - 1) * 5 + ix);
107  int iiy((scid.iy() - 1) * 5 + iy);
108  if(!EEDetId::validDetId(iix, iiy, scid.zside())) continue;
109  EcalDQMChannelStatus::const_iterator cItr(channelStatus->find(EEDetId(iix, iiy, scid.zside()).rawId()));
110  if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask;
111  }
112  }
113 
114  if(!doMask){
116  if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask;
117  }
118  }
119  else{
120  if(searchTower){
121  EcalScDetId scid(EEDetId(_id).sc());
122  for(int ix(1); ix <= 5; ix++){
123  for(int iy(1); iy <= 5; iy++){
124  if(doMask) break;
125  int iix((scid.ix() - 1) * 5 + ix);
126  int iiy((scid.iy() - 1) * 5 + iy);
127  if(!EEDetId::validDetId(iix, iiy, scid.zside())) continue;
128  EcalDQMChannelStatus::const_iterator cItr(channelStatus->find(EEDetId(iix, iiy, scid.zside()).rawId()));
129  if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask;
130  }
131  }
132  }
133  else{
135  if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask;
136  }
137 
138  if(!doMask){
140  if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask;
141  }
142  }
143 
144  break;
145 
146  case EcalTriggerTower:
147  {
148  EcalTrigTowerDetId ttid(_id);
149  vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid));
150  for(vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){
151  if(doMask) break;
153  if(cItr != channelStatus->end()) doMask |= cItr->getStatusCode() & _mask;
154 
155  if(doMask) break;
156  if(idItr->subdetId() == EcalBarrel){
157  if(idItr != ids.begin()) continue;
159  if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask;
160  }
161  else{
163  if(tItr != towerStatus->end()) doMask |= tItr->getStatusCode() & _mask;
164  }
165  }
166  }
167 
168  break;
169 
170  default:
171  break;
172  }
173  }
174 
175  float quality(doMask ? _quality + 3. : _quality);
176 
177  MEs_[_iME]->setBinContent(_id, quality);
178  }
const EcalElectronicsMapping * getElectronicsMap()
const_iterator find(uint32_t rawId) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
static EcalDQMChannelStatus const * channelStatus
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:59
bool isEcalScDetId(const DetId &_id)
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
std::vector< Item >::const_iterator const_iterator
EcalScDetId sc() const
Definition: EEDetId.h:88
const EcalTrigTowerConstituentsMap * getTrigTowerMap()
const_iterator find(uint32_t rawId) const
const_iterator end() const
static EcalDQMTowerStatus const * towerStatus
void ecaldqm::DQWorkerClient::initialize ( )
virtual

Reimplemented in ecaldqm::LaserClient.

Definition at line 37 of file DQWorkerClient.cc.

References ecaldqm::DQWorker::initialized_, and sources_.

Referenced by EcalDQMonitorClient::runWorkers().

38  {
39  initialized_ = true;
40  for(std::vector<MESet const*>::iterator sItr(sources_.begin()); sItr != sources_.end(); ++sItr)
41  initialized_ &= (*sItr)->retrieve();
42  }
std::vector< MESet const * > sources_
virtual void ecaldqm::DQWorkerClient::producePlots ( )
pure virtual
void ecaldqm::DQWorkerClient::reset ( void  )
virtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 29 of file DQWorkerClient.cc.

References ecaldqm::DQWorker::reset(), and sources_.

30  {
32  for(std::vector<MESet const*>::iterator sItr(sources_.begin()); sItr != sources_.end(); ++sItr)
33  (*sItr)->clear();
34  }
virtual void reset()
Definition: DQWorker.cc:55
std::vector< MESet const * > sources_
void ecaldqm::DQWorkerClient::source_ ( unsigned  _iS,
std::string const &  _worker,
unsigned  _iW,
edm::ParameterSet const &  _sources 
)
protected

Definition at line 45 of file DQWorkerClient.cc.

References ecaldqm::DQWorker::createMESet_(), data, edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::DQWorker::meData, sources_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ecaldqm::CertificationClient::CertificationClient(), Config.Process::dumpConfig(), Config.Process::dumpPython(), ecaldqm::IntegrityClient::IntegrityClient(), ecaldqm::LaserClient::LaserClient(), ecaldqm::OccupancyClient::OccupancyClient(), ecaldqm::PresampleClient::PresampleClient(), ecaldqm::RawDataClient::RawDataClient(), ecaldqm::SelectiveReadoutClient::SelectiveReadoutClient(), ecaldqm::SummaryClient::SummaryClient(), ecaldqm::TimingClient::TimingClient(), and ecaldqm::TrigPrimClient::TrigPrimClient().

46  {
47  if(_iS >= sources_.size()) sources_.resize(_iS + 1, 0);
48 
49  std::map<std::string, std::vector<MEData> >::const_iterator dataItr(meData.find(_worker));
50  if(dataItr == meData.end())
51  throw cms::Exception("InvalidCall") << "DQWorker " << _worker << " is not defined";
52 
53  MEData const& data(dataItr->second.at(_iW));
54 
55  edm::ParameterSet const& workerPaths(_sources.getUntrackedParameterSet(_worker));
56 
57  std::string fullpath(workerPaths.getUntrackedParameter<std::string>(data.pathName));
58 
59  sources_.at(_iS) = createMESet_(fullpath, data, true);
60  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::vector< MESet const * > sources_
MESet * createMESet_(std::string const &, MEData const &, bool _readOnly=false) const
Definition: DQWorker.cc:70
static std::map< std::string, std::vector< MEData > > meData
Definition: DQWorker.h:47

Member Data Documentation

EcalDQMChannelStatus const * ecaldqm::DQWorkerClient::channelStatus
static

Definition at line 30 of file DQWorkerClient.h.

Referenced by fillQuality_().

std::vector<MESet const*> ecaldqm::DQWorkerClient::sources_
protected
EcalDQMTowerStatus const * ecaldqm::DQWorkerClient::towerStatus
static

Definition at line 31 of file DQWorkerClient.h.

Referenced by fillQuality_(), and ecaldqm::RawDataClient::producePlots().