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 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:
2009/03/26 14:11:03
Revision:
1.1
Author
Paolo Ronchese INFN Padova

Definition at line 38 of file DTHVHandler.h.

Constructor & Destructor Documentation

DTHVHandler::DTHVHandler ( )

Constructor

Definition at line 38 of file DTHVHandler.cc.

38  :
39  objectPtr ( 0 ) {
40 }
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:67
DTHVHandler::DTHVHandler ( const DTHVStatus dbObject)

Definition at line 50 of file DTHVHandler.cc.

50  :
51  objectPtr( dbObject ) {
52 }
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:67
DTHVHandler::~DTHVHandler ( )

Destructor

Definition at line 58 of file DTHVHandler.cc.

58  {
59 }

Member Function Documentation

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

get content

Operations

Definition at line 65 of file DTHVHandler.cc.

References DTHVStatus::get(), objectPtr, and relativeConstraints::station.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

68  {
69 /*
70  if ( objectPtr == 0 ) {
71  flagA = flagC = flagS = 0;
72  return 999;
73  }
74  return objectPtr->get( id.wheel(),
75  id.station(),
76  id.sector(),
77  id.superLayer(),
78  id.layer(),
79  findLayerPart( id ),
80  flagA, flagC, flagS );
81 */
82  flagA = flagC = flagS = 0;
83  if ( objectPtr == 0 ) return 999;
84  int iCell = id.wire();
85  int fCell;
86  int lCell;
87  int
88  fCheck = objectPtr->get( id.wheel(),
89  id.station(),
90  id.sector(),
91  id.superLayer(),
92  id.layer(),
93  0, fCell, lCell,
94  flagA, flagC, flagS );
95  if ( ( fCheck == 0 ) &&
96  ( fCell <= iCell ) &&
97  ( lCell >= iCell ) ) return 0;
98  fCheck = objectPtr->get( id.wheel(),
99  id.station(),
100  id.sector(),
101  id.superLayer(),
102  id.layer(),
103  1, fCell, lCell,
104  flagA, flagC, flagS );
105  if ( ( fCheck == 0 ) &&
106  ( fCell <= iCell ) &&
107  ( lCell >= iCell ) ) return 0;
108  flagA = flagC = flagS = 0;
109  return 1;
110 }
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:88
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:67
const DTHVStatus* DTHVHandler::getDBObject ( ) const

access db object

int DTHVHandler::offChannelsNumber ( ) const

Definition at line 113 of file DTHVHandler.cc.

References DTHVStatus::begin(), data, DTHVStatus::end(), DTHVStatusData::fCell, DTHVStatusData::flagA, DTHVStatusData::flagC, DTHVStatusData::flagS, DTHVStatusData::lCell, and objectPtr.

113  {
114  int offNum = 0;
117  while ( iter != iend ) {
118  const std::pair<DTHVStatusId,DTHVStatusData>& entry = *iter++;
119  DTHVStatusId hvId = entry.first;
120  DTHVStatusData data = entry.second;
121  if ( data.flagA || data.flagC || data.flagS )
122  offNum += ( 1 + data.lCell - data.fCell );
123  }
124  return offNum;
125 }
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
std::vector< std::pair< DTHVStatusId, DTHVStatusData > >::const_iterator const_iterator
Access methods to data.
Definition: DTHVStatus.h:173
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const_iterator end() const
Definition: DTHVStatus.cc:522
const_iterator begin() const
Definition: DTHVStatus.cc:517
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:67
int DTHVHandler::offChannelsNumber ( const DTChamberId id) const

Definition at line 128 of file DTHVHandler.cc.

References DTHVStatus::begin(), data, DTHVStatus::end(), DTHVStatusData::fCell, DTHVStatusData::flagA, DTHVStatusData::flagC, DTHVStatusData::flagS, DTHVStatusData::lCell, objectPtr, and DTHVStatusId::stationId.

128  {
129  int offNum = 0;
132 /*
133  while ( iter != iend ) {
134  const std::pair<DTHVStatusId,DTHVStatusData>& entry = *iter++;
135  DTHVStatusId idCh = entry.first;
136  DTHVStatusData data = entry.second;
137  DTLayerId idL( idCh.wheelId, idCh.stationId, idCh.sectorId,
138  idCh.slId, idCh.layerId );
139  int fCell;
140  int lCell;
141  getLayerEdges( idL, idCh.partId, fCell, lCell );
142  if ( data.flagA || data.flagC || data.flagS )
143  offNum += ( 1 + lCell - fCell );
144  }
145 */
146  while ( iter != iend ) {
147  const std::pair<DTHVStatusId,DTHVStatusData>& entry = *iter++;
148  DTHVStatusId hvId = entry.first;
149  DTHVStatusData data = entry.second;
150  if ( ( hvId. wheelId == id. wheel() ) &&
151  ( hvId.stationId == id.station() ) &&
152  ( hvId. sectorId == id. sector() ) &&
153  ( data.flagA || data.flagC || data.flagS ) )
154  offNum += ( 1 + data.lCell - data.fCell );
155  }
156  return offNum;
157 // return 0;
158 }
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
std::vector< std::pair< DTHVStatusId, DTHVStatusData > >::const_iterator const_iterator
Access methods to data.
Definition: DTHVStatus.h:173
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const_iterator end() const
Definition: DTHVStatus.cc:522
const_iterator begin() const
Definition: DTHVStatus.cc:517
const DTHVStatus * objectPtr
Definition: DTHVHandler.h:67

Member Data Documentation

const DTHVStatus* DTHVHandler::objectPtr
private

Definition at line 67 of file DTHVHandler.h.

Referenced by get(), and offChannelsNumber().