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 (const SiStripPartition &)
 
 SiStripPartition (std::string partition_name)
 
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

◆ Versions

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

Definition at line 42 of file SiStripPartition.h.

Constructor & Destructor Documentation

◆ SiStripPartition() [1/3]

SiStripPartition::SiStripPartition ( )

Definition at line 17 of file SiStripPartition.cc.

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  ;
47 }

◆ SiStripPartition() [2/3]

SiStripPartition::SiStripPartition ( std::string  partition_name)

Definition at line 51 of file SiStripPartition.cc.

52  : partitionName_(partition),
53  runNumber_(0),
55  forceVersions_(false),
56  forceCurrentState_(false),
57  cabVersion_(0, 0),
58  fedVersion_(0, 0),
59  fecVersion_(0, 0),
60  dcuVersion_(0, 0),
61  psuVersion_(0, 0),
62  //#ifdef USING_DATABASE_MASKING
63  maskVersion_(0, 0),
64  //#endif
66  runTableVersion_(0, 0),
67  fastCablingV_(0, 0),
68  apvTimingV_(0, 0),
69  optoScanV_(0, 0),
70  vpspScanV_(0, 0),
71  apvCalibV_(0, 0),
72  pedestalsV_(0, 0),
73  pedsFullNoiseV_(0, 0),
74  apvLatencyV_(0, 0),
75  fineDelayV_(0, 0),
76  inputModuleXml_(""),
77  inputDcuInfoXml_(""),
78  inputFecXml_(),
79  inputFedXml_() {
80  if (partitionName_.empty()) {
82  }
83 }

References defaultPartitionName_, and partitionName_.

◆ SiStripPartition() [3/3]

SiStripPartition::SiStripPartition ( const SiStripPartition input)

Definition at line 87 of file SiStripPartition.cc.

88  : partitionName_(input.partitionName()),
89  runNumber_(input.runNumber()),
90  runType_(input.runType()),
91  forceVersions_(input.forceVersions()),
92  forceCurrentState_(input.forceCurrentState()),
93  cabVersion_(input.cabVersion()),
94  fedVersion_(input.fedVersion()),
95  fecVersion_(input.fecVersion()),
96  dcuVersion_(input.dcuVersion()),
97  psuVersion_(input.psuVersion()),
98  //#ifdef USING_DATABASE_MASKING
99  maskVersion_(input.maskVersion()),
100  //#endif
101  globalAnalysisV_(input.globalAnalysisVersion()),
102  runTableVersion_(input.runTableVersion()),
103  fastCablingV_(input.fastCablingVersion()),
104  apvTimingV_(input.apvTimingVersion()),
105  optoScanV_(input.optoScanVersion()),
106  vpspScanV_(input.vpspScanVersion()),
107  apvCalibV_(input.apvCalibVersion()),
108  pedestalsV_(input.pedestalsVersion()),
109  pedsFullNoiseV_(input.pedsFullNoiseVersion()),
110  apvLatencyV_(input.apvLatencyVersion()),
111  fineDelayV_(input.fineDelayVersion()),
112  inputModuleXml_(input.inputModuleXml()),
113  inputDcuInfoXml_(input.inputDcuInfoXml()),
114  inputFecXml_(input.inputFecXml()),
115  inputFedXml_(input.inputFedXml()) {
116  ;
117 }

◆ ~SiStripPartition()

SiStripPartition::~SiStripPartition ( )

Definition at line 182 of file SiStripPartition.cc.

182  {
183  inputFecXml_.clear();
184  inputFedXml_.clear();
185 }

References inputFecXml_, and inputFedXml_.

Member Function Documentation

◆ apvCalibVersion()

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

Definition at line 210 of file SiStripPartition.h.

210 { return apvCalibV_; }

References apvCalibV_.

◆ apvLatencyVersion()

SiStripPartition::Versions SiStripPartition::apvLatencyVersion ( ) const
inline

