CMS 3D CMS Logo

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

Container class for database partition parameters. More...

#include <SiStripPartition.h>

Public Types

typedef std::pair< uint32_t, uint32_t > Versions
 

Public Member Functions

Versions apvCalibVersion () const
 
Versions apvLatencyVersion () const
 
Versions apvTimingVersion () const
 
Versions cabVersion () const
 
Versions dcuVersion () const
 
Versions fastCablingVersion () const
 
Versions fecVersion () const
 
Versions fedVersion () const
 
Versions fineDelayVersion () const
 
bool forceCurrentState () const
 
void forceCurrentState (bool)
 
bool forceVersions () const
 
void forceVersions (bool)
 
uint32_t globalAnalysisVersion () const
 
std::string inputDcuInfoXml () const
 
std::vector< std::string > inputFecXml () const
 
std::vector< std::string > inputFedXml () const
 
std::string inputModuleXml () const
 
Versions maskVersion () const
 
bool operator!= (const SiStripPartition &) const
 
SiStripPartitionoperator= (const SiStripPartition &)
 
bool operator== (const SiStripPartition &) const
 
Versions optoScanVersion () const
 
std::string partitionName () const
 
void partitionName (std::string)
 
Versions pedestalsVersion () const
 
Versions pedsFullNoiseVersion () const
 
void print (std::stringstream &, bool using_db=false) const
 
void pset (const edm::ParameterSet &)
 
Versions psuVersion () const
 
void reset ()
 
uint32_t runNumber () const
 
void runNumber (uint32_t)
 
Versions runTableVersion () const
 
sistrip::RunType runType () const
 
 SiStripPartition ()
 
 SiStripPartition (std::string partition_name)
 
 SiStripPartition (const SiStripPartition &)
 
void update (const SiStripConfigDb *const )
 
Versions vpspScanVersion () const
 
 ~SiStripPartition ()
 

Static Public Attributes

static const std::string defaultPartitionName_ = "DefaultPartition"
 

Private Member Functions

Versions versions (const std::vector< uint32_t > &)
 

Private Attributes

Versions apvCalibV_
 
Versions apvLatencyV_
 
Versions apvTimingV_
 
Versions cabVersion_
 
Versions dcuVersion_
 
Versions fastCablingV_
 
Versions fecVersion_
 
Versions fedVersion_
 
Versions fineDelayV_
 
bool forceCurrentState_
 
bool forceVersions_
 
uint32_t globalAnalysisV_
 
std::string inputDcuInfoXml_
 
std::vector< std::string > inputFecXml_
 
std::vector< std::string > inputFedXml_
 
std::string inputModuleXml_
 
Versions maskVersion_
 
Versions optoScanV_
 
std::string partitionName_
 
Versions pedestalsV_
 
Versions pedsFullNoiseV_
 
Versions psuVersion_
 
uint32_t runNumber_
 
Versions runTableVersion_
 
sistrip::RunType runType_
 
Versions vpspScanV_
 

Detailed Description

Container class for database partition parameters.

Author
R.Bainbridge

Definition at line 24 of file SiStripPartition.h.

Member Typedef Documentation

typedef std::pair<uint32_t,uint32_t> SiStripPartition::Versions

Definition at line 44 of file SiStripPartition.h.

Constructor & Destructor Documentation

SiStripPartition::SiStripPartition ( )

Definition at line 17 of file SiStripPartition.cc.

17  :
19  runNumber_(0),
21  forceVersions_(false),
22  forceCurrentState_(false),
23  cabVersion_(0,0),
24  fedVersion_(0,0),
25  fecVersion_(0,0),
26  dcuVersion_(0,0),
27  psuVersion_(0,0),
28  //#ifdef USING_DATABASE_MASKING
29  maskVersion_(0,0),
30  //#endif
32  runTableVersion_(0,0),
33  fastCablingV_(0,0),
34  apvTimingV_(0,0),
35  optoScanV_(0,0),
36  vpspScanV_(0,0),
37  apvCalibV_(0,0),
38  pedestalsV_(0,0),
39  pedsFullNoiseV_(0,0),
40  apvLatencyV_(0,0),
41  fineDelayV_(0,0),
42  inputModuleXml_(""),
43  inputDcuInfoXml_(""),
44  inputFecXml_(),
45  inputFedXml_()
46 {;}
sistrip::RunType runType_
static const std::string defaultPartitionName_
std::string partitionName_
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
SiStripPartition::SiStripPartition ( std::string  partition_name)

Definition at line 50 of file SiStripPartition.cc.

References defaultPartitionName_, and partitionName_.

50  :
51  partitionName_(partition),
52  runNumber_(0),
54  forceVersions_(false),
55  forceCurrentState_(false),
56  cabVersion_(0,0),
57  fedVersion_(0,0),
58  fecVersion_(0,0),
59  dcuVersion_(0,0),
60  psuVersion_(0,0),
61  //#ifdef USING_DATABASE_MASKING
62  maskVersion_(0,0),
63  //#endif
65  runTableVersion_(0,0),
66  fastCablingV_(0,0),
67  apvTimingV_(0,0),
68  optoScanV_(0,0),
69  vpspScanV_(0,0),
70  apvCalibV_(0,0),
71  pedestalsV_(0,0),
72  pedsFullNoiseV_(0,0),
73  apvLatencyV_(0,0),
74  fineDelayV_(0,0),
75  inputModuleXml_(""),
76  inputDcuInfoXml_(""),
77  inputFecXml_(),
78  inputFedXml_()
79 {
81 }
sistrip::RunType runType_
static const std::string defaultPartitionName_
std::string partitionName_
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
SiStripPartition::SiStripPartition ( const SiStripPartition input)

Definition at line 85 of file SiStripPartition.cc.

85  :
86  partitionName_( input.partitionName() ),
87  runNumber_( input.runNumber() ),
88  runType_( input.runType() ),
89  forceVersions_( input.forceVersions() ),
91  cabVersion_( input.cabVersion() ),
92  fedVersion_( input.fedVersion() ),
93  fecVersion_( input.fecVersion() ),
94  dcuVersion_( input.dcuVersion() ),
95  psuVersion_( input.psuVersion() ),
96  //#ifdef USING_DATABASE_MASKING
97  maskVersion_( input.maskVersion() ),
98  //#endif
102  apvTimingV_( input.apvTimingVersion() ),
103  optoScanV_( input.optoScanVersion() ),
104  vpspScanV_( input.vpspScanVersion() ),
105  apvCalibV_( input.apvCalibVersion() ),
106  pedestalsV_( input.pedestalsVersion() ),
108  apvLatencyV_( input.apvLatencyVersion() ),
109  fineDelayV_( input.fineDelayVersion() ),
110  inputModuleXml_( input.inputModuleXml() ),
112  inputFecXml_( input.inputFecXml() ),
113  inputFedXml_( input.inputFedXml() )
114 {;}
sistrip::RunType runType_
Versions maskVersion() const
Versions pedestalsVersion() const
Versions vpspScanVersion() const
Versions fineDelayVersion() const
Versions optoScanVersion() const
std::string partitionName() const
std::string partitionName_
uint32_t runNumber() const
uint32_t globalAnalysisVersion() const
Versions apvTimingVersion() const
Versions apvLatencyVersion() const
std::vector< std::string > inputFedXml_
Versions runTableVersion() const
std::vector< std::string > inputFecXml() const
bool forceCurrentState() const
Versions pedsFullNoiseVersion() const
std::string inputDcuInfoXml_
std::string inputModuleXml_
Versions apvCalibVersion() const
std::vector< std::string > inputFecXml_
std::vector< std::string > inputFedXml() const
Versions dcuVersion() const
bool forceVersions() const
Versions psuVersion() const
sistrip::RunType runType() const
Versions fecVersion() const
Versions cabVersion() const
Versions fedVersion() const
std::string inputDcuInfoXml() const
std::string inputModuleXml() const
Versions fastCablingVersion() const
SiStripPartition::~SiStripPartition ( )

