CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
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 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  apvLatencyV_(0,0),
40  fineDelayV_(0,0),
41  inputModuleXml_(""),
42  inputDcuInfoXml_(""),
43  inputFecXml_(),
44  inputFedXml_()
45 {;}
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 49 of file SiStripPartition.cc.

References defaultPartitionName_, and partitionName_.

49  :
50  partitionName_(partition),
51  runNumber_(0),
53  forceVersions_(false),
54  forceCurrentState_(false),
55  cabVersion_(0,0),
56  fedVersion_(0,0),
57  fecVersion_(0,0),
58  dcuVersion_(0,0),
59  psuVersion_(0,0),
60  //#ifdef USING_DATABASE_MASKING
61  maskVersion_(0,0),
62  //#endif
64  runTableVersion_(0,0),
65  fastCablingV_(0,0),
66  apvTimingV_(0,0),
67  optoScanV_(0,0),
68  vpspScanV_(0,0),
69  apvCalibV_(0,0),
70  pedestalsV_(0,0),
71  apvLatencyV_(0,0),
72  fineDelayV_(0,0),
73  inputModuleXml_(""),
74  inputDcuInfoXml_(""),
75  inputFecXml_(),
76  inputFedXml_()
77 {
79 }
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 83 of file SiStripPartition.cc.

83  :
84  partitionName_( input.partitionName() ),
85  runNumber_( input.runNumber() ),
86  runType_( input.runType() ),
87  forceVersions_( input.forceVersions() ),
89  cabVersion_( input.cabVersion() ),
90  fedVersion_( input.fedVersion() ),
91  fecVersion_( input.fecVersion() ),
92  dcuVersion_( input.dcuVersion() ),
93  psuVersion_( input.psuVersion() ),
94  //#ifdef USING_DATABASE_MASKING
95  maskVersion_( input.maskVersion() ),
96  //#endif
100  apvTimingV_( input.apvTimingVersion() ),
101  optoScanV_( input.optoScanVersion() ),
102  vpspScanV_( input.vpspScanVersion() ),
103  apvCalibV_( input.apvCalibVersion() ),
104  pedestalsV_( input.pedestalsVersion() ),
105  apvLatencyV_( input.apvLatencyVersion() ),
106  fineDelayV_( input.fineDelayVersion() ),
107  inputModuleXml_( input.inputModuleXml() ),
109  inputFecXml_( input.inputFecXml() ),
110  inputFedXml_( input.inputFedXml() )
111 {;}
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
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 187 of file SiStripPartition.cc.

References inputFecXml_, and inputFedXml_.

187  {
188  inputFecXml_.clear();
189  inputFedXml_.clear();
190 }
std::vector< std::string > inputFedXml_
std::vector< std::string > inputFecXml_

Member Function Documentation

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

Definition at line 211 of file SiStripPartition.h.

References apvCalibV_.

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

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

Definition at line 213 of file SiStripPartition.h.

References apvLatencyV_.

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

213 { return apvLatencyV_; }
SiStripPartition::Versions SiStripPartition::apvTimingVersion ( ) const
inline

Definition at line 208 of file SiStripPartition.h.

References apvTimingV_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

208 { return apvTimingV_; }
SiStripPartition::Versions SiStripPartition::cabVersion ( ) const
inline

Definition at line 196 of file SiStripPartition.h.

References cabVersion_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

196 { return cabVersion_; }
SiStripPartition::Versions SiStripPartition::dcuVersion ( ) const
inline

Definition at line 199 of file SiStripPartition.h.

References dcuVersion_.

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

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

Definition at line 207 of file SiStripPartition.h.

References fastCablingV_.

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

207 { return fastCablingV_; }
SiStripPartition::Versions SiStripPartition::fecVersion ( ) const
inline

Definition at line 198 of file SiStripPartition.h.

References fecVersion_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

198 { return fecVersion_; }
SiStripPartition::Versions SiStripPartition::fedVersion ( ) const
inline

