CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes
DcsStatus Class Reference

#include <DcsStatus.h>

Classes

class  h
 Persistable copy of online DcsStatus flag values. More...
 

Public Types

enum  {
  EBp = 0, EBm = 1, EEp = 2, EEm = 3,
  HBHEa = 5, HBHEb = 6, HBHEc = 7, HF = 8,
  HO = 9, RPC = 12, DT0 = 13, DTp = 14,
  DTm = 15, CSCp = 16, CSCm = 17, CASTOR = 20,
  ZDC = 22, TIBTID = 24, TOB = 25, TECp = 26,
  TECm = 27, BPIX = 28, FPIX = 29, ESp = 30,
  ESm = 31, nPartitions = 25
}
 

Public Member Functions

unsigned int bunchNumber () const
 
timespec collectionTime () const
 
 DcsStatus ()
 
 DcsStatus (const unsigned char *rawData)
 
bool empty () const
 empty method (= false) More...
 
unsigned int eventID () const
 
float magnetCurrent () const
 
float magnetTemperature () const
 
std::string name () const
 name method More...
 
int operator!= (const DcsStatus &e) const
 inequality operator More...
 
int operator== (const DcsStatus &e) const
 equality operator More...
 
unsigned int ready () const
 
bool ready (int partitionNumber) const
 
unsigned int sourceID () const
 
unsigned int trigType () const
 
int version () const
 
virtual ~DcsStatus ()
 

Static Public Attributes

static const int partitionList []
 
static const char * partitionName []
 

Protected Attributes

unsigned int bunchNumber_
 
TimeSpec collectionTime_
 
unsigned int eventID_
 
float magnetCurrent_
 
float magnetTemperature_
 
unsigned int ready_
 
unsigned int sourceID_
 
unsigned int trigType_
 
int version_
 

Detailed Description

Definition at line 28 of file DcsStatus.h.

Member Enumeration Documentation

anonymous enum
Enumerator
EBp 
EBm 
EEp 
EEm 
HBHEa 
HBHEb 
HBHEc 
HF 
HO 
RPC 
DT0 
DTp 
DTm 
CSCp 
CSCm 
CASTOR 
ZDC 
TIBTID 
TOB 
TECp 
TECm 
BPIX 
FPIX 
ESp 
ESm 
nPartitions 

Definition at line 35 of file DcsStatus.h.

36  {
37  EBp = 0,
38  EBm = 1,
39  EEp = 2,
40  EEm = 3,
41  HBHEa = 5,
42  HBHEb = 6,
43  HBHEc = 7,
44  HF = 8,
45  HO = 9,
46  RPC = 12,
47  DT0 = 13,
48  DTp = 14,
49  DTm = 15,
50  CSCp = 16,
51  CSCm = 17,
52  CASTOR = 20,
53  ZDC = 22,
54  TIBTID = 24,
55  TOB = 25,
56  TECp = 26,
57  TECm = 27,
58  BPIX = 28,
59  FPIX = 29,
60  ESp = 30,
61  ESm = 31,
62  nPartitions = 25
63  };

Constructor & Destructor Documentation

DcsStatus::DcsStatus ( )

Definition at line 64 of file DcsStatus.cc.

Referenced by DcsStatus().

64  :
65  trigType_(0),
66  eventID_(0),
67  sourceID_(0),
68  bunchNumber_(0),
69  version_(0),
70  collectionTime_(0,0),
71  ready_(0),
72  magnetCurrent_((float)0.0),
73  magnetTemperature_((float)0.0)
74 {
75 }
unsigned int bunchNumber_
Definition: DcsStatus.h:103
unsigned int eventID_
Definition: DcsStatus.h:101
int version_
Definition: DcsStatus.h:105
unsigned int trigType_
Definition: DcsStatus.h:100
unsigned int ready_
Definition: DcsStatus.h:108
TimeSpec collectionTime_
Definition: DcsStatus.h:107
unsigned int sourceID_
Definition: DcsStatus.h:102
float magnetTemperature_
Definition: DcsStatus.h:110
float magnetCurrent_
Definition: DcsStatus.h:109
DcsStatus::DcsStatus ( const unsigned char *  rawData)

Definition at line 77 of file DcsStatus.cc.

