CMS 3D CMS Logo

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

#include <Phase2TrackerModule.h>

Public Types

enum  ModuleTypes { SS, PS }
 

Public Member Functions

void addI2cDevice (unsigned int dev)
 
std::string description (bool compact=false) const
 
std::pair< unsigned int, unsigned int > getCh () const
 
uint32_t getCoolingLoop () const
 
uint32_t getDetid () const
 
uint32_t getGbtid () const
 
const std::vector< unsigned int > & getI2cDevices () const
 
ModuleTypes getModuleType () const
 
uint32_t getPowerGroup () const
 
 Phase2TrackerModule (ModuleTypes moduleType=SS, uint32_t detid=0, uint32_t gbtid=0, uint32_t fedid=0, uint32_t fedch=0, uint32_t powerGroup=0, uint32_t coolingLoop=0)
 
void setCoolingLoop (uint32_t cl)
 
void setDetid (uint32_t detid)
 
void setFedChannel (unsigned int fedid, unsigned int fedch)
 
void setGbtid (uint32_t gbtid)
 
void setI2cDevices (std::vector< unsigned int > i2cd)
 
void setModuleType (ModuleTypes moduleType)
 
void setPowerGroup (uint32_t pg)
 
virtual ~Phase2TrackerModule ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::pair< unsigned int, unsigned int > ch_
 
uint32_t coolingLoop_
 
uint32_t detid_
 
uint32_t gbtid_
 
std::vector< unsigned int > i2cDevices_
 
ModuleTypes moduleType_
 
uint32_t powerGroup_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 9 of file Phase2TrackerModule.h.

Member Enumeration Documentation

◆ ModuleTypes

Enumerator
SS 
PS 

Definition at line 11 of file Phase2TrackerModule.h.

Constructor & Destructor Documentation

◆ Phase2TrackerModule()

Phase2TrackerModule::Phase2TrackerModule ( ModuleTypes  moduleType = SS,
uint32_t  detid = 0,
uint32_t  gbtid = 0,
uint32_t  fedid = 0,
uint32_t  fedch = 0,
uint32_t  powerGroup = 0,
uint32_t  coolingLoop = 0 
)
inline

Definition at line 15 of file Phase2TrackerModule.h.

References ch_, and PixelSLinkDataInputSource_cfi::fedid.

22  : moduleType_(moduleType), detid_(detid), gbtid_(gbtid), powerGroup_(powerGroup), coolingLoop_(coolingLoop) {
23  ch_ = std::make_pair(fedid, fedch);
24  }
std::pair< unsigned int, unsigned int > ch_

◆ ~Phase2TrackerModule()

virtual Phase2TrackerModule::~Phase2TrackerModule ( )
inlinevirtual

Definition at line 27 of file Phase2TrackerModule.h.

27 {}

Member Function Documentation

◆ addI2cDevice()

void Phase2TrackerModule::addI2cDevice ( unsigned int  dev)
inline

Definition at line 36 of file Phase2TrackerModule.h.

References i2cDevices_.

36 { i2cDevices_.push_back(dev); }
std::vector< unsigned int > i2cDevices_

◆ description()

std::string Phase2TrackerModule::description ( bool  compact = false) const

Definition at line 5 of file Phase2TrackerModule.cc.

References TauDecayModes::dec, getCh(), getCoolingLoop(), getDetid(), getGbtid(), getModuleType(), getPowerGroup(), SS, and contentValuesCheck::ss.

5  {
6  std::stringstream ss;
7  if (compact) {
8  ss << "0x" << std::hex << getDetid() << " (" << (getModuleType() == Phase2TrackerModule::SS ? "2S" : "PS") << ") ";
9  ss << "GBT 0x" << std::hex << getGbtid() << " FED " << std::dec << getCh().first << "." << getCh().second;
10  ss << " C " << getCoolingLoop() << " P " << getPowerGroup() << std::endl;
11  } else {
12  ss << "Module of type " << (getModuleType() == Phase2TrackerModule::SS ? "2S" : "PS") << ":" << std::endl;
13  ss << " Detid: 0x" << std::hex << getDetid() << " GBTid: 0x" << getGbtid() << std::endl;
14  ss << " FED connection: " << std::dec << getCh().first << "." << getCh().second << std::endl;
15  ss << " Cooling loop: " << getCoolingLoop() << std::endl;
16  ss << " Power group: " << getPowerGroup() << std::endl;
17  }
18  return ss.str();
19 }
uint32_t getDetid() const
uint32_t getCoolingLoop() const
ModuleTypes getModuleType() const
std::pair< unsigned int, unsigned int > getCh() const
uint32_t getPowerGroup() const
uint32_t getGbtid() const

◆ getCh()

std::pair<unsigned int, unsigned int> Phase2TrackerModule::getCh ( ) const
inline

Definition at line 42 of file Phase2TrackerModule.h.

References ch_.

Referenced by description().

42 { return ch_; }
std::pair< unsigned int, unsigned int > ch_