Definition at line 197 of file SiStripPartition.h.

References fedVersion_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

197 { return fedVersion_; }
SiStripPartition::Versions SiStripPartition::fineDelayVersion ( ) const
inline

Definition at line 214 of file SiStripPartition.h.

References fineDelayV_.

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

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

Definition at line 194 of file SiStripPartition.h.

References forceCurrentState_.

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

194 { return forceCurrentState_; }
void SiStripPartition::forceCurrentState ( bool  force)
inline

Definition at line 224 of file SiStripPartition.h.

References forceCurrentState_.

224 { forceCurrentState_ = force; }
bool SiStripPartition::forceVersions ( ) const
inline

Definition at line 193 of file SiStripPartition.h.

References forceVersions_.

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

193 { return forceVersions_; }
void SiStripPartition::forceVersions ( bool  force)
inline

Definition at line 223 of file SiStripPartition.h.

References forceVersions_.

223 { forceVersions_ = force; }
uint32_t SiStripPartition::globalAnalysisVersion ( ) const
inline

Definition at line 205 of file SiStripPartition.h.

References globalAnalysisV_.

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

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

Definition at line 217 of file SiStripPartition.h.

References inputDcuInfoXml_.

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

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

Definition at line 218 of file SiStripPartition.h.

References inputFecXml_.

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

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

Definition at line 219 of file SiStripPartition.h.

References inputFedXml_.

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

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

Definition at line 216 of file SiStripPartition.h.

References inputModuleXml_.

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

216 { return inputModuleXml_; }
std::string inputModuleXml_
SiStripPartition::Versions SiStripPartition::maskVersion ( ) const
inline

Definition at line 202 of file SiStripPartition.h.

References maskVersion_.

Referenced by SiStripCondObjBuilderFromDb::checkForCompatibility(), operator=(), and operator==().

202 { return maskVersion_; }
bool SiStripPartition::operator!= ( const SiStripPartition input) const

Definition at line 181 of file SiStripPartition.cc.

References input.

181  {
182  return !( *this == input );
183 }
static std::string const input
Definition: EdmProvDump.cc:43
SiStripPartition & SiStripPartition::operator= ( const SiStripPartition input)

Definition at line 115 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(), psuVersion(), psuVersion_, runNumber(), runNumber_, runTableVersion(), runTableVersion_, runType(), runType_, vpspScanV_, and vpspScanVersion().

115  {
116  if ( this == &input ) { return *this; } // self-assignment
117  partitionName_ = input.partitionName();
118  runNumber_ = input.runNumber();
119  runType_ = input.runType();
120  forceVersions_ = input.forceVersions();
122  cabVersion_ = input.cabVersion();
123  fedVersion_ = input.fedVersion();
124  fecVersion_ = input.fecVersion();
125  dcuVersion_ = input.dcuVersion();
126  psuVersion_ = input.psuVersion();
127  //#ifdef USING_DATABASE_MASKING
128  maskVersion_ = input.maskVersion();
129  //#endif
133  apvTimingV_ = input.apvTimingVersion();
134  optoScanV_ = input.optoScanVersion();
135  vpspScanV_ = input.vpspScanVersion();
136  apvCalibV_ = input.apvCalibVersion();
137  pedestalsV_ = input.pedestalsVersion();
139  fineDelayV_ = input.fineDelayVersion();
142  inputFecXml_ = input.inputFecXml();
143  inputFedXml_ = input.inputFedXml();
144  return *this;
145 }
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
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 149 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(), psuVersion(), psuVersion_, runNumber(), runNumber_, runTableVersion(), runTableVersion_, runType(), runType_, vpspScanV_, and vpspScanVersion().