References bunchNumber_, collectionTime_, DcsStatusRaw_v4::collectionTime_nsec, DcsStatusRaw_v4::collectionTime_sec, DcsStatus(), ScalersEventRecordRaw_v4::dcsStatus, eventID_, ScalersEventRecordRaw_v4::header, DcsStatusRaw_v4::magnetCurrent, magnetCurrent_, DcsStatusRaw_v4::magnetTemperature, magnetTemperature_, DcsStatusRaw_v4::ready, ready_, TimeSpec::set_tv_nsec(), TimeSpec::set_tv_sec(), sourceID_, trigType_, ScalersEventRecordRaw_v4::version, and version_.

78 {
79  DcsStatus();
80 
81  struct ScalersEventRecordRaw_v4 * raw
82  = (struct ScalersEventRecordRaw_v4 *)rawData;
83  trigType_ = ( raw->header >> 56 ) & 0xFULL;
84  eventID_ = ( raw->header >> 32 ) & 0x00FFFFFFULL;
85  sourceID_ = ( raw->header >> 8 ) & 0x00000FFFULL;
86  bunchNumber_ = ( raw->header >> 20 ) & 0xFFFULL;
87 
88  version_ = raw->version;
89  if ( version_ >= 4 )
90  {
91  collectionTime_.set_tv_sec(static_cast<long>(raw->dcsStatus.collectionTime_sec));
93  ready_ = raw->dcsStatus.ready;
96  }
97 }
unsigned int bunchNumber_
Definition: DcsStatus.h:103
void set_tv_nsec(long value)
Definition: TimeSpec.h:27
unsigned int eventID_
Definition: DcsStatus.h:101
unsigned long long header
Definition: ScalersRaw.h:222
int version_
Definition: DcsStatus.h:105
unsigned int ready
Definition: ScalersRaw.h:183
unsigned int collectionTime_sec
Definition: ScalersRaw.h:181
unsigned int trigType_
Definition: DcsStatus.h:100
unsigned int ready_
Definition: DcsStatus.h:108
TimeSpec collectionTime_
Definition: DcsStatus.h:107
unsigned int sourceID_
Definition: DcsStatus.h:102
float magnetCurrent
Definition: ScalersRaw.h:184
unsigned int collectionTime_nsec
Definition: ScalersRaw.h:182
void set_tv_sec(long value)
Definition: TimeSpec.h:26
float magnetTemperature_
Definition: DcsStatus.h:110
struct DcsStatusRaw_v4 dcsStatus
Definition: ScalersRaw.h:227
float magnetTemperature
Definition: ScalersRaw.h:185
float magnetCurrent_
Definition: DcsStatus.h:109
DcsStatus::~DcsStatus ( )
virtual

Definition at line 99 of file DcsStatus.cc.

99 { }

Member Function Documentation

unsigned int DcsStatus::bunchNumber ( ) const
inline

Definition at line 79 of file DcsStatus.h.

References bunchNumber_.

Referenced by operator<<().

79 { return(bunchNumber_);}
unsigned int bunchNumber_
Definition: DcsStatus.h:103
timespec DcsStatus::collectionTime ( ) const
inline

Definition at line 82 of file DcsStatus.h.

References collectionTime_, and TimeSpec::get_timespec().

Referenced by operator<<().

82 { return(collectionTime_.get_timespec());}
timespec get_timespec() const
Definition: TimeSpec.cc:4
TimeSpec collectionTime_
Definition: DcsStatus.h:107
bool DcsStatus::empty ( ) const
inline

empty method (= false)

Definition at line 74 of file DcsStatus.h.

Referenced by Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

74 { return false; }
unsigned int DcsStatus::eventID ( ) const
inline

Definition at line 77 of file DcsStatus.h.

References eventID_.

Referenced by operator<<().

77 { return(eventID_);}
unsigned int eventID_
Definition: DcsStatus.h:101
float DcsStatus::magnetCurrent ( ) const
inline

Definition at line 89 of file DcsStatus.h.

References magnetCurrent_.

Referenced by operator<<().

89 { return(magnetCurrent_);}
float magnetCurrent_
Definition: DcsStatus.h:109
float DcsStatus::magnetTemperature ( ) const
inline

Definition at line 90 of file DcsStatus.h.

References magnetTemperature_.

Referenced by operator<<().

