Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:54

0001 #include "FWCore/Framework/interface/Frameworkfwd.h"
0002 #include "FWCore/Framework/interface/InputSourceMacros.h"
0003 #include "FWCore/Framework/interface/RunPrincipal.h"
0004 #include "FWCore/Framework/interface/LuminosityBlockPrincipal.h"
0005 #include "FWCore/Framework/interface/LuminosityBlock.h"
0006 
0007 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0009 #include "FWCore/Sources/interface/ProducerSourceBase.h"
0010 #include "FWCore/Sources/interface/PuttableSourceBase.h"
0011 
0012 #include "DQMServices/Core/interface/DQMStore.h"
0013 
0014 #include "DQMFileIterator.h"
0015 #include "DQMMonitoringService.h"
0016 
0017 namespace dqmservices {
0018 
0019   class DQMProtobufReader : public edm::PuttableSourceBase {
0020   public:
0021     typedef dqm::legacy::MonitorElement MonitorElement;
0022     typedef dqm::legacy::DQMStore DQMStore;
0023 
0024     explicit DQMProtobufReader(edm::ParameterSet const&, edm::InputSourceDescription const&);
0025     ~DQMProtobufReader() override;
0026     static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0027 
0028   private:
0029     void load(DQMStore* store, std::string filename);
0030     edm::InputSource::ItemType getNextItemType() override;
0031     std::shared_ptr<edm::RunAuxiliary> readRunAuxiliary_() override;
0032     std::shared_ptr<edm::LuminosityBlockAuxiliary> readLuminosityBlockAuxiliary_() override;
0033     void readRun_(edm::RunPrincipal& rpCache) override;
0034     void readLuminosityBlock_(edm::LuminosityBlockPrincipal& lbCache) override;
0035     void readEvent_(edm::EventPrincipal&) override;
0036 
0037     // actual reading will happen here
0038     void beginLuminosityBlock(edm::LuminosityBlock& lb) override;
0039 
0040     void logFileAction(char const* msg, char const* fileName) const;
0041     bool prepareNextFile();
0042 
0043     bool flagSkipFirstLumis_;
0044     bool flagEndOfRunKills_;
0045     bool flagDeleteDatFiles_;
0046     bool flagLoadFiles_;
0047 
0048     std::unique_ptr<double> streamReader_;
0049     DQMFileIterator fiterator_;
0050     DQMFileIterator::LumiEntry currentLumi_;
0051 
0052     InputSource::ItemType nextItemType;
0053   };
0054 
0055 }  // namespace dqmservices