149  {
150  return ( partitionName_ == input.partitionName() &&
151  runNumber_ == input.runNumber() &&
152  runType_ == input.runType() &&
153  forceVersions_ == input.forceVersions() &&
155  cabVersion_ == input.cabVersion() &&
156  fedVersion_ == input.fedVersion() &&
157  fecVersion_ == input.fecVersion() &&
158  dcuVersion_ == input.dcuVersion() &&
159  psuVersion_ == input.psuVersion() &&
160  //#ifdef USING_DATABASE_MASKING
161  maskVersion_ == input.maskVersion() &&
162  //#endif
164  runTableVersion_ == input.runTableVersion() &&
165  fastCablingV_ == input.fastCablingVersion() &&
166  apvTimingV_ == input.apvTimingVersion() &&
167  optoScanV_ == input.optoScanVersion() &&
168  vpspScanV_ == input.vpspScanVersion() &&
169  apvCalibV_ == input.apvCalibVersion() &&
170  pedestalsV_ == input.pedestalsVersion() &&
171  apvLatencyV_ == input.apvLatencyVersion() &&
172  fineDelayV_ == input.fineDelayVersion() &&
173  inputModuleXml_ == input.inputModuleXml() &&
174  inputDcuInfoXml_ == input.inputDcuInfoXml() &&
175  inputFecXml_ == input.inputFecXml() &&
176  inputFedXml_ == input.inputFedXml() );
177 }
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
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 209 of file SiStripPartition.h.

References optoScanV_.

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

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

Definition at line 212 of file SiStripPartition.h.

References pedestalsV_.

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

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

Definition at line 715 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::PHYSICS, psuVersion_, runNumber_, runTableVersion_, SiStripEnumsAndStrings::runType(), runType_, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

Referenced by operator<<().

