CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DTHVHandler Class Reference

#include <DTHVHandler.h>

Public Member Functions

 DTHVHandler ()
 
 DTHVHandler (const DTHVStatus *dbObject)
 
int get (const DTWireId &id, int &flagA, int &flagC, int &flagS) const
 get content More...
 
const DTHVStatusgetDBObject () const
 access db object More...
 
int offChannelsNumber () const
 
int offChannelsNumber (const DTChamberId &id) const
 
 ~DTHVHandler ()
 

Private Attributes

const DTHVStatusobjectPtr
 

Detailed Description

Description: Class to analyze high voltage status

Date
2008/11/20 12:00:00
Revision
1.1
Author
Paolo Ronchese INFN Padova

Definition at line 37 of file DTHVHandler.h.

Constructor & Destructor Documentation

◆ DTHVHandler() [1/2]

DTHVHandler::DTHVHandler ( )

Constructor

Definition at line 36 of file DTHVHandler.cc.

36 : objectPtr(nullptr) {}
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:60

◆ DTHVHandler() [2/2]

DTHVHandler::DTHVHandler ( const DTHVStatus dbObject)

Definition at line 45 of file DTHVHandler.cc.

45 : objectPtr(dbObject) {}
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:60

◆ ~DTHVHandler()

DTHVHandler::~DTHVHandler ( )

Destructor

Definition at line 50 of file DTHVHandler.cc.

50 {}

Member Function Documentation

◆ get()

int DTHVHandler::get ( const DTWireId id,
int &  flagA,
int &  flagC,
int &  flagS 
) const

get content

Operations

Definition at line 55 of file DTHVHandler.cc.

References DTHVStatus::get(), nano_mu_digi_cff::layer, objectPtr, nano_mu_digi_cff::sector, relativeConstraints::station, nano_mu_digi_cff::superLayer, and makeMuonMisalignmentScenario::wheel.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

55  {
56  /*
57  if ( objectPtr == 0 ) {
58  flagA = flagC = flagS = 0;
59  return 999;
60  }
61  return objectPtr->get( id.wheel(),
62  id.station(),
63  id.sector(),
64  id.superLayer(),
65  id.layer(),
66  findLayerPart( id ),
67  flagA, flagC, flagS );
68 */
69  flagA = flagC = flagS = 0;
70  if (objectPtr == nullptr)
71  return 999;
72  int iCell = id.wire();
73  int fCell;
74  int lCell;
75  int fCheck = objectPtr->get(
76  id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), 0, fCell, lCell, flagA, flagC, flagS);
77  if ((fCheck == 0) && (fCell <= iCell) && (lCell >= iCell))
78  return 0;
79  fCheck = objectPtr->get(
80  id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), 1, fCell, lCell, flagA, flagC, flagS);
81  if ((fCheck == 0) && (fCell <= iCell) && (lCell >= iCell))
82  return 0;
83  flagA = flagC = flagS = 0;
84  return 1;
85 }
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int partId, int &fCell, int &lCell, int &flagA, int &flagC, int &flagS) const
get content
Definition: DTHVStatus.cc:56
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:60

◆ getDBObject()

const DTHVStatus* DTHVHandler::getDBObject ( ) const

access db object

◆ offChannelsNumber() [1/2]

int DTHVHandler::offChannelsNumber ( ) const

Definition at line 87 of file DTHVHandler.cc.

References DTHVStatus::begin(), data, DTHVStatus::end(), mps_splice::entry, and objectPtr.

87  {
88  int offNum = 0;
91  while (iter != iend) {
92  const std::pair<DTHVStatusId, DTHVStatusData>& entry = *iter++;
93  DTHVStatusId hvId = entry.first;
94  DTHVStatusData data = entry.second;
95  if (data.flagA || data.flagC || data.flagS)
96  offNum += (1 + data.lCell - data.fCell);
97  }
98  return offNum;
99 }
std::vector< std::pair< DTHVStatusId, DTHVStatusData > >::const_iterator const_iterator
Access methods to data.
Definition: DTHVStatus.h:130
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
const_iterator begin() const
Definition: DTHVStatus.cc:298
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:60
const_iterator end() const
Definition: DTHVStatus.cc:300

◆ offChannelsNumber() [2/2]

int DTHVHandler::offChannelsNumber ( const DTChamberId id) const

Definition at line 101 of file DTHVHandler.cc.

References DTHVStatus::begin(), data, DTHVStatus::end(), mps_splice::entry, objectPtr, DTHVStatusId::sectorId, DTHVStatusId::stationId, and DTHVStatusId::wheelId.

101  {
102  int offNum = 0;
105  /*
106  while ( iter != iend ) {
107  const std::pair<DTHVStatusId,DTHVStatusData>& entry = *iter++;
108  DTHVStatusId idCh = entry.first;
109  DTHVStatusData data = entry.second;
110  DTLayerId idL( idCh.wheelId, idCh.stationId, idCh.sectorId,
111  idCh.slId, idCh.layerId );
112  int fCell;
113  int lCell;
114  getLayerEdges( idL, idCh.partId, fCell, lCell );
115  if ( data.flagA || data.flagC || data.flagS )
116  offNum += ( 1 + lCell - fCell );
117  }
118 */
119  while (iter != iend) {
120  const std::pair<DTHVStatusId, DTHVStatusData>& entry = *iter++;
121  DTHVStatusId hvId = entry.first;
122  DTHVStatusData data = entry.second;
123  if ((hvId.wheelId == id.wheel()) && (hvId.stationId == id.station()) && (hvId.sectorId == id.sector()) &&
124  (data.flagA || data.flagC || data.flagS))
125  offNum += (1 + data.lCell - data.fCell);
126  }
127  return offNum;
128  // return 0;
129 }
std::vector< std::pair< DTHVStatusId, DTHVStatusData > >::const_iterator const_iterator
Access methods to data.
Definition: DTHVStatus.h:130
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
const_iterator begin() const
Definition: DTHVStatus.cc:298
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:60
const_iterator end() const
Definition: DTHVStatus.cc:300

Member Data Documentation

◆ objectPtr

const DTHVStatus* DTHVHandler::objectPtr
private

Definition at line 60 of file DTHVHandler.h.

Referenced by get(), and offChannelsNumber().