Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76271
b: "refs/heads/CMSSW_7_1_X"
c: 7c9e146
h: "refs/heads/CMSSW_7_1_X"
i:
  76269: 6a43642
  76267: 33df83d
  76263: 026a582
  76255: 3cd5c87
v: v3
  • Loading branch information
William Badgett Jr committed Oct 25, 2009
1 parent e3a24ec commit 691e139
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": 105402fcbe7d18fd78c56583dfa284902cb65078
"refs/heads/CMSSW_7_1_X": 7c9e1462040e035707b1b02dd273f7c26f6a70f4
59 changes: 32 additions & 27 deletions trunk/DataFormats/Scalers/interface/DcsStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,41 @@ class DcsStatus
{
public:

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

enum
{
EB_p = 0,
EB_minus = 1,
EE_plus = 2,
EE_minus = 3,
HBHEa = 5,
HBHEb = 6,
HBHEc = 7,
HF = 8,
HO = 9,
RPC = 12,
DT0 = 13,
DT_plus = 14,
DT_minus = 15,
CSC_plus = 16,
CSC_minus = 17,
DTTF = 18,
CSCTF = 19,
CASTOR = 20,
TIBTID = 24,
TOB = 25,
TEC_plus = 26,
TEC_minus = 27,
BPIX = 28,
FPIX = 29,
ES_plus = 30,
ES_minus = 31
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,
DTTF = 18,
CSCTF = 19,
CASTOR = 20,
TIBTID = 24,
TOB = 25,
TECp = 26,
TECm = 27,
BPIX = 28,
FPIX = 29,
ESp = 30,
ESm = 31,
nPartitions = 26
};


DcsStatus();
DcsStatus(const unsigned char * rawData);
virtual ~DcsStatus();
Expand All @@ -80,7 +85,7 @@ class DcsStatus
unsigned int ready() const { return(ready_);}

bool ready(int partitionNumber) const
{ return((ready_ & ( 1 << partitionNumber ) != 0 ));}
{ return( (ready_ & ( 1 << partitionNumber )) != 0 );}

/// equality operator
int operator==(const DcsStatus& e) const { return false; }
Expand Down
16 changes: 9 additions & 7 deletions trunk/DataFormats/Scalers/src/BeamSpot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,19 @@ std::ostream& operator<<(std::ostream& s, const BeamSpot& c)
c.trigType(), c.eventID(), c.bunchNumber());
s << line << std::endl;

sprintf(line," x: %e +/- %e y: %e +/- %e z: %e +/- %e",
c.x(), c.err_x(), c.y(), c.err_y(), c.z(), c.err_z());
sprintf(line," x: %e +/- %e width: %e +/- %e",
c.x(), c.err_x(), c.width_x(), c.err_width_x());
s << line << std::endl;

sprintf(line," width_x: %e +/- %e width_y: %e +/- %e sigma_z: %e +/- %e",
c.width_x(), c.err_width_x(),
c.width_y(), c.err_width_y(),
c.sigma_z(), c.err_sigma_z());
sprintf(line," y: %e +/- %e width: %e +/- %e",
c.y(), c.err_y(), c.width_y(), c.err_width_y());
s << line << std::endl;

sprintf(line," dxdy: %e +/- %e dxdz: %e +/- %e",
sprintf(line," z: %e +/- %e sigma: %e +/- %e",
c.z(), c.err_z(), c.sigma_z(), c.err_sigma_z());
s << line << std::endl;

sprintf(line," dxdy: %e +/- %e dydz: %e +/- %e",
c.dxdz(), c.err_dxdz(), c.dydz(), c.err_dydz());
s << line << std::endl;
return s;
Expand Down
68 changes: 68 additions & 0 deletions trunk/DataFormats/Scalers/src/DcsStatus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,62 @@
#include <cstdio>
#include <ostream>

const int DcsStatus::partitionList[DcsStatus::nPartitions] = {
EBp ,
EBm ,
EEp ,
EEm ,
HBHEa ,
HBHEb ,
HBHEc ,
HF ,
HO ,
RPC ,
DT0 ,
DTp ,
DTm ,
CSCp ,
CSCm ,
DTTF ,
CSCTF ,
CASTOR ,
TIBTID ,
TOB ,
TECp ,
TECm ,
BPIX ,
FPIX ,
ESp ,
ESm };

const char * DcsStatus::partitionName[DcsStatus::nPartitions] = {
"EBp" ,
"EBm" ,
"EEp" ,
"EEm" ,
"HBHEa" ,
"HBHEb" ,
"HBHEc" ,
"HF" ,
"HO" ,
"RPC" ,
"DT0" ,
"DTp" ,
"DTm" ,
"CSCp" ,
"CSCm" ,
"DTTF" ,
"CSCTF" ,
"CASTOR" ,
"TIBTID" ,
"TOB" ,
"TECp" ,
"TECm" ,
"BPIX" ,
"FPIX" ,
"ESp" ,
"ESm" };

DcsStatus::DcsStatus() :
trigType_(0),
eventID_(0),
Expand Down Expand Up @@ -65,5 +121,17 @@ std::ostream& operator<<(std::ostream& s, const DcsStatus& c)
sprintf(line," Ready: %d 0x%8.8X", c.ready(), c.ready());
s << line << std::endl;

for ( int i=0; i<DcsStatus::nPartitions; i++)
{
if ( c.ready(DcsStatus::partitionList[i]))
{
sprintf(line," %2d %6s: READY", i, DcsStatus::partitionName[i]);
}
else
{
sprintf(line," %2d %6s: NOT READY", i, DcsStatus::partitionName[i]);
}
s << line << std::endl;
}
return s;
}
14 changes: 14 additions & 0 deletions trunk/DataFormats/Scalers/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "DataFormats/Scalers/interface/Level1TriggerScalers.h"
#include "DataFormats/Scalers/interface/Level1TriggerRates.h"
#include "DataFormats/Scalers/interface/LumiScalers.h"
#include "DataFormats/Scalers/interface/DcsStatus.h"
#include "DataFormats/Scalers/interface/BeamSpot.h"
#include "DataFormats/Scalers/interface/TimeSpec.h"
#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/Common/interface/Ref.h"
Expand All @@ -22,20 +24,26 @@ namespace
Level1TriggerScalers level1TriggerScalers;
Level1TriggerRates level1TriggerRates;
LumiScalers lumiScalers;
DcsStatus dcsStatus;
BeamSpot beamSpot;

