CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Friends
FedCablingAnalysis Class Reference

Histogram-based analysis for connection loop. More...

#include <FedCablingAnalysis.h>

Inheritance diagram for FedCablingAnalysis:
CommissioningAnalysis

Public Types

typedef std::map< uint32_t, uint16_t > Candidates
 
- Public Types inherited from CommissioningAnalysis
typedef std::vector< bool > VBool
 
typedef std::vector< float > VFloat
 
typedef std::vector< uint16_t > VInt
 
typedef std::vector< std::string > VString
 
typedef std::vector< VBoolVVBool
 
typedef std::vector< VFloatVVFloat
 
typedef std::vector< VIntVVInt
 

Public Member Functions

const float & adcLevel () const
 
const Candidatescandidates () const
 
 FedCablingAnalysis (const uint32_t &key)
 
 FedCablingAnalysis ()
 
const uint16_t & fedCh () const
 
const uint16_t & fedId () const
 
bool isValid () const override
 
void print (std::stringstream &, uint32_t not_used=0) override
 
void reset () override
 
 ~FedCablingAnalysis () override
 
- Public Member Functions inherited from CommissioningAnalysis
virtual void addErrorCode (const std::string &error)
 
 CommissioningAnalysis (const uint32_t &key, const std::string &my_name)
 
 CommissioningAnalysis (const std::string &my_name)
 
const uint32_t & dcuId () const
 
void dcuId (const uint32_t &)
 
const uint32_t & detId () const
 
void detId (const uint32_t &)
 
const uint32_t & fecKey () const
 
void fecKey (const uint32_t &)
 
const uint32_t & fedKey () const
 
void fedKey (const uint32_t &)
 
const VStringgetErrorCodes () const
 
virtual void header (std::stringstream &) const
 
const std::string & myName () const
 
void setErrorCodes (const VString &errors)
 
virtual void summary (std::stringstream &) const
 
virtual ~CommissioningAnalysis ()
 

Static Public Attributes

static const float threshold_ = 100.
 

Private Attributes

float adcLevel_
 
Candidates candidates_
 
uint16_t fedCh_
 
uint16_t fedId_
 

Friends

class FedCablingAlgorithm
 

Detailed Description

Histogram-based analysis for connection loop.

Author
R.Bainbridge

Definition at line 16 of file FedCablingAnalysis.h.

Member Typedef Documentation

◆ Candidates

typedef std::map<uint32_t, uint16_t> FedCablingAnalysis::Candidates

Definition at line 26 of file FedCablingAnalysis.h.

Constructor & Destructor Documentation

◆ FedCablingAnalysis() [1/2]

FedCablingAnalysis::FedCablingAnalysis ( const uint32_t &  key)

Definition at line 18 of file FedCablingAnalysis.cc.

23  candidates_() {
24  ;
25 }
static const char fedCablingAnalysis_[]
key
prepare the HTCondor submission files and eventually submit them
static const uint16_t invalid_
Definition: Constants.h:16

◆ FedCablingAnalysis() [2/2]

FedCablingAnalysis::FedCablingAnalysis ( )

◆ ~FedCablingAnalysis()

FedCablingAnalysis::~FedCablingAnalysis ( )
inlineoverride

Definition at line 24 of file FedCablingAnalysis.h.

24 { ; }

Member Function Documentation

◆ adcLevel()

const float & FedCablingAnalysis::adcLevel ( ) const
inline

Light level [ADC].

Definition at line 81 of file FedCablingAnalysis.h.

References adcLevel_.

81 { return adcLevel_; }

◆ candidates()

const FedCablingAnalysis::Candidates & FedCablingAnalysis::candidates ( ) const
inline

Container for candidate connections.

Definition at line 82 of file FedCablingAnalysis.h.

References candidates_.

82 { return candidates_; }

◆ fedCh()

const uint16_t & FedCablingAnalysis::fedCh ( ) const
inline

FED channel.

Definition at line 80 of file FedCablingAnalysis.h.

References fedCh_.

80 { return fedCh_; }

◆ fedId()

const uint16_t & FedCablingAnalysis::fedId ( ) const
inline

FED id.

Definition at line 79 of file FedCablingAnalysis.h.

References fedId_.