Definition at line 192 of file SiStripPartition.cc.

References inputFecXml_, and inputFedXml_.

192  {
193  inputFecXml_.clear();
194  inputFedXml_.clear();
195 }
std::vector< std::string > inputFedXml_
std::vector< std::string > inputFecXml_

Member Function Documentation

SiStripPartition::Versions SiStripPartition::apvCalibVersion ( ) const
inline

Definition at line 215 of file SiStripPartition.h.

References apvCalibV_.

Referenced by operator=(), and operator==().

215 { return apvCalibV_; }
SiStripPartition::Versions SiStripPartition::apvLatencyVersion ( ) const
inline

Definition at line 218 of file SiStripPartition.h.

References apvLatencyV_.

Referenced by operator=(), and operator==().

218 { return apvLatencyV_; }
SiStripPartition::Versions SiStripPartition::apvTimingVersion ( ) const
inline
SiStripPartition::Versions SiStripPartition::cabVersion ( ) const
inline
SiStripPartition::Versions SiStripPartition::dcuVersion ( ) const
inline

Definition at line 203 of file SiStripPartition.h.

References dcuVersion_.

Referenced by operator=(), and operator==().

203 { return dcuVersion_; }
SiStripPartition::Versions SiStripPartition::fastCablingVersion ( ) const
inline

Definition at line 211 of file SiStripPartition.h.

References fastCablingV_.

Referenced by operator=(), and operator==().

211 { return fastCablingV_; }
SiStripPartition::Versions SiStripPartition::fecVersion ( ) const
inline
SiStripPartition::Versions SiStripPartition::fedVersion ( ) const
inline
SiStripPartition::Versions SiStripPartition::fineDelayVersion ( ) const
inline

Definition at line 219 of file SiStripPartition.h.

References fineDelayV_.

Referenced by operator=(), and operator==().

219 { return fineDelayV_; }
bool SiStripPartition::forceCurrentState ( ) const
inline

Definition at line 198 of file SiStripPartition.h.

References forceCurrentState_.

Referenced by operator=(), and operator==().

198 { return forceCurrentState_; }
void SiStripPartition::forceCurrentState ( bool  force)
inline
bool SiStripPartition::forceVersions ( ) const
inline

Definition at line 197 of file SiStripPartition.h.

References forceVersions_.

Referenced by operator=(), and operator==().

197 { return forceVersions_; }
void SiStripPartition::forceVersions ( bool  force)
inline
uint32_t SiStripPartition::globalAnalysisVersion ( ) const
inline

Definition at line 209 of file SiStripPartition.h.

References globalAnalysisV_.

Referenced by operator=(), and operator==().

209 { return globalAnalysisV_; }
std::string SiStripPartition::inputDcuInfoXml ( ) const
inline

Definition at line 222 of file SiStripPartition.h.

References inputDcuInfoXml_.

Referenced by operator=(), and operator==().

222 { return inputDcuInfoXml_; }
std::string inputDcuInfoXml_
std::vector< std::string > SiStripPartition::inputFecXml ( ) const
inline

Definition at line 223 of file SiStripPartition.h.

References inputFecXml_.

Referenced by operator=(), and operator==().

223 { return inputFecXml_; }
std::vector< std::string > inputFecXml_
std::vector< std::string > SiStripPartition::inputFedXml ( ) const
inline

Definition at line 224 of file SiStripPartition.h.

References inputFedXml_.

Referenced by operator=(), and operator==().

224 { return inputFedXml_; }
std::vector< std::string > inputFedXml_
std::string SiStripPartition::inputModuleXml ( ) const
inline

Definition at line 221 of file SiStripPartition.h.

References inputModuleXml_.

Referenced by operator=(), and operator==().

221 { return inputModuleXml_; }
std::string inputModuleXml_
SiStripPartition::Versions SiStripPartition::maskVersion ( ) const
inline
bool SiStripPartition::operator!= ( const SiStripPartition input) const

Definition at line 186 of file SiStripPartition.cc.

References input.

186  {
187  return !( *this == input );
188 }
static std::string const input
Definition: EdmProvDump.cc:44
SiStripPartition & SiStripPartition::operator= ( const SiStripPartition input)

Definition at line 118 of file SiStripPartition.cc.

References apvCalibV_, apvCalibVersion(), apvLatencyV_, apvLatencyVersion(), apvTimingV_, apvTimingVersion(), cabVersion(), cabVersion_, dcuVersion(), dcuVersion_, fastCablingV_, fastCablingVersion(), fecVersion(), fecVersion_, fedVersion(), fedVersion_, fineDelayV_, fineDelayVersion(), forceCurrentState(), forceCurrentState_, forceVersions(), forceVersions_, globalAnalysisV_, globalAnalysisVersion(), inputDcuInfoXml(), inputDcuInfoXml_, inputFecXml(), inputFecXml_, inputFedXml(), inputFedXml_, inputModuleXml(), inputModuleXml_, maskVersion(), maskVersion_, optoScanV_, optoScanVersion(), partitionName(), partitionName_, pedestalsV_, pedestalsVersion(), pedsFullNoiseV_, pedsFullNoiseVersion(), psuVersion(), psuVersion_, runNumber(), runNumber_, runTableVersion(), runTableVersion_, runType(), runType_, vpspScanV_, and vpspScanVersion().

118  {
119  if ( this == &input ) { return *this; } // self-assignment
120  partitionName_ = input.partitionName();
121  runNumber_ = input.runNumber();
122  runType_ = input.runType();
123  forceVersions_ = input.forceVersions();
125  cabVersion_ = input.cabVersion();
126  fedVersion_ = input.fedVersion();
127  fecVersion_ = input.fecVersion();
128  dcuVersion_ = input.dcuVersion();
129  psuVersion_ = input.psuVersion();
130  //#ifdef USING_DATABASE_MASKING
131  maskVersion_ = input.maskVersion();
132  //#endif
136  apvTimingV_ = input.apvTimingVersion();
137  optoScanV_ = input.optoScanVersion();
138  vpspScanV_ = input.vpspScanVersion();
139  apvCalibV_ = input.apvCalibVersion();
140  pedestalsV_ = input.pedestalsVersion();
143  fineDelayV_ = input.fineDelayVersion();
146  inputFecXml_ = input.inputFecXml();
147  inputFedXml_ = input.inputFedXml();
148  return *this;
149 }
sistrip::RunType runType_
Versions maskVersion() const
Versions pedestalsVersion() const
Versions vpspScanVersion() const
Versions fineDelayVersion() const
Versions optoScanVersion() const
std::string partitionName() const
std::string partitionName_
uint32_t runNumber() const
uint32_t globalAnalysisVersion() const
Versions apvTimingVersion() const
Versions apvLatencyVersion() const
std::vector< std::string > inputFedXml_
Versions runTableVersion() const
std::vector< std::string > inputFecXml() const
bool forceCurrentState() const
Versions pedsFullNoiseVersion() const
std::string inputDcuInfoXml_
std::string inputModuleXml_
Versions apvCalibVersion() const
std::vector< std::string > inputFecXml_
std::vector< std::string > inputFedXml() const
Versions dcuVersion() const
bool forceVersions() const
Versions psuVersion() const
sistrip::RunType runType() const
Versions fecVersion() const
Versions cabVersion() const
Versions fedVersion() const
std::string inputDcuInfoXml() const
std::string inputModuleXml() const
Versions fastCablingVersion() const
bool SiStripPartition::operator== ( const SiStripPartition input) const