edm::Wrapper<L1AcceptBunchCrossing> w_l1AcceptBunchCrossing;
edm::Wrapper<L1TriggerScalers> w_l1TriggerScalers;
edm::Wrapper<L1TriggerRates> w_l1TriggerRates;
edm::Wrapper<Level1TriggerScalers> w_level1TriggerScalers;
edm::Wrapper<Level1TriggerRates> w_level1TriggerRates;
edm::Wrapper<LumiScalers> w_lumiScalers;
edm::Wrapper<DcsStatus> w_dcsStatus;
edm::Wrapper<BeamSpot> w_beamSpot;

edm::RefProd<L1AcceptBunchCrossing> l1AcceptBunchCrossingRef ;
edm::RefProd<L1TriggerScalers> l1TriggerScalersRef ;
edm::RefProd<L1TriggerRates> l1TriggerRatesRef ;
edm::RefProd<Level1TriggerScalers> level1TriggerScalersRef ;
edm::RefProd<Level1TriggerRates> level1TriggerRatesRef ;
edm::RefProd<LumiScalers> lumiScalersRef ;
edm::RefProd<DcsStatus> dcsStatusRef ;
edm::RefProd<BeamSpot> beamSpotRef ;

L1AcceptBunchCrossingCollection l1AcceptBunchCrossingCollection;
edm::Wrapper<L1AcceptBunchCrossingCollection>
Expand All @@ -55,5 +63,11 @@ namespace

LumiScalersCollection lumiScalersCollection;
edm::Wrapper<LumiScalersCollection> w_lumiScalersCollection;

DcsStatusCollection dcsStatusCollection;
edm::Wrapper<DcsStatusCollection> w_dcsStatusCollection;

BeamSpotCollection beamSpotCollection;
edm::Wrapper<BeamSpotCollection> w_beamSpotCollection;
};
}
10 changes: 10 additions & 0 deletions trunk/DataFormats/Scalers/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,39 @@
<class name="Level1TriggerScalers"/>
<class name="Level1TriggerRates"/>
<class name="LumiScalers"/>
<class name="DcsStatus"/>
<class name="BeamSpot"/>
<class name="TimeSpec"/>
<class name="std::vector<L1AcceptBunchCrossing>"/>
<class name="std::vector<L1TriggerScalers>"/>
<class name="std::vector<L1TriggerRates>"/>
<class name="std::vector<Level1TriggerScalers>"/>
<class name="std::vector<Level1TriggerRates>"/>
<class name="std::vector<LumiScalers>"/>
<class name="std::vector<DcsStatus>"/>
<class name="std::vector<BeamSpot>"/>
<class name="edm::RefProd<L1AcceptBunchCrossing>"/>
<class name="edm::RefProd<L1TriggerScalers>"/>
<class name="edm::RefProd<L1TriggerRates>"/>
<class name="edm::RefProd<Level1TriggerScalers>"/>
<class name="edm::RefProd<Level1TriggerRates>"/>
<class name="edm::RefProd<LumiScalers>"/>
<class name="edm::RefProd<DcsStatus>"/>
<class name="edm::RefProd<BeamSpot>"/>
<class name="edm::Wrapper<L1AcceptBunchCrossing>"/>
<class name="edm::Wrapper<L1TriggerScalers>"/>
<class name="edm::Wrapper<L1TriggerRates>"/>
<class name="edm::Wrapper<Level1TriggerScalers>"/>
<class name="edm::Wrapper<Level1TriggerRates>"/>
<class name="edm::Wrapper<LumiScalers>"/>
<class name="edm::Wrapper<DcsStatus>"/>
<class name="edm::Wrapper<BeamSpot>"/>
<class name="edm::Wrapper<std::vector<L1AcceptBunchCrossing>>"/>
<class name="edm::Wrapper<std::vector<L1TriggerScalers>>"/>
<class name="edm::Wrapper<std::vector<L1TriggerRates>>"/>
<class name="edm::Wrapper<std::vector<Level1TriggerScalers>>"/>
<class name="edm::Wrapper<std::vector<Level1TriggerRates>>"/>
<class name="edm::Wrapper<std::vector<LumiScalers>>"/>
<class name="edm::Wrapper<std::vector<DcsStatus>>"/>
<class name="edm::Wrapper<std::vector<BeamSpot>>"/>
</lcgdict>

0 comments on commit 691e139

Please sign in to comment.