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:48
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 748 of file SiStripPartition.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, apvCalibV_, apvLatencyV_, apvTimingV_, cabVersion_, sistrip::CALIBRATION, sistrip::CALIBRATION_DECO, sistrip::CALIBRATION_SCAN, sistrip::CALIBRATION_SCAN_DECO, 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<<().

748  {
749 
750  ss << " Partition : \"" << partitionName_ << "\"" << std::endl;
751 
752  if ( using_db ) {
753 
754  ss << " Run number : ";
755  if ( forceCurrentState_ ) { ss << "Forced \"current state\"! (equivalent to versions below)"; }
756  else if ( forceVersions_ ) { ss << "Forced versions specified below!"; }
757  else /* use run number */ { ss << runNumber_; }
758 
759  ss << std::endl;
760  if ( !forceVersions_ ) {
761  ss << " Run type : " << SiStripEnumsAndStrings::runType( runType_ ) << std::endl;
762  }
763 
764  ss << " Cabling major/minor vers : " << cabVersion_.first << "." << cabVersion_.second << std::endl
765  << " FEC major/minor vers : " << fecVersion_.first << "." << fecVersion_.second << std::endl
766  << " FED major/minor vers : " << fedVersion_.first << "." << fedVersion_.second << std::endl
767  << " DCU-DetId map maj/min vers : " << dcuVersion_.first << "." << dcuVersion_.second << std::endl
768  //#ifdef USING_DATABASE_MASKING
769  << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl
770  << " Mask maj/min vers : " << maskVersion_.first << "." << maskVersion_.second << std::endl;
771  //#else
772  // << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl;
773  //#endif
774 
775  ss << " Global analysis version : " << globalAnalysisV_ << std::endl;
776 
777 
778  if ( runType_ == sistrip::PHYSICS ||
781 
782  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
783  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
784  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
785  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
786  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
787  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
788  ss << " PedsFullNoise maj/min vers : " << pedsFullNoiseV_.first << "." << pedsFullNoiseV_.second << std::endl;
789  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
790  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
791 
792  } else {
793 
794  if ( runType_ != sistrip::FAST_CABLING ) {
795  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
796  } else {
797  ss << " FED cabling maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
798  << " <= This \"state\" version overriden by \"history\" version "
799  << fastCablingV_.first << "." << fastCablingV_.second
800  << " for this FED cabling run!" << std::endl;
801  }
802 
803  if ( runType_ != sistrip::APV_TIMING ) {
804  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
805  } else {
806  ss << " APV timing maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
807  << " <= This \"state\" version overriden by \"history\" version "
808  << apvTimingV_.first << "." << apvTimingV_.second
809  << " for this APV timing run!" << std::endl;
810  }
811 
812  if ( runType_ != sistrip::OPTO_SCAN ) {
813  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
814  } else {
815  ss << " Opto scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
816  << " <= This \"state\" version overriden by \"history\" version "
817  << optoScanV_.first << "." << optoScanV_.second
818  << " for this opto scan run!" << std::endl;
819  }
820 
821  if ( runType_ != sistrip::VPSP_SCAN ) {
822  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
823  } else {
824  ss << " VPSP scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
825  << " <= This \"state\" version overriden by \"history\" version "
826  << vpspScanV_.first << "." << vpspScanV_.second
827  << " for this VPSP scan run!" << std::endl;
828  }
829 
830  if ( runType_ != sistrip::CALIBRATION and
834  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
835  } else {
836  ss << " APV calib maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
837  << " <= This \"state\" version overriden by \"history\" version "
838  << apvCalibV_.first << "." << apvCalibV_.second
839  << " for this APV calib run!" << std::endl;
840  }
841 
842  if ( runType_ != sistrip::PEDESTALS ) {
843  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
844  } else {
845  ss << " Pedestals maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
846  << " <= This \"state\" version overriden by \"history\" version "
847  << pedestalsV_.first << "." << pedestalsV_.second
848  << " for this pedestals run!" << std::endl;
849  }
850 
852  ss << " PedsFullNoise maj/min vers : " << pedsFullNoiseV_.first << "." << pedsFullNoiseV_.second << std::endl;
853  } else {
854  ss << " Pedestals maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
855  << " <= This \"state\" version overriden by \"history\" version "
856  << pedsFullNoiseV_.first << "." << pedsFullNoiseV_.second
857  << " for this pedestals run!" << std::endl;
858  }
859 
860  if ( runType_ != sistrip::APV_LATENCY ) {
861  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
862  } else {
863  ss << " APV latency maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
864  << " <= This \"state\" version overriden by \"history\" version "
865  << apvLatencyV_.first << "." << apvLatencyV_.second
866  << " for this APV latency run!" << std::endl;
867  }
868 
869  if ( runType_ != sistrip::FINE_DELAY_TTC ) {
870  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
871  } else {
872  ss << " Fine delay maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
873  << " <= This \"state\" version overriden by \"history\" version "
874  << fineDelayV_.first << "." << fineDelayV_.second
875  << " for this fine delay run!" << std::endl;
876  }
877 
878  }
879 
880  } else {
881 
882  ss << " Input \"module.xml\" file : " << inputModuleXml_ << std::endl
883  << " Input \"dcuinfo.xml\" file : " << inputDcuInfoXml_ << std::endl
884  << " Input \"fec.xml\" file(s) : ";
885  std::vector<std::string>::const_iterator ifec = inputFecXml_.begin();
886  for ( ; ifec != inputFecXml_.end(); ifec++ ) { ss << *ifec << ", "; }
887  ss << std::endl;
888  ss << " Input \"fed.xml\" file(s) : ";
889  std::vector<std::string>::const_iterator ifed = inputFedXml_.begin();
890  for ( ; ifed != inputFedXml_.end(); ifed++ ) { ss << *ifed << ", "; }
891  ss << std::endl;
892 
893  }
894 
895 }
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 writedatasetfile::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::CALIBRATION_SCAN, sistrip::CALIBRATION_SCAN_DECO, sistrip::DAQ_SCOPE_MODE, dcuVersion_, defaultPartitionName_, SiStripConfigDb::deviceFactory(), sistrip::FAST_CABLING, fastCablingV_, fecVersion_, sistrip::FED_CABLING, sistrip::FED_TIMING, fedVersion_, sistrip::FINE_DELAY, sistrip::FINE_DELAY_PLL, sistrip::FINE_DELAY_TTC, fineDelayV_, forceCurrentState_, forceVersions_, globalAnalysisV_, SiStripConfigDb::handleException(), LogTrace, maskVersion_, sistrip::mlConfigDb_, sistrip::MULTI_MODE, sistrip::NOISE, sistrip::OPTO_SCAN, optoScanV_, partitionName_, sistrip::PEDESTALS, pedestalsV_, sistrip::PEDS_FULL_NOISE, sistrip::PEDS_ONLY, pedsFullNoiseV_, sistrip::PHYSICS, sistrip::PHYSICS_ZS, psuVersion_, sistrip::QUITE_FAST_CABLING, writedatasetfile::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 == 4 ) { runType_ = sistrip::OPTO_SCAN; }
538  else if ( type == 5 ) { runType_ = sistrip::APV_TIMING; }
539  else if ( type == 6 ) { runType_ = sistrip::APV_LATENCY; }
540  else if ( type == 7 ) { runType_ = sistrip::FINE_DELAY_PLL; }
541  else if ( type == 8 ) { runType_ = sistrip::FINE_DELAY_TTC; }
542  else if ( type == 10 ) { runType_ = sistrip::MULTI_MODE; }
543  else if ( type == 12 ) { runType_ = sistrip::FED_TIMING; }
544  else if ( type == 13 ) { runType_ = sistrip::FED_CABLING; }
545  else if ( type == 14 ) { runType_ = sistrip::VPSP_SCAN; }
546  else if ( type == 15 ) { runType_ = sistrip::DAQ_SCOPE_MODE; }
547  else if ( type == 16 ) { runType_ = sistrip::QUITE_FAST_CABLING; }
548  else if ( type == 17 ) { runType_ = sistrip::FINE_DELAY; }
549  else if ( type == 18 ) { runType_ = sistrip::PHYSICS_ZS; }
550  else if ( type == 19 ) { runType_ = sistrip::CALIBRATION_SCAN; }
551  else if ( type == 20 ) { runType_ = sistrip::CALIBRATION_SCAN_DECO; }
552  else if ( type == 21 ) { runType_ = sistrip::FAST_CABLING; }
553  else if ( type == 22 ) { runType_ = sistrip::PEDS_ONLY; }
554  else if ( type == 23 ) { runType_ = sistrip::NOISE; }
555  else if ( type == 24 ) { runType_ = sistrip::PEDS_FULL_NOISE; }
556  else if ( type == 33 ) { runType_ = sistrip::CALIBRATION_DECO; }
557  else if ( type == 0 ) {
560  << "[SiStripPartition::" << __func__ << "]"
561  << " NULL run type returned!"
562  << " for partition \"" << partitionName_ << "\"";
563  } else {
566  << "[SiStripPartition::" << __func__ << "]"
567  << " UNKNOWN run type (" << type<< ") returned!"
568  << " for partition \"" << partitionName_ << "\"";
569  }
570 
571  // Retrieve global and local versions from state associated with given run
572  globalAnalysisV_ = run->getAnalysisVersionMapPointerId();
573  HashMapAnalysisVersions local_versions = df->getLocalAnalysisVersions( globalAnalysisV_ );
574  HashMapAnalysisVersions::const_iterator ivers = local_versions.begin();
575  HashMapAnalysisVersions::const_iterator jvers = local_versions.end();
576  for ( ; ivers != jvers; ++ivers ) {
577  if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
578  fastCablingV_.first = ivers->second.first;
579  fastCablingV_.second = ivers->second.second;
580  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
581  apvTimingV_.first = ivers->second.first;
582  apvTimingV_.second = ivers->second.second;
583  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
584  optoScanV_.first = ivers->second.first;
585  optoScanV_.second = ivers->second.second;
586  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
587  vpspScanV_.first = ivers->second.first;
588  vpspScanV_.second = ivers->second.second;
589  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
590  apvCalibV_.first = ivers->second.first;
591  apvCalibV_.second = ivers->second.second;
592  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
593  pedestalsV_.first = ivers->second.first;
594  pedestalsV_.second = ivers->second.second;
595  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_PEDSFULLNOISE ) {
596  pedsFullNoiseV_.first = ivers->second.first;
597  pedsFullNoiseV_.second = ivers->second.second;
598  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
599  apvLatencyV_.first = ivers->second.first;
600  apvLatencyV_.second = ivers->second.second;
601  } else if ( ivers->first == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
602  fineDelayV_.first = ivers->second.first;
603  fineDelayV_.second = ivers->second.second;
604  } else if ( ivers->first == CommissioningAnalysisDescription::T_UNKNOWN ) {
605  std::stringstream ss;
607  << "[SiStripPartition::" << __func__ << "]"
608  << " Found UNKNOWN AnalysisType!";
609  edm::LogWarning(mlConfigDb_) << ss.str();
610  } else {
611  std::stringstream ss;
613  << "[SiStripPartition::" << __func__ << "]"
614  << " Unable to match content to any AnalysisType!";
615  edm::LogWarning(mlConfigDb_) << ss.str();
616  }
617  }
618 
619  // If commissioning run, override version of analysis type with version PRODUCED by run (from history)
620  if ( runType_ != sistrip::PHYSICS &&
623 
624  // Determine analysis type from run type
625  CommissioningAnalysisDescription::commissioningType type = CommissioningAnalysisDescription::T_UNKNOWN;
626  if ( runType_ == sistrip::FAST_CABLING ) { type = CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING; }
627  else if ( runType_ == sistrip::APV_TIMING ) { type = CommissioningAnalysisDescription::T_ANALYSIS_TIMING; }
628  else if ( runType_ == sistrip::OPTO_SCAN ) { type = CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN; }
629  else if ( runType_ == sistrip::VPSP_SCAN ) { type = CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN; }
630  else if ( runType_ == sistrip::CALIBRATION ) { type = CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION; }
631  else if ( runType_ == sistrip::CALIBRATION_SCAN ) { type = CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION; }
632  else if ( runType_ == sistrip::CALIBRATION_DECO ) { type = CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION; }
633  else if ( runType_ == sistrip::CALIBRATION_SCAN_DECO ) { type = CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION; }
634  else if ( runType_ == sistrip::PEDESTALS ) { type = CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS; }
635  else if ( runType_ == sistrip::PEDS_FULL_NOISE) { type = CommissioningAnalysisDescription::T_ANALYSIS_PEDSFULLNOISE; }
636  else if ( runType_ == sistrip::APV_LATENCY ) { type = CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY; }
637  else if ( runType_ == sistrip::FINE_DELAY_TTC ) { type = CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY; }
638 
639  // Retrieve local versions for COMMISSIONING runs from history
640  HashMapRunVersion local_versions = df->getAnalysisHistory( partitionName_, type );
641 
642  // Iterate through map< RunNumber, vector< pair<Major,Minor> > > to find appropriate run
643  HashMapRunVersion::const_iterator ivers = local_versions.end();
644  if ( runNumber_ == 0 ) { ivers = --(local_versions.end()); }
645  else { ivers = local_versions.find( runNumber_ ); }
646 
647  // Set appropriate versions
648  if ( ivers != local_versions.end() ) {
649  if ( type == CommissioningAnalysisDescription::T_ANALYSIS_FASTFEDCABLING ) {
651  fastCablingV_.first = ivers->second.back().first;
652  fastCablingV_.second = ivers->second.back().second;
653 
654  //@@
655 
656  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_TIMING ) {
658  apvTimingV_.first = ivers->second.back().first;
659  apvTimingV_.second = ivers->second.back().second;
660  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_OPTOSCAN ) {
662  optoScanV_.first = ivers->second.back().first;
663  optoScanV_.second = ivers->second.back().second;
664  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_VPSPSCAN ) {
666  vpspScanV_.first = ivers->second.back().first;
667  vpspScanV_.second = ivers->second.back().second;
668  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_CALIBRATION ) {
670  apvCalibV_.first = ivers->second.back().first;
671  apvCalibV_.second = ivers->second.back().second;
672  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_PEDESTALS ) {
674  pedestalsV_.first = ivers->second.back().first;
675  pedestalsV_.second = ivers->second.back().second;
676  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_PEDSFULLNOISE ) {
678  pedsFullNoiseV_.first = ivers->second.back().first;
679  pedsFullNoiseV_.second = ivers->second.back().second;
680  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_APVLATENCY ) {
682  apvLatencyV_.first = ivers->second.back().first;
683  apvLatencyV_.second = ivers->second.back().second;
684  } else if ( type == CommissioningAnalysisDescription::T_ANALYSIS_FINEDELAY ) {
686  fineDelayV_.first = ivers->second.back().first;
687  fineDelayV_.second = ivers->second.back().second;
688  } else if ( type == CommissioningAnalysisDescription::T_UNKNOWN ) {
689  std::stringstream ss;
691  << "[SiStripPartition::" << __func__ << "]"
692  << " Found UNKNOWN AnalysisType!";
693  edm::LogWarning(mlConfigDb_) << ss.str();
694  } else {
695  std::stringstream ss;
697  << "[SiStripPartition::" << __func__ << "]"
698  << " Unable to match content to any AnalysisType!";
699  edm::LogWarning(mlConfigDb_) << ss.str();
700  }
701  } else {
702  std::stringstream ss;
704  << "[SiStripPartition::" << __func__ << "]"
705  << " Unable to find run number " << runNumber_
706  << " in \"history\" hash map ";
707  edm::LogWarning(mlConfigDb_) << ss.str();
708  }
709 
710  }
711 
712  } else {
714  << "[SiStripPartition::" << __func__ << "]"
715  << " Mismatch of run number requested ("
716  << runNumber_
717  << ") and received ("
718  << run->getRunNumber() << ")"
719  << " to/from database for partition \""
720  << partitionName_ << "\"";
721  }
722 
723  } else {
725  << "[SiStripPartition::" << __func__ << "]"
726  << " NULL run number returned!"
727  << " for partition \"" << partitionName_ << "\"";
728  }
729 
730  } else {
732  << "[SiStripPartition::" << __func__ << "]"
733  << " NULL pointer to TkRun object!"
734  << " Unable to retrieve versions for run number "
735  << runNumber_
736  << ". Run number may not be consistent with partition \""
737  << partitionName_ << "\"!"; //@@ only using first here!!!
738  }
739 
740  }
741 
742  } catch (...) { db->handleException( __func__, "" ); }
743 
744 }
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 908 of file SiStripPartition.cc.

References input, and sistrip::mlConfigDb_.

Referenced by pset().

908  {
909  std::vector<uint32_t> input = _input;
910  if ( input.size() != 2 ) {
912  << "[SiStripPartition::" << __func__ << "]"
913  << " Unexpected size (" << input.size()
914  << ") for vector containing version numbers (major,minor)!"
915  << " Resizing to 2 elements (default values will be 0,0)...";
916  input.resize(2,0);
917  }
918  return std::make_pair( input[0], input[1] );
919 }
static std::string const input
Definition: EdmProvDump.cc:48
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().