Definition at line 153 of file SiStripPartition.cc.

References apvCalibV_, apvCalibVersion(), apvLatencyV_, apvLatencyVersion(), apvTimingV_, apvTimingVersion(), cabVersion(), cabVersion_, dcuVersion(), dcuVersion_, fastCablingV_, fastCablingVersion(), fecVersion(), fecVersion_, fedVersion(), fedVersion_, fineDelayV_, fineDelayVersion(), forceCurrentState(), forceCurrentState_, forceVersions(), forceVersions_, globalAnalysisV_, globalAnalysisVersion(), inputDcuInfoXml(), inputDcuInfoXml_, inputFecXml(), inputFecXml_, inputFedXml(), inputFedXml_, inputModuleXml(), inputModuleXml_, maskVersion(), maskVersion_, optoScanV_, optoScanVersion(), partitionName(), partitionName_, pedestalsV_, pedestalsVersion(), pedsFullNoiseV_, pedsFullNoiseVersion(), psuVersion(), psuVersion_, runNumber(), runNumber_, runTableVersion(), runTableVersion_, runType(), runType_, vpspScanV_, and vpspScanVersion().

153  {
154  return ( partitionName_ == input.partitionName() &&
155  runNumber_ == input.runNumber() &&
156  runType_ == input.runType() &&
157  forceVersions_ == input.forceVersions() &&
159  cabVersion_ == input.cabVersion() &&
160  fedVersion_ == input.fedVersion() &&
161  fecVersion_ == input.fecVersion() &&
162  dcuVersion_ == input.dcuVersion() &&
163  psuVersion_ == input.psuVersion() &&
164  //#ifdef USING_DATABASE_MASKING
165  maskVersion_ == input.maskVersion() &&
166  //#endif
168  runTableVersion_ == input.runTableVersion() &&
169  fastCablingV_ == input.fastCablingVersion() &&
170  apvTimingV_ == input.apvTimingVersion() &&
171  optoScanV_ == input.optoScanVersion() &&
172  vpspScanV_ == input.vpspScanVersion() &&
173  apvCalibV_ == input.apvCalibVersion() &&
174  pedestalsV_ == input.pedestalsVersion() &&
176  apvLatencyV_ == input.apvLatencyVersion() &&
177  fineDelayV_ == input.fineDelayVersion() &&
178  inputModuleXml_ == input.inputModuleXml() &&
179  inputDcuInfoXml_ == input.inputDcuInfoXml() &&
180  inputFecXml_ == input.inputFecXml() &&
181  inputFedXml_ == input.inputFedXml() );
182 }
sistrip::RunType runType_
Versions maskVersion() const
Versions pedestalsVersion() const
Versions vpspScanVersion() const
Versions fineDelayVersion() const
Versions optoScanVersion() const
std::string partitionName() const
std::string partitionName_
uint32_t runNumber() const
uint32_t globalAnalysisVersion() const
Versions apvTimingVersion() const
Versions apvLatencyVersion() const
std::vector< std::string > inputFedXml_
Versions runTableVersion() const
std::vector< std::string > inputFecXml() const
bool forceCurrentState() const
Versions pedsFullNoiseVersion() const
std::string inputDcuInfoXml_
std::string inputModuleXml_
Versions apvCalibVersion() const
std::vector< std::string > inputFecXml_
std::vector< std::string > inputFedXml() const
Versions dcuVersion() const
bool forceVersions() const
Versions psuVersion() const
sistrip::RunType runType() const
Versions fecVersion() const
Versions cabVersion() const
Versions fedVersion() const
std::string inputDcuInfoXml() const
std::string inputModuleXml() const
Versions fastCablingVersion() const
SiStripPartition::Versions SiStripPartition::optoScanVersion ( ) const
inline

Definition at line 213 of file SiStripPartition.h.

References optoScanV_.

Referenced by operator=(), and operator==().

213 { return optoScanV_; }
std::string SiStripPartition::partitionName ( ) const
inline
void SiStripPartition::partitionName ( std::string  name)
inline

Definition at line 226 of file SiStripPartition.h.

References dataset::name, and partitionName_.

226 { partitionName_ = name ; }
std::string partitionName_
SiStripPartition::Versions SiStripPartition::pedestalsVersion ( ) const
inline

Definition at line 216 of file SiStripPartition.h.

References pedestalsV_.

Referenced by operator=(), and operator==().

216 { return pedestalsV_; }
SiStripPartition::Versions SiStripPartition::pedsFullNoiseVersion ( ) const
inline

Definition at line 217 of file SiStripPartition.h.

References pedsFullNoiseV_.

Referenced by operator=(), and operator==().

217 { return pedsFullNoiseV_; }
void SiStripPartition::print ( std::stringstream &  ss,
bool  using_db = false 
) const

Definition at line 738 of file SiStripPartition.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, sistrip::CALIBRATION, dcuVersion_, sistrip::FAST_CABLING, fastCablingV_, fecVersion_, fedVersion_, sistrip::FINE_DELAY_TTC, fineDelayV_, forceCurrentState_, forceVersions_, globalAnalysisV_, inputDcuInfoXml_, inputFecXml_, inputFedXml_, inputModuleXml_, maskVersion_, sistrip::OPTO_SCAN, optoScanV_, partitionName_, sistrip::PEDESTALS, pedestalsV_, sistrip::PEDS_FULL_NOISE, pedsFullNoiseV_, sistrip::PHYSICS, psuVersion_, runNumber_, runTableVersion_, SiStripEnumsAndStrings::runType(), runType_, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

Referenced by operator<<().