79 { return fedId_; }

◆ isValid()

bool FedCablingAnalysis::isValid ( void  ) const
overridevirtual

Identifies if analysis is valid or not.

Reimplemented from CommissioningAnalysis.

Definition at line 49 of file FedCablingAnalysis.cc.

References adcLevel_, candidates_, fedCh_, fedId_, CommissioningAnalysis::getErrorCodes(), and sistrip::maximum_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), print(), and core.AutoHandle.AutoHandle::ReallyLoad().

49  {
51  !candidates_.empty() && getErrorCodes().empty());
52 }
const VString & getErrorCodes() const
static const uint16_t maximum_
Definition: Constants.h:20

◆ print()

void FedCablingAnalysis::print ( std::stringstream &  ss,
uint32_t  not_used = 0 
)
overridevirtual

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 56 of file FedCablingAnalysis.cc.

References adcLevel_, candidates_, relativeConstraints::empty, fedCh_, fedId_, alignBH_cfg::fixed, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), isValid(), castor_dqm_sourceclient_file_cfg::path, and contentValuesCheck::ss.

56  {
57  header(ss);
58  ss << std::fixed << std::setprecision(2) << " Connected FED id : " << fedId_ << std::endl
59  << " Connected FED channel : " << fedCh_ << std::endl
60  << " Signal level [ADC] : " << adcLevel_ << std::endl;
61  ss << " nCandidates : " << candidates_.size() << std::endl << " FedId/FedChannel/ADC) : ";
62  if (candidates_.empty()) {
63  ss << "(none)";
64  } else {
65  Candidates::const_iterator iter;
66  for (iter = candidates_.begin(); iter != candidates_.end(); iter++) {
67  SiStripFedKey path(iter->first);
68  ss << path.fedId() << "/" << path.fedChannel() << "/" << iter->second << " ";
69  }
70  }
71  ss << std::endl;
72  ss << std::boolalpha << " isValid : " << isValid() << std::endl
73  << std::noboolalpha << " Error codes (found " << std::setw(2) << std::setfill(' ') << getErrorCodes().size()
74  << ") : ";
75  if (getErrorCodes().empty()) {
76  ss << "(none)";
77  } else {
78  VString::const_iterator istr = getErrorCodes().begin();
79  VString::const_iterator jstr = getErrorCodes().end();
80  for (; istr != jstr; ++istr) {
81  ss << *istr << " ";
82  }
83  }
84  ss << std::endl;
85 }
const VString & getErrorCodes() const
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
bool isValid() const override
virtual void header(std::stringstream &) const

◆ reset()

void FedCablingAnalysis::reset ( void  )
overridevirtual

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 40 of file FedCablingAnalysis.cc.

References adcLevel_, candidates_, fedCh_, fedId_, and sistrip::invalid_.

Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().

40  {
44  candidates_.clear();
45 }
static const uint16_t invalid_
Definition: Constants.h:16

Friends And Related Function Documentation

◆ FedCablingAlgorithm

friend class FedCablingAlgorithm
friend

Definition at line 28 of file FedCablingAnalysis.h.

Member Data Documentation

◆ adcLevel_

float FedCablingAnalysis::adcLevel_
private

Light level [ADC].

Definition at line 71 of file FedCablingAnalysis.h.

Referenced by adcLevel(), isValid(), print(), and reset().

◆ candidates_

Candidates FedCablingAnalysis::candidates_
private

Container for candidate connections.

Definition at line 74 of file FedCablingAnalysis.h.

Referenced by candidates(), isValid(), print(), and reset().

◆ fedCh_

uint16_t FedCablingAnalysis::fedCh_
private

FED channel

Definition at line 68 of file FedCablingAnalysis.h.

Referenced by fedCh(), isValid(), print(), and reset().

◆ fedId_

uint16_t FedCablingAnalysis::fedId_
private

FED id

Definition at line 65 of file FedCablingAnalysis.h.

Referenced by fedId(), isValid(), print(), and reset().

◆ threshold_

const float FedCablingAnalysis::threshold_ = 100.
static

Threshold to identify candidate connections.

Definition at line 59 of file FedCablingAnalysis.h.

Referenced by FedCablingAlgorithm::analyse().