cms-sw/cmssw — pull request #4876 by diguida (2014-08-05 08:28:02+00:00)
Title: Fix file creations and permissions for DQM histograms encoded with ProtocolBuffer

Several fixes to the way files containing DQM `MonitorElement` encoded with `ProtocolBuffer` are created and managed:
* in `DQMFileSaver`, protect a function member call for `FastMonitoringService` pointer by testing whether or not is is a `nullptr`; as a consequence, `ProtocolBuffer` encoded files are saved for non-empty lumisections only in real `FilterUnit` mode;
* in `DQMFileSaver`, when faking `FilterUnit` mode, set explicitly `umask` to 0: this is done in order to reproduce what DAQ2 services do;
* in `DQMFileSaver`, save files containing DQM `MonitorElement` encoded with `ProtocolBuffer` by explicitly setting permissions to 0666: in principle, this should be handled by the environment or the OS, but `ProtocolBuffer` examples seem to require explicit file permission handling (see discussion in the code);
* in `fastHadd`, save files merged and encoded with `ProtocolBuffer` by explicitly setting permissions to 0666: see comment above.