738  {
739 
740  ss << " Partition : \"" << partitionName_ << "\"" << std::endl;
741 
742  if ( using_db ) {
743 
744  ss << " Run number : ";
745  if ( forceCurrentState_ ) { ss << "Forced \"current state\"! (equivalent to versions below)"; }
746  else if ( forceVersions_ ) { ss << "Forced versions specified below!"; }
747  else /* use run number */ { ss << runNumber_; }
748 
749  ss << std::endl;
750  if ( !forceVersions_ ) {
751  ss << " Run type : " << SiStripEnumsAndStrings::runType( runType_ ) << std::endl;
752  }
753 
754  ss << " Cabling major/minor vers : " << cabVersion_.first << "." << cabVersion_.second << std::endl
755  << " FEC major/minor vers : " << fecVersion_.first << "." << fecVersion_.second << std::endl
756  << " FED major/minor vers : " << fedVersion_.first << "." << fedVersion_.second << std::endl
757  << " DCU-DetId map maj/min vers : " << dcuVersion_.first << "." << dcuVersion_.second << std::endl
758  //#ifdef USING_DATABASE_MASKING
759  << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl
760  << " Mask maj/min vers : " << maskVersion_.first << "." << maskVersion_.second << std::endl;
761  //#else
762  // << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl;
763  //#endif
764 
765  ss << " Global analysis version : " << globalAnalysisV_ << std::endl;
766 
767 
768  if ( runType_ == sistrip::PHYSICS ||
771 
772  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
773  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
774  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
775  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
776  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
777  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
778  ss << " PedsFullNoise maj/min vers : " << pedsFullNoiseV_.first << "." << pedsFullNoiseV_.second << std::endl;
779  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
780  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
781 
782  } else {
783 
784  if ( runType_ != sistrip::FAST_CABLING ) {
785  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
786  } else {
787  ss << " FED cabling maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
788  << " <= This \"state\" version overriden by \"history\" version "
789  << fastCablingV_.first << "." << fastCablingV_.second
790  << " for this FED cabling run!" << std::endl;
791  }
792 
793  if ( runType_ != sistrip::APV_TIMING ) {
794  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
795  } else {
796  ss << " APV timing maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
797  << " <= This \"state\" version overriden by \"history\" version "
798  << apvTimingV_.first << "." << apvTimingV_.second
799  << " for this APV timing run!" << std::endl;
800  }
801 
802  if ( runType_ != sistrip::OPTO_SCAN ) {
803  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
804  } else {
805  ss << " Opto scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
806  << " <= This \"state\" version overriden by \"history\" version "
807  << optoScanV_.first << "." << optoScanV_.second
808  << " for this opto scan run!" << std::endl;
809  }
810 
811  if ( runType_ != sistrip::VPSP_SCAN ) {
812  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
813  } else {
814  ss << " VPSP scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
815  << " <= This \"state\" version overriden by \"history\" version "
816  << vpspScanV_.first << "." << vpspScanV_.second
817  << " for this VPSP scan run!" << std::endl;
818  }
819 
820  if ( runType_ != sistrip::CALIBRATION ) {
821  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
822  } else {
823  ss << " APV calib maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
824  << " <= This \"state\" version overriden by \"history\" version "
825  << apvCalibV_.first << "." << apvCalibV_.second
826  << " for this APV calib run!" << std::endl;
827  }
828 
829  if ( runType_ != sistrip::PEDESTALS ) {
830  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
831  } else {
832  ss << " Pedestals maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
833  << " <= This \"state\" version overriden by \"history\" version "
834  << pedestalsV_.first << "." << pedestalsV_.second
835  << " for this pedestals run!" << std::endl;
836  }
837 
839  ss << " PedsFullNoise maj/min vers : " << pedsFullNoiseV_.first << "." << pedsFullNoiseV_.second << std::endl;
840  } else {
841  ss << " Pedestals maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
842  << " <= This \"state\" version overriden by \"history\" version "
843  << pedsFullNoiseV_.first << "." << pedsFullNoiseV_.second
844  << " for this pedestals run!" << std::endl;
845  }
846 
847  if ( runType_ != sistrip::APV_LATENCY ) {
848  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
849  } else {
850  ss << " APV latency maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
851  << " <= This \"state\" version overriden by \"history\" version "
852  << apvLatencyV_.first << "." << apvLatencyV_.second
853  << " for this APV latency run!" << std::endl;
854  }
855 
856  if ( runType_ != sistrip::FINE_DELAY_TTC ) {
857  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
858  } else {
859  ss << " Fine delay maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
860  << " <= This \"state\" version overriden by \"history\" version "
861  << fineDelayV_.first << "." << fineDelayV_.second
862  << " for this fine delay run!" << std::endl;
863  }
864 
865  }
866 
867  } else {
868 
869  ss << " Input \"module.xml\" file : " << inputModuleXml_ << std::endl
870  << " Input \"dcuinfo.xml\" file : " << inputDcuInfoXml_ << std::endl
871  << " Input \"fec.xml\" file(s) : ";
872  std::vector<std::string>::const_iterator ifec = inputFecXml_.begin();
873  for ( ; ifec != inputFecXml_.end(); ifec++ ) { ss << *ifec << ", "; }
874  ss << std::endl;
875  ss << " Input \"fed.xml\" file(s) : ";
876  std::vector<std::string>::const_iterator ifed = inputFedXml_.begin();
877  for ( ; ifed != inputFedXml_.end(); ifed++ ) { ss << *ifed << ", "; }
878  ss << std::endl;
879 
880  }
881 
882 }
sistrip::RunType runType_
std::string partitionName_
static std::string runType(const sistrip::RunType &)
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
void SiStripPartition::pset ( const edm::ParameterSet pset)

Definition at line 235 of file SiStripPartition.cc.

References apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, dcuVersion_, funct::false, fastCablingV_, fecVersion_, fedVersion_, fineDelayV_, forceCurrentState_, forceVersions_, edm::ParameterSet::getUntrackedParameter(), globalAnalysisV_, inputDcuInfoXml_, inputFecXml_, inputFedXml_, inputModuleXml_, maskVersion_, optoScanV_, partitionName_, pedestalsV_, pedsFullNoiseV_, psuVersion_, runNumber_, AlCaHLTBitMon_QueryRunRegistry::string, versions(), and vpspScanV_.

Referenced by SiStripDbParams::pset().

235  {
236 
237  partitionName_ = pset.getUntrackedParameter<std::string>( "PartitionName", "" );
238  runNumber_ = pset.getUntrackedParameter<unsigned int>( "RunNumber", 0 );
239  forceVersions_ = pset.getUntrackedParameter<bool>( "ForceVersions", false );
240  forceCurrentState_ = pset.getUntrackedParameter<bool>( "ForceCurrentState", false );
241 
242  std::vector<uint32_t> tmp1(2,0);
243  cabVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "CablingVersion", tmp1 ) );
244  fedVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FedVersion", tmp1 ) );
245  fecVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FecVersion", tmp1 ) );
246  dcuVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "DcuDetIdsVersion", tmp1 ) );
247  psuVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "DcuPsuMapVersion", tmp1 ) );
248  //#ifdef USING_DATABASE_MASKING
249  maskVersion_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "MaskVersion", tmp1 ) );
250  //#endif
251 
252  std::vector<uint32_t> tmp2(2,0);
253  globalAnalysisV_ = pset.getUntrackedParameter<uint32_t>( "GlobalAnalysisVersion", 0 );
254  fastCablingV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FastCablingVersion", tmp2 ) );
255  apvTimingV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvTimingVersion", tmp2 ) );
256  optoScanV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "OptoScanVersion", tmp2 ) );
257  vpspScanV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "VpspScanVersion", tmp2 ) );
258  apvCalibV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvCalibVersion", tmp2 ) );
259  pedestalsV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "PedestalsVersion", tmp2 ) );
260  pedsFullNoiseV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "PedsFullNoiseVersion", tmp2 ) );
261  apvLatencyV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "ApvLatencyVersion", tmp2 ) );
262  fineDelayV_ = versions( pset.getUntrackedParameter< std::vector<uint32_t> >( "FineDelayVersion", tmp2 ) );
263 
264  std::vector<std::string> tmp3(1,"");
265  inputModuleXml_ = pset.getUntrackedParameter<std::string>( "InputModuleXml", "" );
266  inputDcuInfoXml_ = pset.getUntrackedParameter<std::string>( "InputDcuInfoXml", "" );
267  inputFecXml_ = pset.getUntrackedParameter< std::vector<std::string> >( "InputFecXml", tmp3 );
268  inputFedXml_ = pset.getUntrackedParameter< std::vector<std::string> >( "InputFedXml", tmp3 );
269 
270 }
T getUntrackedParameter(std::string const &, T const &) const
std::string partitionName_
Versions versions(const std::vector< uint32_t > &)
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
SiStripPartition::Versions SiStripPartition::psuVersion ( ) const
inline

