CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
dqmservices::DQMProtobufReader Class Reference

#include <DQMProtobufReader.h>

Inheritance diagram for dqmservices::DQMProtobufReader:
edm::PuttableSourceBase edm::InputSource edm::ProducerBase edm::ProductRegistryHelper

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::InputSource
enum  ItemType {
  IsInvalid, IsStop, IsFile, IsRun,
  IsLumi, IsEvent, IsRepeat, IsSynchronize
}
 
enum  ProcessingMode { Runs, RunsAndLumis, RunsLumisAndEvents }
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 

Public Member Functions

 DQMProtobufReader (edm::ParameterSet const &, edm::InputSourceDescription const &)
 
 ~DQMProtobufReader () override
 
- Public Member Functions inherited from edm::PuttableSourceBase
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
 PuttableSourceBase (ParameterSet const &, InputSourceDescription const &)
 
void registerProducts () final
 Register any produced products. More...
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
- Public Member Functions inherited from edm::InputSource
std::shared_ptr< ActivityRegistryactReg () const
 Accessor for Activity Registry. More...
 
std::shared_ptr< BranchIDListHelper > & branchIDListHelper ()
 
std::shared_ptr< BranchIDListHelper const > branchIDListHelper () const
 Accessors for branchIDListHelper. More...
 
void closeFile (FileBlock *, bool cleaningUpAfterException)
 close current file More...
 
void doBeginJob ()
 Called by framework at beginning of job. More...
 
void doEndJob ()
 Called by framework at end of job. More...
 
ProcessingController::ForwardState forwardState () const
 
bool goToEvent (EventID const &eventID)
 
 InputSource (InputSource const &)=delete
 
 InputSource (ParameterSet const &, InputSourceDescription const &)
 Constructor. More...
 
void issueReports (EventID const &eventID, StreamID streamID)
 issue an event report More...
 
LuminosityBlockNumber_t luminosityBlock () const
 Accessor for current luminosity block number. More...
 
std::shared_ptr< LuminosityBlockAuxiliaryluminosityBlockAuxiliary () const
 Called by the framework to merge or insert lumi in principal cache. More...
 
int maxEvents () const
 
int maxLuminosityBlocks () const
 
ModuleDescription const & moduleDescription () const
 Accessor for 'module' description. More...
 
ItemType nextItemType ()
 Advances the source to the next item. More...
 
InputSourceoperator= (InputSource const &)=delete
 
ProcessConfiguration const & processConfiguration () const
 Accessor for Process Configuration. More...
 
std::string const & processGUID () const
 Accessor for global process identifier. More...
 
ProcessHistoryRegistryprocessHistoryRegistry ()
 
ProcessHistoryRegistry const & processHistoryRegistry () const
 Accessors for process history registry. More...
 
ProcessingMode processingMode () const
 RunsLumisAndEvents (default), RunsAndLumis, or Runs. More...
 
std::shared_ptr< ProductRegistry > & productRegistry ()
 
std::shared_ptr< ProductRegistry const > productRegistry () const
 Accessors for product registry. More...
 
bool randomAccess () const
 
void readAndMergeLumi (LuminosityBlockPrincipal &lbp)
 Read next luminosity block (same as a prior lumi) More...
 
void readAndMergeRun (RunPrincipal &rp)
 Read next run (same as a prior run) More...
 
bool readEvent (EventPrincipal &ep, EventID const &, StreamContext &)
 Read a specific event. More...
 
void readEvent (EventPrincipal &ep, StreamContext &)
 Read next event. More...
 
std::unique_ptr< FileBlockreadFile ()
 Read next file. More...
 
void readLuminosityBlock (LuminosityBlockPrincipal &lumiPrincipal, HistoryAppender &historyAppender)
 Read next luminosity block (new lumi) More...
 
std::shared_ptr< LuminosityBlockAuxiliaryreadLuminosityBlockAuxiliary ()
 Read next luminosity block Auxilary. More...
 
bool readProcessBlock ()
 Read next process block. More...
 
void readRun (RunPrincipal &runPrincipal, HistoryAppender &historyAppender)
 Read next run (new run) More...
 
std::shared_ptr< RunAuxiliaryreadRunAuxiliary ()
 Read next run Auxiliary. More...
 
ProcessHistoryID const & reducedProcessHistoryID () const
 
int remainingEvents () const
 
int remainingLuminosityBlocks () const
 
void repeat ()
 Reset the remaining number of events/lumis to the maximum number. More...
 