Definition at line 213 of file SiStripPartition.h.

213 { return apvLatencyV_; }

References apvLatencyV_.

◆ apvTimingVersion()

SiStripPartition::Versions SiStripPartition::apvTimingVersion ( ) const
inline

◆ cabVersion()

SiStripPartition::Versions SiStripPartition::cabVersion ( ) const
inline

◆ dcuVersion()

SiStripPartition::Versions SiStripPartition::dcuVersion ( ) const
inline

Definition at line 198 of file SiStripPartition.h.

198 { return dcuVersion_; }

References dcuVersion_.

◆ fastCablingVersion()

SiStripPartition::Versions SiStripPartition::fastCablingVersion ( ) const
inline

Definition at line 206 of file SiStripPartition.h.

206 { return fastCablingV_; }

References fastCablingV_.

◆ fecVersion()

SiStripPartition::Versions SiStripPartition::fecVersion ( ) const
inline

◆ fedVersion()

SiStripPartition::Versions SiStripPartition::fedVersion ( ) const
inline

◆ fineDelayVersion()

SiStripPartition::Versions SiStripPartition::fineDelayVersion ( ) const
inline

Definition at line 214 of file SiStripPartition.h.

214 { return fineDelayV_; }

References fineDelayV_.

◆ forceCurrentState() [1/2]

bool SiStripPartition::forceCurrentState ( ) const
inline

Definition at line 193 of file SiStripPartition.h.

193 { return forceCurrentState_; }

References forceCurrentState_.

◆ forceCurrentState() [2/2]

void SiStripPartition::forceCurrentState ( bool  force)
inline

Definition at line 224 of file SiStripPartition.h.

References cmsStageWithFailover::force, and forceCurrentState_.

◆ forceVersions() [1/2]

bool SiStripPartition::forceVersions ( ) const
inline

Definition at line 192 of file SiStripPartition.h.

192 { return forceVersions_; }

References forceVersions_.

◆ forceVersions() [2/2]

void SiStripPartition::forceVersions ( bool  force)
inline

Definition at line 223 of file SiStripPartition.h.

223 { forceVersions_ = force; }

References cmsStageWithFailover::force, and forceVersions_.

◆ globalAnalysisVersion()

uint32_t SiStripPartition::globalAnalysisVersion ( ) const
inline

Definition at line 204 of file SiStripPartition.h.

204 { return globalAnalysisV_; }

References globalAnalysisV_.

◆ inputDcuInfoXml()

std::string SiStripPartition::inputDcuInfoXml ( ) const
inline

Definition at line 217 of file SiStripPartition.h.

217 { return inputDcuInfoXml_; }

References inputDcuInfoXml_.

◆ inputFecXml()

std::vector< std::string > SiStripPartition::inputFecXml ( ) const
inline

Definition at line 218 of file SiStripPartition.h.

218 { return inputFecXml_; }

References inputFecXml_.

◆ inputFedXml()

std::vector< std::string > SiStripPartition::inputFedXml ( ) const
inline

Definition at line 219 of file SiStripPartition.h.

219 { return inputFedXml_; }

References inputFedXml_.

◆ inputModuleXml()

std::string SiStripPartition::inputModuleXml ( ) const
inline

Definition at line 216 of file SiStripPartition.h.

216 { return inputModuleXml_; }

References inputModuleXml_.

◆ maskVersion()

SiStripPartition::Versions SiStripPartition::maskVersion ( ) const
inline

◆ operator!=()

bool SiStripPartition::operator!= ( const SiStripPartition input) const

Definition at line 178 of file SiStripPartition.cc.

178 { return !(*this == input); }

References input.

◆ operator=()

SiStripPartition & SiStripPartition::operator= ( const SiStripPartition input)

Definition at line 121 of file SiStripPartition.cc.