Definition at line 204 of file SiStripPartition.h.

References psuVersion_.

Referenced by operator=(), and operator==().

204 { return psuVersion_; }
void SiStripPartition::reset ( void  )

Definition at line 199 of file SiStripPartition.cc.

References apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, dcuVersion_, fastCablingV_, fecVersion_, fedVersion_, fineDelayV_, forceCurrentState_, forceVersions_, globalAnalysisV_, inputDcuInfoXml_, inputFecXml_, inputFedXml_, inputModuleXml_, maskVersion_, optoScanV_, partitionName_, pedestalsV_, pedsFullNoiseV_, psuVersion_, runNumber_, runTableVersion_, runType_, sistrip::UNDEFINED_RUN_TYPE, and vpspScanV_.

199  {
200  partitionName_ = "";
201  runNumber_ = 0;
203  forceVersions_ = false;
204  forceCurrentState_ = false;
205 
206  cabVersion_ = std::make_pair(0,0);
207  fedVersion_ = std::make_pair(0,0);
208  fecVersion_ = std::make_pair(0,0);
209  dcuVersion_ = std::make_pair(0,0);
210  psuVersion_ = std::make_pair(0,0);
211  //#ifdef USING_DATABASE_MASKING
212  maskVersion_ = std::make_pair(0,0);
213  //#endif
214 
215  globalAnalysisV_ = 0;
216  runTableVersion_ = std::make_pair(0,0);
217  fastCablingV_ = std::make_pair(0,0);
218  apvTimingV_ = std::make_pair(0,0);
219  optoScanV_ = std::make_pair(0,0);
220  vpspScanV_ = std::make_pair(0,0);
221  apvCalibV_ = std::make_pair(0,0);
222  pedestalsV_ = std::make_pair(0,0);
223  pedsFullNoiseV_ = std::make_pair(0,0);
224  apvLatencyV_ = std::make_pair(0,0);
225  fineDelayV_ = std::make_pair(0,0);
226 
227  inputModuleXml_ = "";
228  inputDcuInfoXml_ = "";
229  inputFecXml_.clear(); inputFecXml_.push_back("");
230  inputFedXml_.clear(); inputFedXml_.push_back("");
231 }
sistrip::RunType runType_
std::string partitionName_
std::vector< std::string > inputFedXml_
std::string inputDcuInfoXml_
std::string inputModuleXml_
std::vector< std::string > inputFecXml_
uint32_t SiStripPartition::runNumber ( ) const
inline

Definition at line 195 of file SiStripPartition.h.

References runNumber_.

Referenced by operator=(), and operator==().

195 { return runNumber_; }
void SiStripPartition::runNumber ( uint32_t  run)
inline

Definition at line 227 of file SiStripPartition.h.

References findQualityFiles::run, and runNumber_.

SiStripPartition::Versions SiStripPartition::runTableVersion ( ) const
inline

Definition at line 210 of file SiStripPartition.h.

References runTableVersion_.

Referenced by operator=(), and operator==().

210 { return runTableVersion_; }
sistrip::RunType SiStripPartition::runType ( ) const
inline

Definition at line 196 of file SiStripPartition.h.

References runType_.

Referenced by operator=(), and operator==().

196 { return runType_; }
sistrip::RunType runType_
void SiStripPartition::update ( const SiStripConfigDb * const  db)

Definition at line 274 of file SiStripPartition.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, sistrip::CALIBRATION, sistrip::CALIBRATION_DECO, sistrip::DAQ_SCOPE_MODE, dcuVersion_, defaultPartitionName_, SiStripConfigDb::deviceFactory(), sistrip::FAST_CABLING, fastCablingV_, fecVersion_, sistrip::FED_CABLING, sistrip::FED_TIMING, fedVersion_, sistrip::FINE_DELAY_PLL, sistrip::FINE_DELAY_TTC, fineDelayV_, forceCurrentState_, forceVersions_, globalAnalysisV_, SiStripConfigDb::handleException(), LogTrace, maskVersion_, sistrip::mlConfigDb_, sistrip::MULTI_MODE, sistrip::OPTO_SCAN, optoScanV_, partitionName_, sistrip::PEDESTALS, pedestalsV_, sistrip::PEDS_FULL_NOISE, pedsFullNoiseV_, sistrip::PHYSICS, psuVersion_, sistrip::QUITE_FAST_CABLING, findQualityFiles::run, runNumber_, runTableVersion_, runType_, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

