CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Static Private Attributes
EcalSrFlag Class Referenceabstract

#include <EcalSrFlag.h>

Inheritance diagram for EcalSrFlag:
EBSrFlag EESrFlag

Public Member Functions

std::string flagName () const
 
virtual const DetIdid () const =0
 
 operator int () const
 
void setValue (const int &flag)
 
int value () const
 
virtual ~EcalSrFlag ()
 

Static Public Member Functions

static std::string flagName (const int &flag)
 

Static Public Attributes

static const int SRF_FORCED_MASK = 0x4
 
static const int SRF_FULL = 3
 
static const int SRF_SUPPRESS = 0
 
static const int SRF_ZS1 = 1
 
static const int SRF_ZS2 = 2
 

Protected Attributes

unsigned char flag_
 

Static Private Attributes

static const char *const srfNames []
 

Detailed Description

Base class for Selective Readout Flag (SR flag or SRF).

Definition at line 10 of file EcalSrFlag.h.

Constructor & Destructor Documentation

◆ ~EcalSrFlag()

virtual EcalSrFlag::~EcalSrFlag ( )
inlinevirtual

Destructor

Definition at line 34 of file EcalSrFlag.h.

34 {};

Member Function Documentation

◆ flagName() [1/2]

std::string EcalSrFlag::flagName ( ) const
inline

Return a human readable flag name from the flag value.

Returns
the human readable string (which can contain space).

Definition at line 65 of file EcalSrFlag.h.

65 { return flagName(flag_); }

References flag_, and flagName().

Referenced by flagName().

◆ flagName() [2/2]

static std::string EcalSrFlag::flagName ( const int &  flag)
inlinestatic

Return a human readable flag name from its integer value.

Parameters
flagthe flag value
Returns
the human readable string (which can contain space).

Definition at line 60 of file EcalSrFlag.h.

60 { return (flag == (flag & 0x7)) ? srfNames[flag] : "Invalid"; }

References RemoveAddSevLevel::flag, and srfNames.

Referenced by operator<<().

◆ id()

virtual const DetId& EcalSrFlag::id ( ) const
pure virtual

Gets the Det Id the flag is associated to.

Returns
the det id of the readout unit (a barrel TT or a SC).

Implemented in EESrFlag, and EBSrFlag.

Referenced by EcalDigiToRaw::produce().

◆ operator int()

EcalSrFlag::operator int ( ) const
inline

Cast to int: same as value().

Returns
the SR flag value

Definition at line 54 of file EcalSrFlag.h.

54 { return flag_; }

References flag_.

◆ setValue()

void EcalSrFlag::setValue ( const int &  flag)
inline

Set the SR flag value. See SRF_XXX constants.

Parameters
flagnew flag value. Must be between 0 and 7.

Definition at line 49 of file EcalSrFlag.h.

49 { flag_ = (unsigned char)flag; }

References RemoveAddSevLevel::flag, and flag_.

◆ value()

int EcalSrFlag::value ( ) const
inline

Member Data Documentation

◆ flag_

unsigned char EcalSrFlag::flag_
protected

The SRP flag.

Definition at line 70 of file EcalSrFlag.h.

Referenced by EBSrFlag::EBSrFlag(), EESrFlag::EESrFlag(), flagName(), operator int(), setValue(), and value().

◆ SRF_FORCED_MASK

const int EcalSrFlag::SRF_FORCED_MASK = 0x4
static

Mask for the 'forced' bit which is set when the decision was forced by an error condition or by configuration.

E.g., a force full readout flag has value SRF_FORCED_MASK|SRF_FULL

Definition at line 29 of file EcalSrFlag.h.

Referenced by EcalSelectiveReadoutValidation::analyzeEB(), EcalSelectiveReadoutValidation::analyzeEE(), EcalDetIdToBeRecoveredProducer::produce(), ecaldqm::SelectiveReadoutTask::runOnDigis(), and ecaldqm::SelectiveReadoutTask::runOnSrFlags().

◆ SRF_FULL

const int EcalSrFlag::SRF_FULL = 3
static

◆ SRF_SUPPRESS

const int EcalSrFlag::SRF_SUPPRESS = 0
static

SRP flag for suppression of every channel of the readout unit.

Definition at line 15 of file EcalSrFlag.h.

◆ SRF_ZS1

const int EcalSrFlag::SRF_ZS1 = 1
static

◆ SRF_ZS2

const int EcalSrFlag::SRF_ZS2 = 2
static

◆ srfNames

const char *const EcalSrFlag::srfNames
staticprivate
Initial value:
= {
"Suppress",
"Zs1",
"Zs2",
"Full Readout",
"Forced Suppress",
"Forced Zs1",
"Forced Zs2",
"Forced Full Readout"
}

Human readable flag value names

Definition at line 75 of file EcalSrFlag.h.

Referenced by flagName().

EcalSrFlag::flag_
unsigned char flag_
Definition: EcalSrFlag.h:70
EcalSrFlag::srfNames
static const char *const srfNames[]
Definition: EcalSrFlag.h:75
EcalSrFlag::flagName
std::string flagName() const
Definition: EcalSrFlag.h:65
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116