CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
SiStripCommissioningOfflineDbClient Class Reference

Class which reads a root file containing "commissioning histograms", analyzes the histograms to extract "monitorables", creates summary histograms, and uploads to DB. More...

#include <SiStripCommissioningOfflineDbClient.h>

Inheritance diagram for SiStripCommissioningOfflineDbClient:
SiStripCommissioningOfflineClient edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 SiStripCommissioningOfflineDbClient (const edm::ParameterSet &)
 
 ~SiStripCommissioningOfflineDbClient () override
 
- Public Member Functions inherited from SiStripCommissioningOfflineClient
void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void endJob () override
 
 SiStripCommissioningOfflineClient (const edm::ParameterSet &)
 
 ~SiStripCommissioningOfflineClient () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void createHistos (const edm::ParameterSet &, const edm::EventSetup &) override
 
void uploadToConfigDb () override
 
- Protected Member Functions inherited from SiStripCommissioningOfflineClient
virtual void setInputFiles (std::vector< std::string > &, const std::string, const std::string, uint32_t, bool)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

bool uploadAnal_
 
bool uploadConf_
 
bool uploadToDb_
 

Additional Inherited Members

- Public Types inherited from SiStripCommissioningOfflineClient
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Types inherited from SiStripCommissioningOfflineClient
typedef std::vector< TH1 * > Histos
 
typedef std::map< uint32_t, HistosHistosMap
 
- Protected Attributes inherited from SiStripCommissioningOfflineClient
bool analyzeHistos_
 
DQMStorebei_
 
bool clientHistos_
 
bool collateHistos_
 
bool createSummaryPlots_
 
CommissioningHistogramshistos_
 
std::vector< std::string > inputFiles_
 
HistosMap map_
 
std::string outputFileName_
 
edm::ParameterSet parameters_
 
std::string partitionName_
 
std::vector< SummaryPlotplots_
 
uint32_t runNumber_
 
sistrip::RunType runType_
 
bool uploadToDb_
 
std::string xmlFile_
 

Detailed Description

Class which reads a root file containing "commissioning histograms", analyzes the histograms to extract "monitorables", creates summary histograms, and uploads to DB.

Author
R.Bainbridge, M.Wingham

Definition at line 17 of file SiStripCommissioningOfflineDbClient.h.

Constructor & Destructor Documentation

SiStripCommissioningOfflineDbClient::SiStripCommissioningOfflineDbClient ( const edm::ParameterSet pset)

Definition at line 27 of file SiStripCommissioningOfflineDbClient.cc.

References LogTrace, sistrip::mlDqmClient_, uploadAnal_, and uploadConf_.