121  {
122  if (this == &input) {
123  return *this;
124  } // self-assignment
125  partitionName_ = input.partitionName();
126  runNumber_ = input.runNumber();
127  runType_ = input.runType();
128  forceVersions_ = input.forceVersions();
129  forceCurrentState_ = input.forceCurrentState();
130  cabVersion_ = input.cabVersion();
131  fedVersion_ = input.fedVersion();
132  fecVersion_ = input.fecVersion();
133  dcuVersion_ = input.dcuVersion();
134  psuVersion_ = input.psuVersion();
135  //#ifdef USING_DATABASE_MASKING
136  maskVersion_ = input.maskVersion();
137  //#endif
138  globalAnalysisV_ = input.globalAnalysisVersion();
139  runTableVersion_ = input.runTableVersion();
140  fastCablingV_ = input.fastCablingVersion();
141  apvTimingV_ = input.apvTimingVersion();
142  optoScanV_ = input.optoScanVersion();
143  vpspScanV_ = input.vpspScanVersion();
144  apvCalibV_ = input.apvCalibVersion();
145  pedestalsV_ = input.pedestalsVersion();
146  pedsFullNoiseV_ = input.pedsFullNoiseVersion();
147  apvLatencyV_ = input.apvLatencyVersion();
148  fineDelayV_ = input.fineDelayVersion();
149  inputModuleXml_ = input.inputModuleXml();
150  inputDcuInfoXml_ = input.inputDcuInfoXml();
151  inputFecXml_ = input.inputFecXml();
152  inputFedXml_ = input.inputFedXml();
153  return *this;
154 }

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

◆ operator==()

bool SiStripPartition::operator== ( const SiStripPartition input) const

Definition at line 158 of file SiStripPartition.cc.

158  {
159  return (partitionName_ == input.partitionName() && runNumber_ == input.runNumber() && runType_ == input.runType() &&
160  forceVersions_ == input.forceVersions() && forceCurrentState_ == input.forceCurrentState() &&
161  cabVersion_ == input.cabVersion() && fedVersion_ == input.fedVersion() && fecVersion_ == input.fecVersion() &&
162  dcuVersion_ == input.dcuVersion() && psuVersion_ == input.psuVersion() &&
163  //#ifdef USING_DATABASE_MASKING
164  maskVersion_ == input.maskVersion() &&
165  //#endif
166  globalAnalysisV_ == input.globalAnalysisVersion() && runTableVersion_ == input.runTableVersion() &&
167  fastCablingV_ == input.fastCablingVersion() && apvTimingV_ == input.apvTimingVersion() &&
168  optoScanV_ == input.optoScanVersion() && vpspScanV_ == input.vpspScanVersion() &&
169  apvCalibV_ == input.apvCalibVersion() && pedestalsV_ == input.pedestalsVersion() &&
170  pedsFullNoiseV_ == input.pedsFullNoiseVersion() && apvLatencyV_ == input.apvLatencyVersion() &&
171  fineDelayV_ == input.fineDelayVersion() && inputModuleXml_ == input.inputModuleXml() &&
172  inputDcuInfoXml_ == input.inputDcuInfoXml() && inputFecXml_ == input.inputFecXml() &&
173  inputFedXml_ == input.inputFedXml());
174 }

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

◆ optoScanVersion()

SiStripPartition::Versions SiStripPartition::optoScanVersion ( ) const
inline

Definition at line 208 of file SiStripPartition.h.

208 { return optoScanV_; }

References optoScanV_.

◆ partitionName() [1/2]

std::string SiStripPartition::partitionName ( ) const
inline

◆ partitionName() [2/2]

void SiStripPartition::partitionName ( std::string  name)
inline

Definition at line 221 of file SiStripPartition.h.

221 { partitionName_ = name; }

References Skims_PA_cff::name, and partitionName_.

◆ pedestalsVersion()

SiStripPartition::Versions SiStripPartition::pedestalsVersion ( ) const
inline

Definition at line 211 of file SiStripPartition.h.

211 { return pedestalsV_; }

References pedestalsV_.