715  {
716 
717  ss << " Partition : \"" << partitionName_ << "\"" << std::endl;
718 
719  if ( using_db ) {
720 
721  ss << " Run number : ";
722  if ( forceCurrentState_ ) { ss << "Forced \"current state\"! (equivalent to versions below)"; }
723  else if ( forceVersions_ ) { ss << "Forced versions specified below!"; }
724  else /* use run number */ { ss << runNumber_; }
725 
726  ss << std::endl;
727  if ( !forceVersions_ ) {
728  ss << " Run type : " << SiStripEnumsAndStrings::runType( runType_ ) << std::endl;
729  }
730 
731  ss << " Cabling major/minor vers : " << cabVersion_.first << "." << cabVersion_.second << std::endl
732  << " FEC major/minor vers : " << fecVersion_.first << "." << fecVersion_.second << std::endl
733  << " FED major/minor vers : " << fedVersion_.first << "." << fedVersion_.second << std::endl
734  << " DCU-DetId map maj/min vers : " << dcuVersion_.first << "." << dcuVersion_.second << std::endl
735  //#ifdef USING_DATABASE_MASKING
736  << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl
737  << " Mask maj/min vers : " << maskVersion_.first << "." << maskVersion_.second << std::endl;
738  //#else
739  // << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl;
740  //#endif
741 
742  ss << " Global analysis version : " << globalAnalysisV_ << std::endl;
743 
744 
745  if ( runType_ == sistrip::PHYSICS ||
748 
749  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
750  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
751  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
752  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
753  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
754  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
755  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
756  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
757 
758  } else {
759 
760  if ( runType_ != sistrip::FAST_CABLING ) {
761  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
762  } else {
763  ss << " FED cabling maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
764  << " <= This \"state\" version overriden by \"history\" version "
765  << fastCablingV_.first << "." << fastCablingV_.second
766  << " for this FED cabling run!" << std::endl;
767  }
768 
769  if ( runType_ != sistrip::APV_TIMING ) {
770  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
771  } else {
772  ss << " APV timing maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
773  << " <= This \"state\" version overriden by \"history\" version "
774  << apvTimingV_.first << "." << apvTimingV_.second
775  << " for this APV timing run!" << std::endl;
776  }
777 
778  if ( runType_ != sistrip::OPTO_SCAN ) {
779  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
780  } else {
781  ss << " Opto scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
782  << " <= This \"state\" version overriden by \"history\" version "
783  << optoScanV_.first << "." << optoScanV_.second
784  << " for this opto scan run!" << std::endl;
785  }
786 
787  if ( runType_ != sistrip::VPSP_SCAN ) {
788  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
789  } else {
790  ss << " VPSP scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
791  << " <= This \"state\" version overriden by \"history\" version "
792  << vpspScanV_.first << "." << vpspScanV_.second
793  << " for this VPSP scan run!" << std::endl;
794  }
795 
796  if ( runType_ != sistrip::CALIBRATION ) {
797  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
798  } else {
799  ss << " APV calib maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
800  << " <= This \"state\" version overriden by \"history\" version "
801  << apvCalibV_.first << "." << apvCalibV_.second
802  << " for this APV calib run!" << std::endl;
803  }
804 
805  if ( runType_ != sistrip::PEDESTALS ) {
806  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
807  } else {
808  ss << " Pedestals maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
809  << " <= This \"state\" version overriden by \"history\" version "
810  << pedestalsV_.first << "." << pedestalsV_.second
811  << " for this pedestals run!" << std::endl;
812  }
813 
814  if ( runType_ != sistrip::APV_LATENCY ) {
815  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
816  } else {
817  ss << " APV latency maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
818  << " <= This \"state\" version overriden by \"history\" version "
819  << apvLatencyV_.first << "." << apvLatencyV_.second
820  << " for this APV latency run!" << std::endl;
821  }
822 
823  if ( runType_ != sistrip::FINE_DELAY_TTC ) {
824  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
825  } else {
826  ss << " Fine delay maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
827  << " <= This \"state\" version overriden by \"history\" version "
828  << fineDelayV_.first << "." << fineDelayV_.second
829  << " for this fine delay run!" << std::endl;
830  }
831 
832  }
833 
834  } else {
835 
836  ss << " Input \"module.xml\" file : " << inputModuleXml_ << std::endl
837  << " Input \"dcuinfo.xml\" file : " << inputDcuInfoXml_ << std::endl
838  << " Input \"fec.xml\" file(s) : ";
839  std::vector<std::string>::const_iterator ifec = inputFecXml_.begin();
840  for ( ; ifec != inputFecXml_.end(); ifec++ ) { ss << *ifec << ", "; }
841  ss << std::endl;
842  ss << " Input \"fed.xml\" file(s) : ";
843  std::vector<std::string>::const_iterator ifed = inputFedXml_.begin();
844  for ( ; ifed != inputFedXml_.end(); ifed++ ) { ss << *ifed << ", "; }
845  ss << std::endl;
846 
847  }
848 
849 }
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 229 of file SiStripPartition.cc.

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

Referenced by SiStripDbParams::pset().

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

Definition at line 200 of file SiStripPartition.h.

References psuVersion_.

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

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

Definition at line 194 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_, psuVersion_, runNumber_, runTableVersion_, runType_, sistrip::UNDEFINED_RUN_TYPE, and vpspScanV_.

194  {
195  partitionName_ = "";
196  runNumber_ = 0;
198  forceVersions_ = false;
199  forceCurrentState_ = false;
200 
201  cabVersion_ = std::make_pair(0,0);
202  fedVersion_ = std::make_pair(0,0);
203  fecVersion_ = std::make_pair(0,0);
204  dcuVersion_ = std::make_pair(0,0);
205  psuVersion_ = std::make_pair(0,0);
206  //#ifdef USING_DATABASE_MASKING
207  maskVersion_ = std::make_pair(0,0);
208  //#endif
209 
210  globalAnalysisV_ = 0;
211  runTableVersion_ = std::make_pair(0,0);
212  fastCablingV_ = std::make_pair(0,0);
213  apvTimingV_ = std::make_pair(0,0);
214  optoScanV_ = std::make_pair(0,0);
215  vpspScanV_ = std::make_pair(0,0);
216  apvCalibV_ = std::make_pair(0,0);
217  pedestalsV_ = std::make_pair(0,0);
218  apvLatencyV_ = std::make_pair(0,0);
219  fineDelayV_ = std::make_pair(0,0);
220 
221  inputModuleXml_ = "";
222  inputDcuInfoXml_ = "";
223  inputFecXml_.clear(); inputFecXml_.push_back("");
224  inputFedXml_.clear(); inputFedXml_.push_back("");
225 }
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 191 of file SiStripPartition.h.