29  uploadAnal_(pset.getUntrackedParameter<bool>("UploadAnalyses", false)),
30  uploadConf_(pset.getUntrackedParameter<bool>("UploadHwConfig", false)) {
31  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
32  << " Constructing object...";
33  if (!uploadConf_) {
34  edm::LogWarning(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
35  << " ===> TEST only! No hardware configurations"
36  << " will be uploaded to the DB...";
37  }
38  if (!uploadAnal_) {
39  edm::LogWarning(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
40  << " ===> TEST only! No analysis descriptions"
41  << " will be uploaded to the DB...";
42  }
43 }
T getUntrackedParameter(std::string const &, T const &) const
static const char mlDqmClient_[]
SiStripCommissioningOfflineClient(const edm::ParameterSet &)
#define LogTrace(id)
SiStripCommissioningOfflineDbClient::~SiStripCommissioningOfflineDbClient ( )
override

Definition at line 47 of file SiStripCommissioningOfflineDbClient.cc.

References LogTrace, and sistrip::mlDqmClient_.

47  {
48  LogTrace(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
49  << " Destructing object...";
50 }
static const char mlDqmClient_[]
#define LogTrace(id)

Member Function Documentation

void SiStripCommissioningOfflineDbClient::createHistos ( const edm::ParameterSet pset,
const edm::EventSetup setup 
)
overrideprotectedvirtual

Reimplemented from SiStripCommissioningOfflineClient.

Definition at line 54 of file SiStripCommissioningOfflineDbClient.cc.

References sistrip::APV_LATENCY, sistrip::APV_TIMING, SiStripCommissioningOfflineClient::bei_, sistrip::CALIBRATION, sistrip::CALIBRATION_DECO, sistrip::CALIBRATION_SCAN, sistrip::CALIBRATION_SCAN_DECO, CommissioningHistograms::configure(), sistrip::DAQ_SCOPE_MODE, dqmiodatasetharvest::db, CommissioningHistosUsingDb::doUploadAnal(), CommissioningHistosUsingDb::doUploadConf(), sistrip::FAST_CABLING, sistrip::FINE_DELAY, SiStripCommissioningOfflineClient::histos_, LogTrace, sistrip::mlCabling_, sistrip::mlDqmClient_, sistrip::NOISE, Utilities::operator, sistrip::OPTO_SCAN, sistrip::PEDESTALS, sistrip::PEDS_FULL_NOISE, sistrip::PEDS_ONLY, SiStripCommissioningOfflineClient::runType_, contentValuesCheck::ss, createJobs::tmp, sistrip::UNDEFINED_RUN_TYPE, sistrip::UNKNOWN_RUN_TYPE, uploadAnal_, uploadConf_, and sistrip::VPSP_SCAN.

54  {
55  // Check pointer
56  if (histos_) {
57  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
58  << " CommissioningHistogram object already exists!"
59  << " Aborting...";
60  return;
61  }
62 
63  // Check pointer to BEI
64  // is this needed here? bei_ = edm::Service<DQMStore>().operator->();
65  if (!bei_) {
66  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
67  << " NULL pointer to DQMStore!";
68  return;
69  }
70 
71  // Create DB connection
72  SiStripConfigDb* db = edm::Service<SiStripConfigDb>().operator->(); //@@ NOT GUARANTEED TO BE THREAD SAFE!
73  LogTrace(mlCabling_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
74  << " Nota bene: using the SiStripConfigDb API"
75  << " as a \"service\" does not presently guarantee"
76  << " thread-safe behaviour!...";
77 
78  // Check DB connection
79  if (!db) {
80  edm::LogError(mlCabling_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
81  << " NULL pointer to SiStripConfigDb!"
82  << " Aborting...";
83  return;
84  }
85 
86  // Create corresponding "commissioning histograms" object
89  } else if (runType_ == sistrip::APV_TIMING) {
90  histos_ = new ApvTimingHistosUsingDb(pset, bei_, db);
91  } else if (runType_ == sistrip::OPTO_SCAN) {
92  histos_ = new OptoScanHistosUsingDb(pset, bei_, db);
93  } else if (runType_ == sistrip::VPSP_SCAN) {
94  histos_ = new VpspScanHistosUsingDb(pset, bei_, db);
95  } else if (runType_ == sistrip::PEDESTALS) {
96  histos_ = new PedestalsHistosUsingDb(pset, bei_, db);
97  } else if (runType_ == sistrip::PEDS_ONLY) {
98  histos_ = new PedsOnlyHistosUsingDb(pset, bei_, db);
99  } else if (runType_ == sistrip::PEDS_FULL_NOISE) {
101  } else if (runType_ == sistrip::NOISE) {
102  histos_ = new NoiseHistosUsingDb(pset, bei_, db);
103  } else if (runType_ == sistrip::APV_LATENCY) {
104  histos_ = new LatencyHistosUsingDb(pset, bei_, db);
105  } else if (runType_ == sistrip::FINE_DELAY) {
106  histos_ = new FineDelayHistosUsingDb(pset, bei_, db);
110  } else if (runType_ == sistrip::DAQ_SCOPE_MODE) {
112  } else if (runType_ == sistrip::UNDEFINED_RUN_TYPE) {
113  histos_ = nullptr;
114  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
115  << " Undefined run type!";
116  return;
117  } else if (runType_ == sistrip::UNKNOWN_RUN_TYPE) {
118  histos_ = nullptr;
119  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
120  << " Unknown run type!";
121  return;
122  }
123  histos_->configure(pset, setup);
124 
126  if (tmp) {
129  std::stringstream ss;
130  ss << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]" << std::endl
131  << " Uploading hardware configurations? : " << (tmp->doUploadConf() ? "true" : "false") << std::endl
132  << " Uploading calibrations from analysis? : " << (tmp->doUploadAnal() ? "true" : "false") << std::endl;
133  edm::LogVerbatim(mlDqmClient_) << ss.str();
134  } else {
135  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
136  << " NULL pointer to CommissioningHistosUsingDb!";
137  }
138 }
static const char mlDqmClient_[]
virtual void configure(const edm::ParameterSet &, const edm::EventSetup &)
static const char mlCabling_[]
An interface class to the DeviceFactory.
#define LogTrace(id)
tmp
align.sh
Definition: createJobs.py:716
void SiStripCommissioningOfflineDbClient::uploadToConfigDb ( )
overrideprotectedvirtual

Reimplemented from SiStripCommissioningOfflineClient.

Definition at line 142 of file SiStripCommissioningOfflineDbClient.cc.

References SiStripCommissioningOfflineClient::histos_, sistrip::mlDqmClient_, createJobs::tmp, and CommissioningHistosUsingDb::uploadToConfigDb().

142  {
143  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
144  << " Uploading parameters to database...";
146  if (tmp) {
147  tmp->uploadToConfigDb();
148  edm::LogVerbatim(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
149  << " Uploaded parameters to database!";
150  } else {
151  edm::LogError(mlDqmClient_) << "[SiStripCommissioningOfflineDbClient::" << __func__ << "]"
152  << " NULL pointer to CommissioningHistosUsingDb object!"
153  << " Upload aborted!...";
154  }
155 }
static const char mlDqmClient_[]
tmp
align.sh
Definition: createJobs.py:716

Member Data Documentation

bool SiStripCommissioningOfflineDbClient::uploadAnal_
private
bool SiStripCommissioningOfflineDbClient::uploadConf_
private
bool SiStripCommissioningOfflineDbClient::uploadToDb_
private

Definition at line 29 of file SiStripCommissioningOfflineDbClient.h.