◆ pedsFullNoiseVersion()

SiStripPartition::Versions SiStripPartition::pedsFullNoiseVersion ( ) const
inline

Definition at line 212 of file SiStripPartition.h.

212 { return pedsFullNoiseV_; }

References pedsFullNoiseV_.

◆ print()

void SiStripPartition::print ( std::stringstream &  ss,
bool  using_db = false 
) const

Definition at line 746 of file SiStripPartition.cc.

746  {
747  ss << " Partition : \"" << partitionName_ << "\"" << std::endl;
748 
749  if (using_db) {
750  ss << " Run number : ";
751  if (forceCurrentState_) {
752  ss << "Forced \"current state\"! (equivalent to versions below)";
753  } else if (forceVersions_) {
754  ss << "Forced versions specified below!";
755  } else /* use run number */ {
756  ss << runNumber_;
757  }
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
768  << std::endl
769  //#ifdef USING_DATABASE_MASKING
770  << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl
771  << " Mask maj/min vers : " << maskVersion_.first << "." << maskVersion_.second << std::endl;
772  //#else
773  // << " DCU-PSU map maj/min vers : " << psuVersion_.first << "." << psuVersion_.second << std::endl;
774  //#endif
775 
776  ss << " Global analysis version : " << globalAnalysisV_ << std::endl;
777 
780  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
781  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
782  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
783  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
784  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
785  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
786  ss << " PedsFullNoise maj/min vers : " << pedsFullNoiseV_.first << "." << pedsFullNoiseV_.second
787  << std::endl;
788  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
789  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
790 
791  } else {
793  ss << " FED cabling maj/min vers : " << fastCablingV_.first << "." << fastCablingV_.second << std::endl;
794  } else {
795  ss << " FED cabling maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
796  << " <= This \"state\" version overriden by \"history\" version " << fastCablingV_.first << "."
797  << fastCablingV_.second << " for this FED cabling run!" << std::endl;
798  }
799 
800  if (runType_ != sistrip::APV_TIMING) {
801  ss << " APV timing maj/min vers : " << apvTimingV_.first << "." << apvTimingV_.second << std::endl;
802  } else {
803  ss << " APV timing maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
804  << " <= This \"state\" version overriden by \"history\" version " << apvTimingV_.first << "."
805  << apvTimingV_.second << " for this APV timing run!" << std::endl;
806  }
807 
808  if (runType_ != sistrip::OPTO_SCAN) {
809  ss << " Opto scan maj/min vers : " << optoScanV_.first << "." << optoScanV_.second << std::endl;
810  } else {
811  ss << " Opto scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
812  << " <= This \"state\" version overriden by \"history\" version " << optoScanV_.first << "."
813  << optoScanV_.second << " for this opto scan run!" << std::endl;
814  }
815 
816  if (runType_ != sistrip::VPSP_SCAN) {
817  ss << " VPSP scan maj/min vers : " << vpspScanV_.first << "." << vpspScanV_.second << std::endl;
818  } else {
819  ss << " VPSP scan maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
820  << " <= This \"state\" version overriden by \"history\" version " << vpspScanV_.first << "."
821  << vpspScanV_.second << " for this VPSP scan run!" << std::endl;
822  }
823 
826  ss << " APV calib maj/min vers : " << apvCalibV_.first << "." << apvCalibV_.second << std::endl;
827  } else {
828  ss << " APV calib maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
829  << " <= This \"state\" version overriden by \"history\" version " << apvCalibV_.first << "."
830  << apvCalibV_.second << " for this APV calib run!" << std::endl;
831  }
832 
833  if (runType_ != sistrip::PEDESTALS) {
834  ss << " Pedestals maj/min vers : " << pedestalsV_.first << "." << pedestalsV_.second << std::endl;
835  } else {
836  ss << " Pedestals maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
837  << " <= This \"state\" version overriden by \"history\" version " << pedestalsV_.first << "."
838  << pedestalsV_.second << " for this pedestals run!" << std::endl;
839  }
840 
842  ss << " PedsFullNoise maj/min vers : " << pedsFullNoiseV_.first << "." << pedsFullNoiseV_.second
843  << std::endl;
844  } else {
845  ss << " Pedestals maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
846  << " <= This \"state\" version overriden by \"history\" version " << pedsFullNoiseV_.first << "."
847  << pedsFullNoiseV_.second << " for this pedestals run!" << std::endl;
848  }
849 
851  ss << " APV latency maj/min vers : " << apvLatencyV_.first << "." << apvLatencyV_.second << std::endl;
852  } else {
853  ss << " APV latency maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
854  << " <= This \"state\" version overriden by \"history\" version " << apvLatencyV_.first << "."
855  << apvLatencyV_.second << " for this APV latency run!" << std::endl;
856  }
857 
859  ss << " Fine delay maj/min vers : " << fineDelayV_.first << "." << fineDelayV_.second << std::endl;
860  } else {
861  ss << " Fine delay maj/min vers : " << runTableVersion_.first << "." << runTableVersion_.second
862  << " <= This \"state\" version overriden by \"history\" version " << fineDelayV_.first << "."
863  << fineDelayV_.second << " for this fine delay run!" << std::endl;
864  }
865  }
866 
867  } else {
868  ss << " Input \"module.xml\" file : " << inputModuleXml_ << std::endl
869  << " Input \"dcuinfo.xml\" file : " << inputDcuInfoXml_ << std::endl
870  << " Input \"fec.xml\" file(s) : ";
871  std::vector<std::string>::const_iterator ifec = inputFecXml_.begin();
872  for (; ifec != inputFecXml_.end(); ifec++) {
873  ss << *ifec << ", ";
874  }
875  ss << std::endl;
876  ss << " Input \"fed.xml\" file(s) : ";
877  std::vector<std::string>::const_iterator ifed = inputFedXml_.begin();
878  for (; ifed != inputFedXml_.end(); ifed++) {
879  ss << *ifed << ", ";
880  }
881  ss << std::endl;
882  }
883 }

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_, contentValuesCheck::ss, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