◆ getCoolingLoop()

uint32_t Phase2TrackerModule::getCoolingLoop ( ) const
inline

Definition at line 43 of file Phase2TrackerModule.h.

References coolingLoop_.

Referenced by description().

43 { return coolingLoop_; }

◆ getDetid()

uint32_t Phase2TrackerModule::getDetid ( ) const
inline

Definition at line 40 of file Phase2TrackerModule.h.

References detid_.

Referenced by description().

40 { return detid_; }

◆ getGbtid()

uint32_t Phase2TrackerModule::getGbtid ( ) const
inline

Definition at line 41 of file Phase2TrackerModule.h.

References gbtid_.

Referenced by description().

41 { return gbtid_; }

◆ getI2cDevices()

const std::vector<unsigned int>& Phase2TrackerModule::getI2cDevices ( ) const
inline

Definition at line 46 of file Phase2TrackerModule.h.

References i2cDevices_.

46 { return i2cDevices_; }
std::vector< unsigned int > i2cDevices_

◆ getModuleType()

ModuleTypes Phase2TrackerModule::getModuleType ( ) const
inline

Definition at line 45 of file Phase2TrackerModule.h.

References moduleType_.

Referenced by description().

45 { return moduleType_; }

◆ getPowerGroup()

uint32_t Phase2TrackerModule::getPowerGroup ( ) const
inline

Definition at line 44 of file Phase2TrackerModule.h.

References powerGroup_.

Referenced by description().

44 { return powerGroup_; }

◆ serialize()

template<class Archive >
void Phase2TrackerModule::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setCoolingLoop()

void Phase2TrackerModule::setCoolingLoop ( uint32_t  cl)
inline

Definition at line 33 of file Phase2TrackerModule.h.

References haddnano::cl, and coolingLoop_.

◆ setDetid()

void Phase2TrackerModule::setDetid ( uint32_t  detid)
inline

◆ setFedChannel()

void Phase2TrackerModule::setFedChannel ( unsigned int  fedid,
unsigned int  fedch 
)
inline

Definition at line 32 of file Phase2TrackerModule.h.

References ch_, and PixelSLinkDataInputSource_cfi::fedid.

32 { ch_ = std::make_pair(fedid, fedch); }
std::pair< unsigned int, unsigned int > ch_

◆ setGbtid()

void Phase2TrackerModule::setGbtid ( uint32_t  gbtid)
inline

Definition at line 31 of file Phase2TrackerModule.h.

References gbtid_.

31 { gbtid_ = gbtid; }

◆ setI2cDevices()

void Phase2TrackerModule::setI2cDevices ( std::vector< unsigned int >  i2cd)
inline

Definition at line 37 of file Phase2TrackerModule.h.

References i2cDevices_.

37 { i2cDevices_ = i2cd; }
std::vector< unsigned int > i2cDevices_

◆ setModuleType()

void Phase2TrackerModule::setModuleType ( ModuleTypes  moduleType)
inline

Definition at line 35 of file Phase2TrackerModule.h.

References moduleType_.

35 { moduleType_ = moduleType; }

◆ setPowerGroup()

void Phase2TrackerModule::setPowerGroup ( uint32_t  pg)
inline

Definition at line 34 of file Phase2TrackerModule.h.

References powerGroup_.

34 { powerGroup_ = pg; }

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 62 of file Phase2TrackerModule.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 62 of file Phase2TrackerModule.h.

Member Data Documentation

◆ ch_

std::pair<unsigned int, unsigned int> Phase2TrackerModule::ch_
private

Definition at line 59 of file Phase2TrackerModule.h.

Referenced by getCh(), Phase2TrackerModule(), and setFedChannel().

◆ coolingLoop_

uint32_t Phase2TrackerModule::coolingLoop_
private

Definition at line 58 of file Phase2TrackerModule.h.

Referenced by getCoolingLoop(), and setCoolingLoop().

◆ detid_

uint32_t Phase2TrackerModule::detid_
private

Definition at line 57 of file Phase2TrackerModule.h.

Referenced by getDetid(), and setDetid().

◆ gbtid_

uint32_t Phase2TrackerModule::gbtid_
private

Definition at line 57 of file Phase2TrackerModule.h.

Referenced by getGbtid(), and setGbtid().

◆ i2cDevices_

std::vector<unsigned int> Phase2TrackerModule::i2cDevices_
private

Definition at line 60 of file Phase2TrackerModule.h.

Referenced by addI2cDevice(), getI2cDevices(), and setI2cDevices().

◆ moduleType_

ModuleTypes Phase2TrackerModule::moduleType_
private

Definition at line 56 of file Phase2TrackerModule.h.

Referenced by getModuleType(), and setModuleType().

◆ powerGroup_

uint32_t Phase2TrackerModule::powerGroup_
private

Definition at line 58 of file Phase2TrackerModule.h.

Referenced by getPowerGroup(), and setPowerGroup().