std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > resourceSharedWithDelayedReader ()
 Returns nullptr if no resource shared between the Source and a DelayedReader. More...
 
ProcessingController::ReverseState reverseState () const
 
void rewind ()
 Begin again at the first event. More...
 
RunNumber_t run () const
 Accessor for current run number. More...
 
std::shared_ptr< RunAuxiliaryrunAuxiliary () const
 Called by the framework to merge or insert run in principal cache. More...
 
void setLuminosityBlockNumber_t (LuminosityBlockNumber_t lb)
 Set the luminosity block ID. More...
 
void setRunNumber (RunNumber_t r)
 Set the run number. More...
 
void skipEvents (int offset)
 
std::shared_ptr< ThinnedAssociationsHelper > & thinnedAssociationsHelper ()
 
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper () const
 Accessors for thinnedAssociationsHelper. More...
 
Timestamp const & timestamp () const
 Accessor for the current time, as seen by the input source. More...
 
virtual ~InputSource () noexcept(false)
 Destructor. More...
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::InputSource
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

void beginLuminosityBlock (edm::LuminosityBlock &lb) override
 
edm::InputSource::ItemType getNextItemType () override
 
void load (DQMStore *store, std::string filename)
 
void logFileAction (char const *msg, char const *fileName) const
 
bool prepareNextFile ()
 
void readEvent_ (edm::EventPrincipal &) override
 
void readLuminosityBlock_ (edm::LuminosityBlockPrincipal &lbCache) override
 
std::shared_ptr< edm::LuminosityBlockAuxiliaryreadLuminosityBlockAuxiliary_ () override
 
void readRun_ (edm::RunPrincipal &rpCache) override
 
std::shared_ptr< edm::RunAuxiliaryreadRunAuxiliary_ () override
 

Private Attributes

DQMFileIterator::LumiEntry currentLumi_
 
DQMFileIterator fiterator_
 
bool flagDeleteDatFiles_
 
bool flagEndOfRunKills_
 
bool flagLoadFiles_
 
bool flagSkipFirstLumis_
 
InputSource::ItemType nextItemType
 
std::unique_ptr< double > streamReader_
 

Additional Inherited Members

- Public Attributes inherited from edm::InputSource
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postEventReadFromSourceSignal_
 
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preEventReadFromSourceSignal_
 
- Protected Member Functions inherited from edm::PuttableSourceBase
void beginJob () override
 Begin protected makes it easier to do template programming. More...
 
- Protected Member Functions inherited from edm::InputSource
void decreaseRemainingEventsBy (int iSkipped)
 
bool eventCached () const
 
bool newLumi () const
 
bool newRun () const
 
ProcessHistoryRegistryprocessHistoryRegistryForUpdate ()
 
ProductRegistryproductRegistryUpdate ()
 
void reset () const
 
void resetEventCached ()
 
void resetLuminosityBlockAuxiliary (bool isNewLumi=true) const
 
void resetNewLumi ()
 
void resetNewRun ()
 
void resetRunAuxiliary (bool isNewRun=true) const
 
void setEventCached ()
 Called by the framework to merge or ached() const {return eventCached_;}. More...
 
void setLuminosityBlockAuxiliary (LuminosityBlockAuxiliary *lbp)
 
void setNewLumi ()
 
void setNewRun ()
 
void setRunAuxiliary (RunAuxiliary *rp)
 
void setTimestamp (Timestamp const &theTime)
 To set the current time, as seen by the input source. More...
 
virtual void skip (int offset)
 
ItemType state () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 

Detailed Description

Definition at line 19 of file DQMProtobufReader.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 22 of file DQMProtobufReader.h.

◆ MonitorElement

Definition at line 21 of file DQMProtobufReader.h.

Constructor & Destructor Documentation

◆ DQMProtobufReader()

DQMProtobufReader::DQMProtobufReader ( edm::ParameterSet const &  pset,
edm::InputSourceDescription const &  desc 
)
explicit

Definition at line 22 of file DQMProtobufReader.cc.

24  flagSkipFirstLumis_ = pset.getUntrackedParameter<bool>("skipFirstLumis");
25  flagEndOfRunKills_ = pset.getUntrackedParameter<bool>("endOfRunKills");
26  flagDeleteDatFiles_ = pset.getUntrackedParameter<bool>("deleteDatFiles");
27  flagLoadFiles_ = pset.getUntrackedParameter<bool>("loadFiles");
28 
29  produces<std::string, edm::Transition::BeginLuminosityBlock>("sourceDataPath");
30  produces<std::string, edm::Transition::BeginLuminosityBlock>("sourceJsonPath");
31  produces<DQMToken, edm::Transition::BeginRun>("DQMGenerationRecoRun");
32  produces<DQMToken, edm::Transition::BeginLuminosityBlock>("DQMGenerationRecoLumi");
33 }