References runNumber_.

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

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

Definition at line 222 of file SiStripPartition.h.

References DTTTrigCorrFirst::run, and runNumber_.

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

Definition at line 206 of file SiStripPartition.h.

References runTableVersion_.

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

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

Definition at line 192 of file SiStripPartition.h.

References runType_.

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

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

Definition at line 267 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::PHYSICS, psuVersion_, sistrip::QUITE_FAST_CABLING, DTTTrigCorrFirst::run, runNumber_, runTableVersion_, runType_, contentValuesCheck::ss, edmStreamStallGrapher::states, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

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

References input, and sistrip::mlConfigDb_.

Referenced by pset().

862  {
863  std::vector<uint32_t> input = _input;
864  if ( input.size() != 2 ) {
866  << "[SiStripPartition::" << __func__ << "]"
867  << " Unexpected size (" << input.size()
868  << ") for vector containing version numbers (major,minor)!"
869  << " Resizing to 2 elements (default values will be 0,0)...";
870  input.resize(2,0);
871  }
872  return std::make_pair( input[0], input[1] );
873 }
static std::string const input
Definition: EdmProvDump.cc:43
static const char mlConfigDb_[]
SiStripPartition::Versions SiStripPartition::vpspScanVersion ( ) const
inline

Definition at line 210 of file SiStripPartition.h.

References vpspScanV_.

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

210 { return vpspScanV_; }

Member Data Documentation

Versions SiStripPartition::apvCalibV_
private

Definition at line 168 of file SiStripPartition.h.

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

Versions SiStripPartition::apvLatencyV_
private

Definition at line 172 of file SiStripPartition.h.

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

Versions SiStripPartition::apvTimingV_
private

Definition at line 162 of file SiStripPartition.h.

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

Versions SiStripPartition::cabVersion_
private

Definition at line 140 of file SiStripPartition.h.

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

Versions SiStripPartition::dcuVersion_
private

Definition at line 146 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 160 of file SiStripPartition.h.

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

Versions SiStripPartition::fecVersion_
private

Definition at line 144 of file SiStripPartition.h.

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

Versions SiStripPartition::fedVersion_
private

Definition at line 142 of file SiStripPartition.h.

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

Versions SiStripPartition::fineDelayV_
private

Definition at line 174 of file SiStripPartition.h.

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

bool SiStripPartition::forceCurrentState_
private

Definition at line 136 of file SiStripPartition.h.

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

bool SiStripPartition::forceVersions_
private

Definition at line 134 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 180 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 178 of file SiStripPartition.h.

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

Versions SiStripPartition::maskVersion_
private

Definition at line 151 of file SiStripPartition.h.

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

Versions SiStripPartition::optoScanV_
private

Definition at line 164 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 170 of file SiStripPartition.h.

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

Versions SiStripPartition::psuVersion_
private

Definition at line 148 of file SiStripPartition.h.

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

uint32_t SiStripPartition::runNumber_
private

Definition at line 130 of file SiStripPartition.h.

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

Versions SiStripPartition::runTableVersion_
private

Definition at line 158 of file SiStripPartition.h.

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

sistrip::RunType SiStripPartition::runType_
private

Definition at line 132 of file SiStripPartition.h.

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

Versions SiStripPartition::vpspScanV_
private

Definition at line 166 of file SiStripPartition.h.

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