Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DQMSERVICES_COMPONENTS_DQMFILESAVERPB_H
0002 #define DQMSERVICES_COMPONENTS_DQMFILESAVERPB_H
0003 
0004 #include "FWCore/Framework/interface/global/EDAnalyzer.h"
0005 #include "DQMServices/Core/interface/DQMStore.h"
0006 
0007 #include <sys/time.h>
0008 #include <string>
0009 #include <mutex>
0010 
0011 #include "DQMFileSaverBase.h"
0012 
0013 namespace dqm {
0014 
0015   class DQMFileSaverPB : public DQMFileSaverBase {
0016   public:
0017     DQMFileSaverPB(const edm::ParameterSet& ps);
0018     ~DQMFileSaverPB() override;
0019 
0020     // used by the JsonWritingTimedPoolOutputModule,
0021     // fms will be nullptr in such case
0022     static boost::property_tree::ptree fillJson(int run,
0023                                                 int lumi,
0024                                                 const std::string& dataFilePathName,
0025                                                 const std::string& transferDestinationStr,
0026                                                 const std::string& mergeTypeStr,
0027                                                 evf::FastMonitoringService* fms);
0028 
0029   protected:
0030     void initRun() const override;
0031     void saveLumi(const FileParameters& fp) const override;
0032     void saveRun(const FileParameters& fp) const override;
0033     void savePB(DQMStore* store, std::string const& filename, int run, int lumi) const;
0034 
0035     bool fakeFilterUnitMode_;
0036     std::string streamLabel_;
0037     std::string tag_;
0038     mutable std::string transferDestination_;
0039     mutable std::string mergeType_;
0040 
0041   public:
0042     static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0043 
0044   private:
0045     int getMaxCompressedSize(int bufferSize) const;
0046     ulong compressME(const TBufferFile& buffer, int maxOutputSize, char* compression_output) const;
0047   };
0048 
0049 }  // namespace dqm
0050 
0051 #endif  // DQMSERVICES_COMPONENTS_DQMFILESAVERPB_H