◆ pset()

void SiStripPartition::pset ( const edm::ParameterSet pset)

Definition at line 227 of file SiStripPartition.cc.

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

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

◆ psuVersion()

SiStripPartition::Versions SiStripPartition::psuVersion ( ) const
inline

Definition at line 199 of file SiStripPartition.h.

199 { return psuVersion_; }

References psuVersion_.

◆ reset()

void SiStripPartition::reset ( void  )

Definition at line 189 of file SiStripPartition.cc.

189  {
190  partitionName_ = "";
191  runNumber_ = 0;
193  forceVersions_ = false;
194  forceCurrentState_ = false;
195 
196  cabVersion_ = std::make_pair(0, 0);
197  fedVersion_ = std::make_pair(0, 0);
198  fecVersion_ = std::make_pair(0, 0);
199  dcuVersion_ = std::make_pair(0, 0);
200  psuVersion_ = std::make_pair(0, 0);
201  //#ifdef USING_DATABASE_MASKING
202  maskVersion_ = std::make_pair(0, 0);
203  //#endif
204 
205  globalAnalysisV_ = 0;
206  runTableVersion_ = std::make_pair(0, 0);
207  fastCablingV_ = std::make_pair(0, 0);
208  apvTimingV_ = std::make_pair(0, 0);
209  optoScanV_ = std::make_pair(0, 0);
210  vpspScanV_ = std::make_pair(0, 0);
211  apvCalibV_ = std::make_pair(0, 0);
212  pedestalsV_ = std::make_pair(0, 0);
213  pedsFullNoiseV_ = std::make_pair(0, 0);
214  apvLatencyV_ = std::make_pair(0, 0);
215  fineDelayV_ = std::make_pair(0, 0);
216 
217  inputModuleXml_ = "";
218  inputDcuInfoXml_ = "";
219  inputFecXml_.clear();
220  inputFecXml_.push_back("");
221  inputFedXml_.clear();
222  inputFedXml_.push_back("");
223 }

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_.