274  {
275 
276  // Check
277  if ( !db ) {
279  << "[SiStripPartition::" << __func__ << "]"
280  << " NULL pointer to SiStripConfigDb object!"
281  << " Aborting update...";
282  return;
283  }
284 
285  // Check
286  DeviceFactory* const df = db->deviceFactory(__func__);
287  if ( !df ) {
289  << "[SiStripPartition::" << __func__ << "]"
290  << " NULL pointer to DeviceFactory object!"
291  << " Aborting update...";
292  return;
293  }
294 
295  // Check partition name
296  if ( partitionName_ == defaultPartitionName_ ) { return; }
297 
298  // Debug
299  std::stringstream ss;
300  ss << "[SiStripPartition::" << __func__ << "]"
301  << " Updating description versions for partition \""
302  << partitionName_
303  << "\"...";
304  LogTrace(mlConfigDb_) << ss.str();
305 
306  try {
307 
308  // Reset container indicating state versions for commissioning runs
309  runTableVersion_ = Versions(0,0);
310 
311  // Update versions if using versions from "current state"
313 
314  // Find state for given partition
315  tkStateVector states;
316  states = df->getCurrentStates();
317  tkStateVector::const_iterator istate = states.begin();
318  tkStateVector::const_iterator jstate = states.end();
319  while ( istate != jstate ) {
320  if ( *istate && partitionName_ == (*istate)->getPartitionName() ) { break; }
321  istate++;
322  }
323 
324  // Set versions if state was found
325  if ( istate != states.end() ) {
326 
327  if ( !cabVersion_.first &&
328  !cabVersion_.second ) {
329  cabVersion_.first = (*istate)->getConnectionVersionMajorId();
330  cabVersion_.second = (*istate)->getConnectionVersionMinorId();
331  }
332  if ( !fecVersion_.first &&
333  !fecVersion_.second ) {
334  fecVersion_.first = (*istate)->getFecVersionMajorId();
335  fecVersion_.second = (*istate)->getFecVersionMinorId();
336  }
337  if ( !fedVersion_.first &&
338  !fedVersion_.second ) {
339  fedVersion_.first = (*istate)->getFedVersionMajorId();
340  fedVersion_.second = (*istate)->getFedVersionMinorId();
341  }
342  if ( !dcuVersion_.first &&
343  !dcuVersion_.second ) {
344  dcuVersion_.first = (*istate)->getDcuInfoVersionMajorId();
345  dcuVersion_.second = (*istate)->getDcuInfoVersionMinorId();
346  }
347  if ( !psuVersion_.first &&
348  !psuVersion_.second ) {
349  psuVersion_.first = (*istate)->getDcuPsuMapVersionMajorId();
350  psuVersion_.second = (*istate)->getDcuPsuMapVersionMinorId();
351  }
352  //#ifdef USING_DATABASE_MASKING
353  if ( !forceVersions_ &&
354  !maskVersion_.first &&
355  !maskVersion_.second ) {
356  maskVersion_.first = (*istate)->getMaskVersionMajorId();
357  maskVersion_.second = (*istate)->getMaskVersionMinorId();
358  }
359  //#endif
360 
361  // Retrieve global and local versions
362  if ( forceCurrentState_ || globalAnalysisV_ ) { // use global version (or current state)
363 
364  // Set global version
365  if ( forceCurrentState_ ) { globalAnalysisV_ = (*istate)->getAnalysisVersionMapPointerId(); }
366 
367  // Retrieve local versions
368  HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
369 
370  // Iterate through map< AnalysisType, pair<Major,Minor> >
371  HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
372  HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
373  for ( ; ivers != jvers; ++ivers ) {
374  if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
375  fastCablingV_.first = ivers->second.first;
376  fastCablingV_.second = ivers->second.second;
377  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
378  apvTimingV_.first = ivers->second.first;
379  apvTimingV_.second = ivers->second.second;
380  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
381  optoScanV_.first = ivers->second.first;
382  optoScanV_.second = ivers->second.second;
383  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
384  vpspScanV_.first = ivers->second.first;
385  vpspScanV_.second = ivers->second.second;
386  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
387  apvCalibV_.first = ivers->second.first;
388  apvCalibV_.second = ivers->second.second;
389  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
390  pedestalsV_.first = ivers->second.first;
391  pedestalsV_.second = ivers->second.second;
392  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDSFULLNOISE ) {
393  pedsFullNoiseV_.first = ivers->second.first;
394  pedsFullNoiseV_.second = ivers->second.second;
395  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
396  apvLatencyV_.first = ivers->second.first;
397  apvLatencyV_.second = ivers->second.second;
398  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
399  fineDelayV_.first = ivers->second.first;
400  fineDelayV_.second = ivers->second.second;
401  } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
402  std::stringstream ss;
404  << "[SiStripPartition::" << __func__ << "]"
405  << " Found UNKNOWN AnalysisType!";
406  edm::LogWarning(mlConfigDb_) << ss.str();
407  } else {
408  std::stringstream ss;
410  << "[SiStripPartition::" << __func__ << "]"
411  << " Unable to match content to any AnalysisType!";
412  edm::LogWarning(mlConfigDb_) << ss.str();
413  }
414  }
415 
416  } else if ( !globalAnalysisV_ ) { // use local versions
417 
418  // Retrieve local versions and set if necessary
419  globalAnalysisV_ = (*istate)->getAnalysisVersionMapPointerId();
420  HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
421 
422  // Iterate through map< AnalysisType, pair<Major,Minor> >
423  HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
424  HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
425  for ( ; ivers != jvers; ++ivers ) {
426  if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
427  if ( !fastCablingV_.first && !fastCablingV_.second ) {
428  fastCablingV_.first = ivers->second.first;
429  fastCablingV_.second = ivers->second.second;
430  }
431  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
432  if ( !apvTimingV_.first && !apvTimingV_.second ) {
433  apvTimingV_.first = ivers->second.first;
434  apvTimingV_.second = ivers->second.second;
435  }
436  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
437  if ( !optoScanV_.first && !optoScanV_.second ) {
438  optoScanV_.first = ivers->second.first;
439  optoScanV_.second = ivers->second.second;
440  }
441  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
442  if ( !vpspScanV_.first && !vpspScanV_.second ) {
443  vpspScanV_.first = ivers->second.first;
444  vpspScanV_.second = ivers->second.second;
445  }
446  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
447  if ( !apvCalibV_.first && !apvCalibV_.second ) {
448  apvCalibV_.first = ivers->second.first;
449  apvCalibV_.second = ivers->second.second;
450  }
451  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
452  if ( !pedestalsV_.first && !pedestalsV_.second ) {
453  pedestalsV_.first = ivers->second.first;
454  pedestalsV_.second = ivers->second.second;
455  }
456  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDSFULLNOISE ) {
457  if ( !pedsFullNoiseV_.first && !pedsFullNoiseV_.second ) {
458  pedsFullNoiseV_.first = ivers->second.first;
459  pedsFullNoiseV_.second = ivers->second.second;
460  }
461  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
462  if ( !apvLatencyV_.first && !apvLatencyV_.second ) {
463  apvLatencyV_.first = ivers->second.first;
464  apvLatencyV_.second = ivers->second.second;
465  }
466  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
467  if ( !fineDelayV_.first && !fineDelayV_.second ) {
468  fineDelayV_.first = ivers->second.first;
469  fineDelayV_.second = ivers->second.second;
470  }
471  } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
472  std::stringstream ss;
474  << "[SiStripPartition::" << __func__ << "]"
475  << " Found UNKNOWN AnalysisType!";
476  edm::LogWarning(mlConfigDb_) << ss.str();
477  } else {
478  std::stringstream ss;
480  << "[SiStripPartition::" << __func__ << "]"
481  << " Unable to match content to any AnalysisType!";
482  edm::LogWarning(mlConfigDb_) << ss.str();
483  }
484  }
485 
486  }
487 
488  } else {
489  std::stringstream ss;
491  << "[SiStripPartition::" << __func__ << "]"
492  << " Unable to find \"current state\" for partition \""
493  << partitionName_ << "\"";
494  }
495 
496  } else { // ---------- USE RUN NUMBER ----------
497 
498  // Retrieve TkRun object for given run (0 means "latest run")
499  TkRun* run = nullptr;
500  if ( !runNumber_ ) { run = df->getLastRun( partitionName_ ); }
501  else { run = df->getRun( partitionName_, runNumber_ ); }
502 
503  // Retrieve versioning for given TkRun object
504  if ( run ) {
505 
506  if ( run->getRunNumber() ) {
507 
508  if ( !runNumber_ ) { runNumber_ = run->getRunNumber(); }
509 
510  if ( runNumber_ == run->getRunNumber() ) {
511 
512  cabVersion_.first = run->getConnectionVersionMajorId();
513  cabVersion_.second = run->getConnectionVersionMinorId();
514 
515  fecVersion_.first = run->getFecVersionMajorId();
516  fecVersion_.second = run->getFecVersionMinorId();
517 
518  fedVersion_.first = run->getFedVersionMajorId();
519  fedVersion_.second = run->getFedVersionMinorId();
520 
521  dcuVersion_.first = run->getDcuInfoVersionMajorId();
522  dcuVersion_.second = run->getDcuInfoVersionMinorId();
523 
524  psuVersion_.first = run->getDcuPsuMapVersionMajorId();
525  psuVersion_.second = run->getDcuPsuMapVersionMinorId();
526 
527  //#ifdef USING_DATABASE_MASKING
528  maskVersion_.first = run->getMaskVersionMajorId();
529  maskVersion_.second = run->getMaskVersionMinorId();
530  //#endif
531 
532  // Check run type
533  uint16_t type = run->getModeId( run->getMode() );
534  if ( type == 1 ) { runType_ = sistrip::PHYSICS; }
535  else if ( type == 2 ) { runType_ = sistrip::PEDESTALS; }
536  else if ( type == 3 ) { runType_ = sistrip::CALIBRATION; }
537  else if ( type == 33 ) { runType_ = sistrip::CALIBRATION_DECO; }
538  else if ( type == 4 ) { runType_ = sistrip::OPTO_SCAN; }
539  else if ( type == 5 ) { runType_ = sistrip::APV_TIMING; }
540  else if ( type == 6 ) { runType_ = sistrip::APV_LATENCY; }
541  else if ( type == 7 ) { runType_ = sistrip::FINE_DELAY_PLL; }
542  else if ( type == 8 ) { runType_ = sistrip::FINE_DELAY_TTC; }
543  else if ( type == 10 ) { runType_ = sistrip::MULTI_MODE; }
544  else if ( type == 12 ) { runType_ = sistrip::FED_TIMING; }
545  else if ( type == 13 ) { runType_ = sistrip::FED_CABLING; }
546  else if ( type == 14 ) { runType_ = sistrip::VPSP_SCAN; }
547  else if ( type == 15 ) { runType_ = sistrip::DAQ_SCOPE_MODE; }
548  else if ( type == 16 ) { runType_ = sistrip::QUITE_FAST_CABLING; }
549  else if ( type == 21 ) { runType_ = sistrip::FAST_CABLING; }
550  else if ( type == 0 ) {
553  << "[SiStripPartition::" << __func__ << "]"
554  << " NULL run type returned!"
555  << " for partition \"" << partitionName_ << "\"";
556  } else {
559  << "[SiStripPartition::" << __func__ << "]"
560  << " UNKNOWN run type (" << type<< ") returned!"
561  << " for partition \"" << partitionName_ << "\"";
562  }
563 
564  // Retrieve global and local versions from state associated with given run
565  globalAnalysisV_ = run->getAnalysisVersionMapPointerId();
566  HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
567  HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
568  HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
569  for ( ; ivers != jvers; ++ivers ) {
570  if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
571  fastCablingV_.first = ivers->second.first;
572  fastCablingV_.second = ivers->second.second;
573  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
574  apvTimingV_.first = ivers->second.first;
575  apvTimingV_.second = ivers->second.second;
576  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
577  optoScanV_.first = ivers->second.first;
578  optoScanV_.second = ivers->second.second;
579  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
580  vpspScanV_.first = ivers->second.first;
581  vpspScanV_.second = ivers->second.second;
582  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
583  apvCalibV_.first = ivers->second.first;
584  apvCalibV_.second = ivers->second.second;
585  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
586  pedestalsV_.first = ivers->second.first;
587  pedestalsV_.second = ivers->second.second;
588  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDSFULLNOISE ) {
589  pedsFullNoiseV_.first = ivers->second.first;
590  pedsFullNoiseV_.second = ivers->second.second;
591  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
592  apvLatencyV_.first = ivers->second.first;
593  apvLatencyV_.second = ivers->second.second;
594  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
595  fineDelayV_.first = ivers->second.first;
596  fineDelayV_.second = ivers->second.second;
597  } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
598  std::stringstream ss;
600  << "[SiStripPartition::" << __func__ << "]"
601  << " Found UNKNOWN AnalysisType!";
602  edm::LogWarning(mlConfigDb_) << ss.str();
603  } else {
604  std::stringstream ss;
606  << "[SiStripPartition::" << __func__ << "]"
607  << " Unable to match content to any AnalysisType!";
608  edm::LogWarning(mlConfigDb_) << ss.str();
609  }
610  }
611 
612  // If commissioning run, override version of analysis type with version PRODUCED by run (from history)
613  if ( runType_ != sistrip::PHYSICS &&
616 
617  // Determine analysis type from run type
618  CommissioningAnalysisDescription::commissioningType type = CommissioningAnalysisDescription::T_UNKNOWN;
619  if ( runType_ == sistrip::FAST_CABLING ) { type = CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING; }
620  else if ( runType_ == sistrip::APV_TIMING ) { type = CommissioningAnalysisDescription::T_ANALYSIS_TIMING; }
621  else if ( runType_ == sistrip::OPTO_SCAN ) { type = CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN; }
622  else if ( runType_ == sistrip::VPSP_SCAN ) { type = CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN; }
623  else if ( runType_ == sistrip::CALIBRATION ) { type = CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION; }
624  else if ( runType_ == sistrip::PEDESTALS ) { type = CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS; }
625  else if ( runType_ == sistrip::PEDS_FULL_NOISE) { type = CommissioningAnalysisDescription::T_ANALYSIS_PEDSFULLNOISE; }
626  else if ( runType_ == sistrip::APV_LATENCY ) { type = CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY; }
627  else if ( runType_ == sistrip::FINE_DELAY_TTC ) { type = CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY; }
628 
629  // Retrieve local versions for COMMISSIONING runs from history
630  HashMapRunVersion local_versions = df->getAnalysisHistory( partitionName_, type );
631 
632  // Iterate through map< RunNumber, vector< pair<Major,Minor> > > to find appropriate run
633  HashMapRunVersion::const_iterator ivers = local_versions.end();
634  if ( runNumber_ == 0 ) { ivers = --(local_versions.end()); }
635  else { ivers = local_versions.find( runNumber_ ); }
636 
637  // Set appropriate versions
638  if ( ivers != local_versions.end() ) {
639  if ( type == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
641  fastCablingV_.first = ivers->second.back().first;
642  fastCablingV_.second = ivers->second.back().second;
643 
644  //@@
645 
646  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
648  apvTimingV_.first = ivers->second.back().first;
649  apvTimingV_.second = ivers->second.back().second;
650  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
652  optoScanV_.first = ivers->second.back().first;
653  optoScanV_.second = ivers->second.back().second;
654  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
656  vpspScanV_.first = ivers->second.back().first;
657  vpspScanV_.second = ivers->second.back().second;
658  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
660  apvCalibV_.first = ivers->second.back().first;
661  apvCalibV_.second = ivers->second.back().second;
662  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
664  pedestalsV_.first = ivers->second.back().first;
665  pedestalsV_.second = ivers->second.back().second;
666  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_PEDSFULLNOISE ) {
668  pedsFullNoiseV_.first = ivers->second.back().first;
669  pedsFullNoiseV_.second = ivers->second.back().second;
670  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
672  apvLatencyV_.first = ivers->second.back().first;
673  apvLatencyV_.second = ivers->second.back().second;
674  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
676  fineDelayV_.first = ivers->second.back().first;
677  fineDelayV_.second = ivers->second.back().second;
678  } else if ( type == CommissioningAnalysisDescription::T_UNKNOWN ) {
679  std::stringstream ss;
681  << "[SiStripPartition::" << __func__ << "]"
682  << " Found UNKNOWN AnalysisType!";
683  edm::LogWarning(mlConfigDb_) << ss.str();
684  } else {
685  std::stringstream ss;
687  << "[SiStripPartition::" << __func__ << "]"
688  << " Unable to match content to any AnalysisType!";
689  edm::LogWarning(mlConfigDb_) << ss.str();
690  }
691  } else {
692  std::stringstream ss;
694  << "[SiStripPartition::" << __func__ << "]"
695  << " Unable to find run number " << runNumber_
696  << " in \"history\" hash map ";
697  edm::LogWarning(mlConfigDb_) << ss.str();
698  }
699 
700  }
701 
702  } else {
704  << "[SiStripPartition::" << __func__ << "]"
705  << " Mismatch of run number requested ("
706  << runNumber_
707  << ") and received ("
708  << run->getRunNumber() << ")"
709  << " to/from database for partition \""
710  << partitionName_ << "\"";
711  }
712 
713  } else {
715  << "[SiStripPartition::" << __func__ << "]"
716  << " NULL run number returned!"
717  << " for partition \"" << partitionName_ << "\"";
718  }
719 
720  } else {
722  << "[SiStripPartition::" << __func__ << "]"
723  << " NULL pointer to TkRun object!"
724  << " Unable to retrieve versions for run number "
725  << runNumber_
726  << ". Run number may not be consistent with partition \""
727  << partitionName_ << "\"!"; //@@ only using first here!!!
728  }
729 
730  }
731 
732  } catch (...) { db->handleException( __func__, "" ); }
733 
734 }
sistrip::RunType runType_
type
Definition: HCALResponse.h:21
static const std::string defaultPartitionName_
DeviceFactory *const deviceFactory(std::string method_name="") const
void handleException(const std::string &method_name, const std::string &extra_info="") const
std::string partitionName_
std::pair< uint32_t, uint32_t > Versions
static const char mlConfigDb_[]
#define LogTrace(id)
SiStripPartition::Versions SiStripPartition::versions ( const std::vector< uint32_t > &  _input)
private