References flagDeleteDatFiles_, flagEndOfRunKills_, flagLoadFiles_, flagSkipFirstLumis_, and muonDTDigis_cfi::pset.

◆ ~DQMProtobufReader()

DQMProtobufReader::~DQMProtobufReader ( )
override

Definition at line 35 of file DQMProtobufReader.cc.

35 {}

Member Function Documentation

◆ beginLuminosityBlock()

void DQMProtobufReader::beginLuminosityBlock ( edm::LuminosityBlock lb)
overrideprivatevirtual

Reimplemented from edm::PuttableSourceBase.

Definition at line 114 of file DQMProtobufReader.cc.

114  {
116 
117  // clear the old lumi histograms
118  std::vector<MonitorElement*> allMEs = store->getAllContents("");
119  for (auto const& ME : allMEs) {
120  // We do not want to reset Run Products here!
121  if (ME->getLumiFlag()) {
122  ME->Reset();
123  }
124  }
125 
126  // load the new file
129 
130  std::unique_ptr<std::string> path_product(new std::string(path));
131  std::unique_ptr<std::string> json_product(new std::string(jspath));
132 
133  lb.put(std::move(path_product), "sourceDataPath");
134  lb.put(std::move(json_product), "sourceJsonPath");
135 
136  if (flagLoadFiles_) {
137  if (!std::filesystem::exists(path)) {
138  fiterator_.logFileAction("Data file is missing ", path);
139  fiterator_.logLumiState(currentLumi_, "error: data file missing");
140  return;
141  }
142 
143  fiterator_.logFileAction("Initiating request to open file ", path);
144  fiterator_.logFileAction("Successfully opened file ", path);
145  load(&*store, path);
146  fiterator_.logFileAction("Closed file ", path);
147  fiterator_.logLumiState(currentLumi_, "close: ok");
148  } else {
149  fiterator_.logFileAction("Not loading the data file at source level ", path);
150  fiterator_.logLumiState(currentLumi_, "close: not loading");
151  }
152 }