◆ runNumber() [1/2]

uint32_t SiStripPartition::runNumber ( ) const
inline

Definition at line 190 of file SiStripPartition.h.

190 { return runNumber_; }

References runNumber_.

◆ runNumber() [2/2]

void SiStripPartition::runNumber ( uint32_t  run)
inline

Definition at line 222 of file SiStripPartition.h.

222 { runNumber_ = run; }

References writedatasetfile::run, and runNumber_.

◆ runTableVersion()

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

Definition at line 205 of file SiStripPartition.h.

205 { return runTableVersion_; }

References runTableVersion_.

◆ runType()

sistrip::RunType SiStripPartition::runType ( ) const
inline

Definition at line 191 of file SiStripPartition.h.

191 { return runType_; }

References runType_.

◆ update()

void SiStripPartition::update ( const SiStripConfigDb * const  db)

Definition at line 264 of file SiStripPartition.cc.

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

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, dqmiodatasetharvest::db, dcuVersion_, defaultPartitionName_, hgcalPerformanceValidation::df, 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_, 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_, contentValuesCheck::ss, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, sistrip::VPSP_SCAN, and vpspScanV_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

◆ versions()

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

Definition at line 896 of file SiStripPartition.cc.

896  {
897  std::vector<uint32_t> input = _input;
898  if (input.size() != 2) {
899  edm::LogWarning(mlConfigDb_) << "[SiStripPartition::" << __func__ << "]"
900  << " Unexpected size (" << input.size()
901  << ") for vector containing version numbers (major,minor)!"
902  << " Resizing to 2 elements (default values will be 0,0)...";
903  input.resize(2, 0);
904  }
905  return std::make_pair(input[0], input[1]);
906 }

References input, and sistrip::mlConfigDb_.

Referenced by pset().

◆ vpspScanVersion()

SiStripPartition::Versions SiStripPartition::vpspScanVersion ( ) const
inline

Definition at line 209 of file SiStripPartition.h.

209 { return vpspScanV_; }

References vpspScanV_.

Member Data Documentation

◆ apvCalibV_

Versions SiStripPartition::apvCalibV_
private

Definition at line 166 of file SiStripPartition.h.

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

◆ apvLatencyV_

Versions SiStripPartition::apvLatencyV_
private

Definition at line 172 of file SiStripPartition.h.

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

◆ apvTimingV_

Versions SiStripPartition::apvTimingV_
private

Definition at line 160 of file SiStripPartition.h.

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

◆ cabVersion_

Versions SiStripPartition::cabVersion_
private

Definition at line 138 of file SiStripPartition.h.

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

◆ dcuVersion_

Versions SiStripPartition::dcuVersion_
private

Definition at line 144 of file SiStripPartition.h.

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

◆ defaultPartitionName_

const std::string SiStripPartition::defaultPartitionName_ = "DefaultPartition"
static

◆ fastCablingV_

Versions SiStripPartition::fastCablingV_
private

Definition at line 158 of file SiStripPartition.h.

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

◆ fecVersion_

Versions SiStripPartition::fecVersion_
private

Definition at line 142 of file SiStripPartition.h.

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

◆ fedVersion_

Versions SiStripPartition::fedVersion_
private

Definition at line 140 of file SiStripPartition.h.

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

◆ fineDelayV_

Versions SiStripPartition::fineDelayV_
private

Definition at line 174 of file SiStripPartition.h.

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

◆ forceCurrentState_

bool SiStripPartition::forceCurrentState_
private

Definition at line 134 of file SiStripPartition.h.

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

◆ forceVersions_

bool SiStripPartition::forceVersions_
private