Definition at line 895 of file SiStripPartition.cc.

References input, and sistrip::mlConfigDb_.

Referenced by pset().

895  {
896  std::vector<uint32_t> input = _input;
897  if ( input.size() != 2 ) {
899  << "[SiStripPartition::" << __func__ << "]"
900  << " Unexpected size (" << input.size()
901  << ") for vector containing version numbers (major,minor)!"
902  << " Resizing to 2 elements (default values will be 0,0)...";
903  input.resize(2,0);
904  }
905  return std::make_pair( input[0], input[1] );
906 }
static std::string const input
Definition: EdmProvDump.cc:44
static const char mlConfigDb_[]
SiStripPartition::Versions SiStripPartition::vpspScanVersion ( ) const
inline

Definition at line 214 of file SiStripPartition.h.

References vpspScanV_.

Referenced by operator=(), and operator==().

214 { return vpspScanV_; }

Member Data Documentation

Versions SiStripPartition::apvCalibV_
private

Definition at line 170 of file SiStripPartition.h.

Referenced by apvCalibVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::apvLatencyV_
private

Definition at line 176 of file SiStripPartition.h.

Referenced by apvLatencyVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::apvTimingV_
private

Definition at line 164 of file SiStripPartition.h.

Referenced by apvTimingVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::cabVersion_
private