90 { return(magnetTemperature_);}
float magnetTemperature_
Definition: DcsStatus.h:110
std::string DcsStatus::name ( ) const
inline
int DcsStatus::operator!= ( const DcsStatus e) const
inline

inequality operator

Definition at line 96 of file DcsStatus.h.

96 { return false; }
int DcsStatus::operator== ( const DcsStatus e) const
inline

equality operator

Definition at line 93 of file DcsStatus.h.

93 { return false; }
unsigned int DcsStatus::ready ( ) const
inline

Definition at line 84 of file DcsStatus.h.

References ready_.

Referenced by operator<<().

84 { return(ready_);}
unsigned int ready_
Definition: DcsStatus.h:108
bool DcsStatus::ready ( int  partitionNumber) const
inline

Definition at line 86 of file DcsStatus.h.

References ready_.

87  { return( (ready_ & ( 1 << partitionNumber )) != 0 );}
unsigned int ready_
Definition: DcsStatus.h:108
unsigned int DcsStatus::sourceID ( ) const
inline

Definition at line 78 of file DcsStatus.h.

References sourceID_.

Referenced by operator<<().

78 { return(sourceID_);}
unsigned int sourceID_
Definition: DcsStatus.h:102
unsigned int DcsStatus::trigType ( ) const
inline

Definition at line 76 of file DcsStatus.h.

References trigType_.

Referenced by operator<<().

76 { return(trigType_);}
unsigned int trigType_
Definition: DcsStatus.h:100
int DcsStatus::version ( ) const
inline

Definition at line 81 of file DcsStatus.h.

References version_.

Referenced by operator<<().

81 { return(version_);}
int version_
Definition: DcsStatus.h:105

Member Data Documentation

unsigned int DcsStatus::bunchNumber_
protected

Definition at line 103 of file DcsStatus.h.

Referenced by bunchNumber(), and DcsStatus().

TimeSpec DcsStatus::collectionTime_
protected

Definition at line 107 of file DcsStatus.h.

Referenced by collectionTime(), and DcsStatus().

unsigned int DcsStatus::eventID_
protected

Definition at line 101 of file DcsStatus.h.

Referenced by DcsStatus(), and eventID().

float DcsStatus::magnetCurrent_
protected

Definition at line 109 of file DcsStatus.h.

Referenced by DcsStatus(), and magnetCurrent().

float DcsStatus::magnetTemperature_
protected

Definition at line 110 of file DcsStatus.h.

Referenced by DcsStatus(), and magnetTemperature().

const int DcsStatus::partitionList
static
Initial value:
= {
EBp ,
EBm ,
EEp ,
EEm ,
HF ,
HO ,
RPC ,
DT0 ,
DTp ,
DTm ,
CSCp ,
CSCm ,
ZDC ,
TOB ,
TECp ,
TECm ,
BPIX ,
FPIX ,
ESp ,
ESm }

Definition at line 32 of file DcsStatus.h.

Referenced by DetStatus::DetStatus(), DetStatus::filter(), and operator<<().

const char * DcsStatus::partitionName
static
Initial value:
= {
"EBp" ,
"EBm" ,
"EEp" ,
"EEm" ,
"HBHEa" ,
"HBHEb" ,
"HBHEc" ,
"HF" ,
"HO" ,
"RPC" ,
"DT0" ,
"DTp" ,
"DTm" ,
"CSCp" ,
"CSCm" ,
"CASTOR" ,
"ZDC" ,
"TIBTID" ,
"TOB" ,
"TECp" ,
"TECm" ,
"BPIX" ,
"FPIX" ,
"ESp" ,
"ESm" }

Definition at line 33 of file DcsStatus.h.

Referenced by DetStatus::DetStatus(), DetStatus::filter(), and operator<<().

unsigned int DcsStatus::ready_
protected

Definition at line 108 of file DcsStatus.h.

Referenced by DcsStatus(), and ready().

unsigned int DcsStatus::sourceID_
protected

Definition at line 102 of file DcsStatus.h.

Referenced by DcsStatus(), and sourceID().

unsigned int DcsStatus::trigType_
protected

Definition at line 100 of file DcsStatus.h.

Referenced by DcsStatus(), and trigType().

int DcsStatus::version_
protected

Definition at line 105 of file DcsStatus.h.

Referenced by DcsStatus(), and version().