Definition at line 132 of file SiStripPartition.h.

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

◆ globalAnalysisV_

uint32_t SiStripPartition::globalAnalysisV_
private

◆ inputDcuInfoXml_

std::string SiStripPartition::inputDcuInfoXml_
private

Definition at line 180 of file SiStripPartition.h.

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

◆ inputFecXml_

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

◆ inputFedXml_

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

◆ inputModuleXml_

std::string SiStripPartition::inputModuleXml_
private

Definition at line 178 of file SiStripPartition.h.

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

◆ maskVersion_

Versions SiStripPartition::maskVersion_
private

Definition at line 149 of file SiStripPartition.h.

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

◆ optoScanV_

Versions SiStripPartition::optoScanV_
private

Definition at line 162 of file SiStripPartition.h.

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

◆ partitionName_

std::string SiStripPartition::partitionName_
private

◆ pedestalsV_

Versions SiStripPartition::pedestalsV_
private

Definition at line 168 of file SiStripPartition.h.

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

◆ pedsFullNoiseV_

Versions SiStripPartition::pedsFullNoiseV_
private

Definition at line 170 of file SiStripPartition.h.

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

◆ psuVersion_

Versions SiStripPartition::psuVersion_
private

Definition at line 146 of file SiStripPartition.h.

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

◆ runNumber_

uint32_t SiStripPartition::runNumber_
private

Definition at line 128 of file SiStripPartition.h.

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

◆ runTableVersion_

Versions SiStripPartition::runTableVersion_
private

Definition at line 156 of file SiStripPartition.h.

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

◆ runType_

sistrip::RunType SiStripPartition::runType_
private

Definition at line 130 of file SiStripPartition.h.

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

◆ vpspScanV_

Versions SiStripPartition::vpspScanV_
private

Definition at line 164 of file SiStripPartition.h.

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