References currentLumi_, fiterator_, flagLoadFiles_, dqmservices::DQMFileIterator::LumiEntry::get_data_path(), dqmservices::DQMFileIterator::LumiEntry::get_json_path(), dqm::implementation::IGetter::getAllContents(), load(), dqmservices::DQMFileIterator::logFileAction(), dqmservices::DQMFileIterator::logLumiState(), eostools::move(), castor_dqm_sourceclient_file_cfg::path, edm::LuminosityBlock::put(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fillDescriptions()

void DQMProtobufReader::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 276 of file DQMProtobufReader.cc.

276  {
278 
279  desc.setComment(
280  "Creates runs and lumis and fills the dqmstore from protocol buffer "
281  "files.");
283 
284  desc.addUntracked<bool>("skipFirstLumis", false)
285  ->setComment(
286  "Skip (and ignore the minEventsPerLumi parameter) for the files "
287  "which have been available at the begining of the processing. "
288  "If set to true, the reader will open last available file for "
289  "processing.");
290 
291  desc.addUntracked<bool>("deleteDatFiles", false)
292  ->setComment(
293  "Delete data files after they have been closed, in order to "
294  "save disk space.");
295 
296  desc.addUntracked<bool>("endOfRunKills", false)
297  ->setComment(
298  "Kill the processing as soon as the end-of-run file appears, even if "
299  "there are/will be unprocessed lumisections.");
300 
301  desc.addUntracked<bool>("loadFiles", true)
302  ->setComment(
303  "Tells the source load the data files. If set to false, source will create skeleton lumi transitions.");
304 
306  descriptions.add("source", desc);
307 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, edm::IDGeneratorSourceBase< PuttableSourceBase >::fillDescription(), and dqmservices::DQMFileIterator::fillDescription().

◆ getNextItemType()

edm::InputSource::ItemType DQMProtobufReader::getNextItemType ( )
overrideprivatevirtual

Implements edm::InputSource.

Definition at line 37 of file DQMProtobufReader.cc.

37  {
39  typedef DQMFileIterator::LumiEntry LumiEntry;
40 
41  // fiterator_.logFileAction("getNextItemType");
42 
43  for (;;) {
45 
46  if (edm::shutdown_flag.load()) {
47  fiterator_.logFileAction("Shutdown flag was set, shutting down.");
48  return InputSource::IsStop;
49  }
50 
51  // check for end of run file and force quit
52  if (flagEndOfRunKills_ && (fiterator_.state() != State::OPEN)) {
53  return InputSource::IsStop;
54  }
55 
56  // check for end of run and quit if everything has been processed.
57  // this is the clean exit
58  if ((!fiterator_.lumiReady()) && (fiterator_.state() == State::EOR)) {
59  return InputSource::IsStop;
60  }
61 
62  // skip to the next file if we have no files openned yet
63  if (fiterator_.lumiReady()) {
64  return InputSource::IsLumi;
65  }
66 
67  fiterator_.delay();
68  // BUG: for an unknown reason it fails after a certain time if we use
69  // IsSynchronize state
70  //
71  // comment out in order to block at this level
72  // return InputSource::IsSynchronize;
73  }
74 
75  // this is unreachable
76 }

References dqmservices::DQMFileIterator::delay(), fiterator_, flagEndOfRunKills_, load(), dqmservices::DQMFileIterator::logFileAction(), dqmservices::DQMFileIterator::lumiReady(), edm::shutdown_flag, dqmservices::DQMFileIterator::state(), and dqmservices::DQMFileIterator::update_state().

◆ load()

void DQMProtobufReader::load ( DQMStore store,
std::string  filename 
)
private

Definition at line 154 of file DQMProtobufReader.cc.

154  {
155  using google::protobuf::io::ArrayInputStream;
156  using google::protobuf::io::CodedInputStream;
157  using google::protobuf::io::FileInputStream;
158  using google::protobuf::io::FileOutputStream;
159  using google::protobuf::io::GzipInputStream;
160  using google::protobuf::io::GzipOutputStream;
161 
162  int filedescriptor;
163  if ((filedescriptor = ::open(filename.c_str(), O_RDONLY)) == -1) {
164  edm::LogError("DQMProtobufReader") << "File " << filename << " does not exist.";
165  }
166 
167  dqmstorepb::ROOTFilePB dqmstore_message;
168  FileInputStream fin(filedescriptor);
169  GzipInputStream input(&fin);
170  CodedInputStream input_coded(&input);
171  input_coded.SetTotalBytesLimit(1024 * 1024 * 1024);
172  if (!dqmstore_message.ParseFromCodedStream(&input_coded)) {
173  edm::LogError("DQMProtobufReader") << "Fatal parsing file '" << filename << "'";
174  }
175 
176  ::close(filedescriptor);
177 
178  for (int i = 0; i < dqmstore_message.histo_size(); ++i) {
179  TObject* obj = nullptr;
180  dqmstorepb::ROOTFilePB::Histo const& h = dqmstore_message.histo(i);
181 
182  size_t slash = h.full_pathname().rfind('/');
183  size_t dirpos = (slash == std::string::npos ? 0 : slash);
184  size_t namepos = (slash == std::string::npos ? 0 : slash + 1);
185  std::string objname, dirname;
186  dirname.assign(h.full_pathname(), 0, dirpos);
187  objname.assign(h.full_pathname(), namepos, std::string::npos);
188  TBufferFile buf(TBufferFile::kRead, h.size(), (void*)h.streamed_histo().data(), kFALSE);
189  buf.Reset();
190  if (buf.Length() == buf.BufferSize()) {
191  obj = nullptr;
192  } else {
193  buf.InitMap();
194  void* ptr = buf.ReadObjectAny(nullptr);
195  obj = reinterpret_cast<TObject*>(ptr);
196  }
197 
198  if (!obj) {
199  edm::LogError("DQMProtobufReader") << "Error reading element:'" << h.full_pathname();
200  }
201 
202  store->setCurrentFolder(dirname);
203 
204  if (h.flags() & DQMNet::DQM_PROP_LUMI) {
205  store->setScope(MonitorElementData::Scope::LUMI);
206  } else {
207  store->setScope(MonitorElementData::Scope::RUN);
208  }
209 
210  if (obj) {
211  int kind = h.flags() & DQMNet::DQM_PROP_TYPE_MASK;
213  MonitorElement* me = store->bookInt(objname);
214  auto expression = std::string(static_cast<TObjString*>(obj)->String().View());
215  std::regex parseint{"<.*>i=(.*)</.*>"};
216  std::smatch match;
217  bool ok = std::regex_match(expression, match, parseint);
218  if (!ok) {
219  edm::LogError("DQMProtobufReader") << "Malformed object of type INT: '" << expression << "'";
220  continue;
221  }
222  int value = std::atoi(match[1].str().c_str());
223  me->Fill(value);
224  } else if (kind == DQMNet::DQM_PROP_TYPE_REAL) {
225  MonitorElement* me = store->bookFloat(objname);
226  auto expression = std::string(static_cast<TObjString*>(obj)->String().View());
227  std::regex parsefloat{"<.*>f=(.*)</.*>"};
228  std::smatch match;
229  bool ok = std::regex_match(expression, match, parsefloat);
230  if (!ok) {
231  edm::LogError("DQMProtobufReader") << "Malformed object of type REAL: '" << expression << "'";
232  continue;
233  }
234  double value = std::atof(match[1].str().c_str());
235  me->Fill(value);
236  } else if (kind == DQMNet::DQM_PROP_TYPE_STRING) {
237  auto value = static_cast<TObjString*>(obj)->String();
238  store->bookString(objname, value);
239  } else if (kind == DQMNet::DQM_PROP_TYPE_TH1F) {
240  auto value = static_cast<TH1F*>(obj);
241  store->book1D(objname, value);
242  } else if (kind == DQMNet::DQM_PROP_TYPE_TH1S) {
243  auto value = static_cast<TH1S*>(obj);
244  store->book1S(objname, value);
245  } else if (kind == DQMNet::DQM_PROP_TYPE_TH1D) {
246  auto value = static_cast<TH1D*>(obj);
247  store->book1DD(objname, value);
248  } else if (kind == DQMNet::DQM_PROP_TYPE_TH2F) {
249  auto value = static_cast<TH2F*>(obj);
250  store->book2D(objname, value);
251  } else if (kind == DQMNet::DQM_PROP_TYPE_TH2S) {
252  auto value = static_cast<TH2S*>(obj);
253  store->book2S(objname, value);
254  } else if (kind == DQMNet::DQM_PROP_TYPE_TH2D) {
255  auto value = static_cast<TH2D*>(obj);
256  store->book2DD(objname, value);
257  } else if (kind == DQMNet::DQM_PROP_TYPE_TH3F) {
258  auto value = static_cast<TH3F*>(obj);
259  store->book3D(objname, value);
260  } else if (kind == DQMNet::DQM_PROP_TYPE_TPROF) {
261  auto value = static_cast<TProfile*>(obj);
262  store->bookProfile(objname, value);
263  } else if (kind == DQMNet::DQM_PROP_TYPE_TPROF2D) {
264  auto value = static_cast<TProfile2D*>(obj);
265  store->bookProfile2D(objname, value);
266  } else {
267  edm::LogError("DQMProtobufReader") << "Unknown type: " << kind;
268  }
269  delete obj;
270  }
271  }
272 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book1DD(), dqm::implementation::IBooker::book1S(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::book2DD(), dqm::implementation::IBooker::book2S(), dqm::implementation::IBooker::book3D(), dqm::implementation::IBooker::bookFloat(), dqm::implementation::IBooker::bookInt(), dqm::implementation::IBooker::bookProfile(), dqm::implementation::IBooker::bookProfile2D(), dqm::implementation::IBooker::bookString(), visDQMUpload::buf, BTVHLTOfflineSource_cfi::dirname, DQMNet::DQM_PROP_LUMI, DQMNet::DQM_PROP_TYPE_INT, DQMNet::DQM_PROP_TYPE_MASK, DQMNet::DQM_PROP_TYPE_REAL, DQMNet::DQM_PROP_TYPE_STRING, DQMNet::DQM_PROP_TYPE_TH1D, DQMNet::DQM_PROP_TYPE_TH1F, DQMNet::DQM_PROP_TYPE_TH1S, DQMNet::DQM_PROP_TYPE_TH2D, DQMNet::DQM_PROP_TYPE_TH2F, DQMNet::DQM_PROP_TYPE_TH2S, DQMNet::DQM_PROP_TYPE_TH3F, DQMNet::DQM_PROP_TYPE_TPROF, DQMNet::DQM_PROP_TYPE_TPROF2D, corrVsCorr::filename, groupFilesInBlocks::fin, mps_fire::i, input, CalibrationSummaryClient_cfi::kind, match(), hlt_dqm_clientPB-live_cfg::me, getGTfromDQMFile::obj, convertSQLiteXML::ok, dqm::implementation::DQMStore::setCurrentFolder(), dqm::implementation::IBooker::setScope(), pickleFileParser::slash, str, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by beginLuminosityBlock(), and getNextItemType().

◆ logFileAction()

void dqmservices::DQMProtobufReader::logFileAction ( char const *  msg,
char const *  fileName 
) const
private

◆ prepareNextFile()

bool dqmservices::DQMProtobufReader::prepareNextFile ( )
private

◆ readEvent_()

void DQMProtobufReader::readEvent_ ( edm::EventPrincipal )
overrideprivatevirtual

Implements edm::InputSource.

Definition at line 274 of file DQMProtobufReader.cc.

274 {};

◆ readLuminosityBlock_()

void DQMProtobufReader::readLuminosityBlock_ ( edm::LuminosityBlockPrincipal lbCache)
overrideprivatevirtual

◆ readLuminosityBlockAuxiliary_()

std::shared_ptr< edm::LuminosityBlockAuxiliary > DQMProtobufReader::readLuminosityBlockAuxiliary_ ( )
overrideprivatevirtual

Implements edm::InputSource.

Definition at line 96 of file DQMProtobufReader.cc.

96  {
97  // fiterator_.logFileAction("readLuminosityBlockAuxiliary_");
98 
102 
103  return std::shared_ptr<edm::LuminosityBlockAuxiliary>(aux);
104 }

References printConversionInfo::aux, currentLumi_, dqmservices::DQMFileIterator::LumiEntry::file_ls, fiterator_, dqmservices::DQMFileIterator::open(), and dqmservices::DQMFileIterator::runNumber().

◆ readRun_()

void DQMProtobufReader::readRun_ ( edm::RunPrincipal rpCache)
overrideprivatevirtual

Reimplemented from edm::InputSource.

Definition at line 85 of file DQMProtobufReader.cc.

85  {
86  // fiterator_.logFileAction("readRun_");
88 
90  std::vector<MonitorElement*> allMEs = store->getAllContents("");
91  for (auto const& ME : allMEs) {
92  ME->Reset();
93  }
94 }

References edm::RunPrincipal::fillRunPrincipal(), dqm::implementation::IGetter::getAllContents(), and edm::InputSource::processHistoryRegistryForUpdate().

◆ readRunAuxiliary_()

std::shared_ptr< edm::RunAuxiliary > DQMProtobufReader::readRunAuxiliary_ ( )
overrideprivatevirtual

Implements edm::InputSource.

Definition at line 78 of file DQMProtobufReader.cc.

78  {
79  // fiterator_.logFileAction("readRunAuxiliary_");
80 
82  return std::shared_ptr<edm::RunAuxiliary>(aux);
83 }

References printConversionInfo::aux, fiterator_, and dqmservices::DQMFileIterator::runNumber().

Member Data Documentation

◆ currentLumi_

DQMFileIterator::LumiEntry dqmservices::DQMProtobufReader::currentLumi_
private

Definition at line 50 of file DQMProtobufReader.h.

Referenced by beginLuminosityBlock(), and readLuminosityBlockAuxiliary_().

◆ fiterator_

DQMFileIterator dqmservices::DQMProtobufReader::fiterator_
private

◆ flagDeleteDatFiles_

bool dqmservices::DQMProtobufReader::flagDeleteDatFiles_
private

Definition at line 45 of file DQMProtobufReader.h.

Referenced by DQMProtobufReader().

◆ flagEndOfRunKills_

bool dqmservices::DQMProtobufReader::flagEndOfRunKills_
private

Definition at line 44 of file DQMProtobufReader.h.

Referenced by DQMProtobufReader(), and getNextItemType().

◆ flagLoadFiles_

bool dqmservices::DQMProtobufReader::flagLoadFiles_
private

Definition at line 46 of file DQMProtobufReader.h.

Referenced by beginLuminosityBlock(), and DQMProtobufReader().

◆ flagSkipFirstLumis_

bool dqmservices::DQMProtobufReader::flagSkipFirstLumis_
private

Definition at line 43 of file DQMProtobufReader.h.

Referenced by DQMProtobufReader().

◆ nextItemType

InputSource::ItemType dqmservices::DQMProtobufReader::nextItemType
private

Definition at line 52 of file DQMProtobufReader.h.

◆ streamReader_

std::unique_ptr<double> dqmservices::DQMProtobufReader::streamReader_
private

Definition at line 48 of file DQMProtobufReader.h.

dqmservices::DQMFileIterator::runNumber
unsigned int runNumber()
Definition: DQMFileIterator.cc:137
mps_fire.i
i
Definition: mps_fire.py:428
dqmservices::DQMFileIterator::logFileAction
void logFileAction(const std::string &msg, const std::string &fileName="") const
Definition: DQMFileIterator.cc:375
input
static const std::string input
Definition: EdmProvDump.cc:48
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
dqm::implementation::IBooker::book2S
MonitorElement * book2S(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:219
DQMNet::DQM_PROP_TYPE_TH2S
static const uint32_t DQM_PROP_TYPE_TH2S
Definition: DQMNet.h:38
dqm::implementation::IBooker::setScope
virtual MonitorElementData::Scope setScope(MonitorElementData::Scope newscope)
Definition: DQMStore.cc:46
hcaldqm::flag::State
State
Definition: Flag.h:13
sistrip::View
View
Definition: ConstantsForView.h:26
edm::JobReport::reportInputLumiSection
void reportInputLumiSection(unsigned int run, unsigned int lumiSectId)
Definition: JobReport.cc:465
dqm::implementation::IBooker::bookProfile2D
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
DQMNet::DQM_PROP_TYPE_TH2F
static const uint32_t DQM_PROP_TYPE_TH2F
Definition: DQMNet.h:37
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqmservices::DQMFileIterator::open
LumiEntry open()
Definition: DQMFileIterator.cc:123
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
dqmservices::DQMFileIterator::delay
void delay()
Definition: DQMFileIterator.cc:390
dqmservices::DQMFileIterator::LumiEntry
Definition: DQMFileIterator.h:20
dqm::implementation::IGetter::getAllContents
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
Definition: DQMStore.cc:609
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
edm::InputSource::processHistoryRegistryForUpdate
ProcessHistoryRegistry & processHistoryRegistryForUpdate()
Definition: InputSource.h:330
DQMNet::DQM_PROP_TYPE_TH1D
static const uint32_t DQM_PROP_TYPE_TH1D
Definition: DQMNet.h:36
dqmservices::DQMFileIterator::fillDescription
static void fillDescription(edm::ParameterSetDescription &d)
Definition: DQMFileIterator.cc:397
dqmservices::DQMProtobufReader::flagSkipFirstLumis_
bool flagSkipFirstLumis_
Definition: DQMProtobufReader.h:43
edm::LuminosityBlockPrincipal::aux
LuminosityBlockAuxiliary const & aux() const
Definition: LuminosityBlockPrincipal.h:64
BTVHLTOfflineSource_cfi.dirname
dirname
Definition: BTVHLTOfflineSource_cfi.py:7
edm::LuminosityBlockAuxiliary
Definition: LuminosityBlockAuxiliary.h:15
dqmservices::DQMFileIterator::LumiEntry::get_json_path
std::string get_json_path() const
Definition: DQMFileIterator.cc:53
edm::PuttableSourceBase::PuttableSourceBase
PuttableSourceBase(ParameterSet const &, InputSourceDescription const &)
Definition: PuttableSourceBase.cc:38
h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
groupFilesInBlocks.fin
fin
Definition: groupFilesInBlocks.py:94
DQMNet::DQM_PROP_TYPE_TH3F
static const uint32_t DQM_PROP_TYPE_TH3F
Definition: DQMNet.h:40
str
#define str(s)
Definition: TestProcessor.cc:52
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
DQMNet::DQM_PROP_TYPE_MASK
static const uint32_t DQM_PROP_TYPE_MASK
Definition: DQMNet.h:28
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
dqm::implementation::IBooker::book1S
MonitorElement * book1S(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:133
DQMNet::DQM_PROP_TYPE_TH1F
static const uint32_t DQM_PROP_TYPE_TH1F
Definition: DQMNet.h:34
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
DQMNet::DQM_PROP_TYPE_REAL
static const uint32_t DQM_PROP_TYPE_REAL
Definition: DQMNet.h:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dqm::implementation::IBooker::book1DD
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:155
dqmstorepb::ROOTFilePB
edm::LuminosityBlockAuxiliary::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: LuminosityBlockAuxiliary.h:32
edm::InputSource::processHistoryRegistry
ProcessHistoryRegistry const & processHistoryRegistry() const
Accessors for process history registry.
Definition: InputSource.h:158
dqmservices::DQMFileIterator::LumiEntry::get_data_path
std::string get_data_path() const
Definition: DQMFileIterator.cc:44
dqm::implementation::IBooker::book2DD
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:261
dqmservices::DQMFileIterator::state
State state()
Definition: DQMFileIterator.cc:121
dqm::implementation::IBooker::bookString
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
edm::LuminosityBlockPrincipal::fillLuminosityBlockPrincipal
void fillLuminosityBlockPrincipal(ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
Definition: LuminosityBlockPrincipal.cc:16
edm::shutdown_flag
volatile std::atomic< bool > shutdown_flag
Definition: UnixSignalHandlers.cc:22
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
dqm::implementation::IBooker::bookInt
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
edm::Service
Definition: Service.h:30
edm::LuminosityBlockID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockID.h:42
value
Definition: value.py:1
dqmservices::DQMFileIterator::lumiReady
bool lumiReady()
Definition: DQMFileIterator.cc:129
dqmservices::DQMProtobufReader::fiterator_
DQMFileIterator fiterator_
Definition: DQMProtobufReader.h:49
DQMNet::DQM_PROP_TYPE_STRING
static const uint32_t DQM_PROP_TYPE_STRING
Definition: DQMNet.h:33
dqmservices::DQMFileIterator::LumiEntry::file_ls
unsigned int file_ls
Definition: DQMFileIterator.h:24
DQMNet::DQM_PROP_TYPE_INT
static const uint32_t DQM_PROP_TYPE_INT
Definition: DQMNet.h:31
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
dqmservices::DQMProtobufReader::flagLoadFiles_
bool flagLoadFiles_
Definition: DQMProtobufReader.h:46
DQMNet::DQM_PROP_TYPE_TH1S
static const uint32_t DQM_PROP_TYPE_TH1S
Definition: DQMNet.h:35
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
edm::LuminosityBlock::put
void put(std::unique_ptr< PROD > product)
Put a new product.
Definition: LuminosityBlock.h:116
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
edm::RunPrincipal::fillRunPrincipal
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
Definition: RunPrincipal.cc:28
DQMNet::DQM_PROP_TYPE_TPROF
static const uint32_t DQM_PROP_TYPE_TPROF
Definition: DQMNet.h:43
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
pickleFileParser.slash
slash
Definition: pickleFileParser.py:12
dqmservices::DQMProtobufReader::flagEndOfRunKills_
bool flagEndOfRunKills_
Definition: DQMProtobufReader.h:44
edm::LuminosityBlockPrincipal::id
LuminosityBlockID id() const
Definition: LuminosityBlockPrincipal.h:53
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
dqm::implementation::IBooker::book3D
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, FUNC onbooking=NOOP())
Definition: DQMStore.h:290
ME
Definition: ME.h:11
dqmservices::DQMProtobufReader::load
void load(DQMStore *store, std::string filename)
Definition: DQMProtobufReader.cc:154
edm::LuminosityBlockID::run
RunNumber_t run() const
Definition: LuminosityBlockID.h:41
dqmservices::DQMFileIterator::update_state
void update_state()
Definition: DQMFileIterator.cc:316
DQMNet::DQM_PROP_TYPE_TH2D
static const uint32_t DQM_PROP_TYPE_TH2D
Definition: DQMNet.h:39
DQMNet::DQM_PROP_LUMI
static const uint32_t DQM_PROP_LUMI
Definition: DQMNet.h:61
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
dqmservices::DQMFileIterator::logLumiState
void logLumiState(const LumiEntry &lumi, const std::string &msg)
Definition: DQMFileIterator.cc:380
edm::IDGeneratorSourceBase< PuttableSourceBase >::fillDescription
static void fillDescription(ParameterSetDescription &desc)
Definition: IDGeneratorSourceBase.cc:263
dqmservices::DQMFileIterator::State
State
Definition: DQMFileIterator.h:50
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqmservices::DQMProtobufReader::flagDeleteDatFiles_
bool flagDeleteDatFiles_
Definition: DQMProtobufReader.h:45
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::RunAuxiliary
Definition: RunAuxiliary.h:15
DQMNet::DQM_PROP_TYPE_TPROF2D
static const uint32_t DQM_PROP_TYPE_TPROF2D
Definition: DQMNet.h:44
edm::Timestamp
Definition: Timestamp.h:30
dqmservices::DQMProtobufReader::currentLumi_
DQMFileIterator::LumiEntry currentLumi_
Definition: DQMProtobufReader.h:50