Definition at line 142 of file SiStripPartition.h.

Referenced by cabVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::dcuVersion_
private

Definition at line 148 of file SiStripPartition.h.

Referenced by dcuVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

const std::string SiStripPartition::defaultPartitionName_ = "DefaultPartition"
static
Versions SiStripPartition::fastCablingV_
private

Definition at line 162 of file SiStripPartition.h.

Referenced by fastCablingVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::fecVersion_
private

Definition at line 146 of file SiStripPartition.h.

Referenced by fecVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::fedVersion_
private

Definition at line 144 of file SiStripPartition.h.

Referenced by fedVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::fineDelayV_
private

Definition at line 178 of file SiStripPartition.h.

Referenced by fineDelayVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

bool SiStripPartition::forceCurrentState_
private

Definition at line 138 of file SiStripPartition.h.

Referenced by forceCurrentState(), operator=(), operator==(), print(), pset(), reset(), and update().

bool SiStripPartition::forceVersions_
private

Definition at line 136 of file SiStripPartition.h.

Referenced by forceVersions(), operator=(), operator==(), print(), pset(), reset(), and update().

uint32_t SiStripPartition::globalAnalysisV_
private
std::string SiStripPartition::inputDcuInfoXml_
private

Definition at line 184 of file SiStripPartition.h.

Referenced by inputDcuInfoXml(), operator=(), operator==(), print(), pset(), and reset().

std::vector<std::string> SiStripPartition::inputFecXml_
private
std::vector<std::string> SiStripPartition::inputFedXml_
private
std::string SiStripPartition::inputModuleXml_
private

Definition at line 182 of file SiStripPartition.h.

Referenced by inputModuleXml(), operator=(), operator==(), print(), pset(), and reset().

Versions SiStripPartition::maskVersion_
private

Definition at line 153 of file SiStripPartition.h.

Referenced by maskVersion(), operator=(), operator==(), print(), pset(), reset(), and update().

Versions SiStripPartition::optoScanV_
private

Definition at line 166 of file SiStripPartition.h.

Referenced by operator=(), operator==(), optoScanVersion(), print(), pset(), reset(), and update().

std::string SiStripPartition::partitionName_
private
Versions SiStripPartition::pedestalsV_
private

Definition at line 172 of file SiStripPartition.h.

Referenced by operator=(), operator==(), pedestalsVersion(), print(), pset(), reset(), and update().

Versions SiStripPartition::pedsFullNoiseV_
private

Definition at line 174 of file SiStripPartition.h.

Referenced by operator=(), operator==(), pedsFullNoiseVersion(), print(), pset(), reset(), and update().

Versions SiStripPartition::psuVersion_
private

Definition at line 150 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), pset(), psuVersion(), reset(), and update().

uint32_t SiStripPartition::runNumber_
private

Definition at line 132 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), pset(), reset(), runNumber(), and update().

Versions SiStripPartition::runTableVersion_
private

Definition at line 160 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), reset(), runTableVersion(), and update().

sistrip::RunType SiStripPartition::runType_
private

Definition at line 134 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), reset(), runType(), and update().

Versions SiStripPartition::vpspScanV_
private

Definition at line 168 of file SiStripPartition.h.

Referenced by operator=(), operator==(), print(), pset(), reset(), update(), and vpspScanVersion().