sistrip::CALIBRATION_SCAN
Definition: ConstantsForRunType.h:87
sistrip::PHYSICS_ZS
Definition: ConstantsForRunType.h:86
SiStripPartition::inputModuleXml_
std::string inputModuleXml_
Definition: SiStripPartition.h:178
SiStripEnumsAndStrings::runType
static std::string runType(const sistrip::RunType &)
Definition: SiStripEnumsAndStrings.cc:39
SiStripPartition::forceCurrentState_
bool forceCurrentState_
Definition: SiStripPartition.h:134
cmsStageWithFailover.force
force
Definition: cmsStageWithFailover.py:19
sistrip::DAQ_SCOPE_MODE
Definition: ConstantsForRunType.h:83
sistrip::CALIBRATION
Definition: ConstantsForRunType.h:73
input
static const std::string input
Definition: EdmProvDump.cc:48
sistrip::PEDS_FULL_NOISE
Definition: ConstantsForRunType.h:92
SiStripPartition::pedsFullNoiseV_
Versions pedsFullNoiseV_
Definition: SiStripPartition.h:170
sistrip::VPSP_SCAN
Definition: ConstantsForRunType.h:82
sistrip::FAST_CABLING
Definition: ConstantsForRunType.h:89
SiStripPartition::vpspScanV_
Versions vpspScanV_
Definition: SiStripPartition.h:164
sistrip::APV_TIMING
Definition: ConstantsForRunType.h:75
SiStripPartition::maskVersion_
Versions maskVersion_
Definition: SiStripPartition.h:149
SiStripPartition::pedestalsV_
Versions pedestalsV_
Definition: SiStripPartition.h:168
SiStripPartition::fineDelayV_
Versions fineDelayV_
Definition: SiStripPartition.h:174
sistrip::OPTO_SCAN
Definition: ConstantsForRunType.h:74
SiStripPartition::cabVersion_
Versions cabVersion_
Definition: SiStripPartition.h:138
SiStripPartition::inputFecXml_
std::vector< std::string > inputFecXml_
Definition: SiStripPartition.h:182
SiStripPartition::fastCablingV_
Versions fastCablingV_
Definition: SiStripPartition.h:158
SiStripPartition::dcuVersion_
Versions dcuVersion_
Definition: SiStripPartition.h:144
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
sistrip::FINE_DELAY
Definition: ConstantsForRunType.h:85
sistrip::mlConfigDb_
static const char mlConfigDb_[]
Definition: ConstantsForLogger.h:16
dqmiodatasetharvest.db
db
Definition: dqmiodatasetharvest.py:119
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripPartition::apvLatencyV_
Versions apvLatencyV_
Definition: SiStripPartition.h:172
sistrip::FED_CABLING
Definition: ConstantsForRunType.h:81
SiStripPartition::inputFedXml_
std::vector< std::string > inputFedXml_
Definition: SiStripPartition.h:184
sistrip::FINE_DELAY_TTC
Definition: ConstantsForRunType.h:78
SiStripPartition::apvCalibV_
Versions apvCalibV_
Definition: SiStripPartition.h:166
SiStripPartition::forceVersions_
bool forceVersions_
Definition: SiStripPartition.h:132
SiStripPartition::apvTimingV_
Versions apvTimingV_
Definition: SiStripPartition.h:160
SiStripPartition::partitionName_
std::string partitionName_
Definition: SiStripPartition.h:126
SiStripPartition::psuVersion_
Versions psuVersion_
Definition: SiStripPartition.h:146
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripPartition::Versions
std::pair< uint32_t, uint32_t > Versions
Definition: SiStripPartition.h:42
sistrip::CALIBRATION_DECO
Definition: ConstantsForRunType.h:93
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
sistrip::QUITE_FAST_CABLING
Definition: ConstantsForRunType.h:84
sistrip::PEDESTALS
Definition: ConstantsForRunType.h:72
SiStripPartition::pset
void pset(const edm::ParameterSet &)
Definition: SiStripPartition.cc:227
sistrip::UNKNOWN_RUN_TYPE
Definition: ConstantsForRunType.h:94
sistrip::FED_TIMING
Definition: ConstantsForRunType.h:80
sistrip::PEDS_ONLY
Definition: ConstantsForRunType.h:90
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
SiStripPartition::fecVersion_
Versions fecVersion_
Definition: SiStripPartition.h:142
SiStripPartition::globalAnalysisV_
uint32_t globalAnalysisV_
Definition: SiStripPartition.h:154
sistrip::MULTI_MODE
Definition: ConstantsForRunType.h:79
SiStripPartition::runTableVersion_
Versions runTableVersion_
Definition: SiStripPartition.h:156
sistrip::FINE_DELAY_PLL
Definition: ConstantsForRunType.h:77
sistrip::CALIBRATION_SCAN_DECO
Definition: ConstantsForRunType.h:88
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiStripPartition::runType_
sistrip::RunType runType_
Definition: SiStripPartition.h:130
sistrip::PHYSICS
Definition: ConstantsForRunType.h:71
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:640
sistrip::APV_LATENCY
Definition: ConstantsForRunType.h:76
sistrip::UNDEFINED_RUN_TYPE
Definition: ConstantsForRunType.h:95
SiStripPartition::fedVersion_
Versions fedVersion_
Definition: SiStripPartition.h:140
sistrip::NOISE
Definition: ConstantsForRunType.h:91
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
SiStripPartition::inputDcuInfoXml_
std::string inputDcuInfoXml_
Definition: SiStripPartition.h:180
SiStripPartition::runNumber_
uint32_t runNumber_
Definition: SiStripPartition.h:128
SiStripPartition::versions
Versions versions(const std::vector< uint32_t > &)
Definition: SiStripPartition.cc:896
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
SiStripPartition::defaultPartitionName_
static const std::string defaultPartitionName_
Definition: SiStripPartition.h:40
SiStripPartition::optoScanV_
Versions optoScanV_
Definition: SiStripPartition.h:162