Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:14

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