CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
DQMFileSaver Class Reference

#include <DQMFileSaver.h>

Inheritance diagram for DQMFileSaver:
edm::global::EDAnalyzer< edm::RunCache< saverDetails::NoCache >, edm::LuminosityBlockCache< saverDetails::NoCache > > edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Types

enum  Convention { Online, Offline, FilterUnit }
 
enum  FileFormat { ROOT, PB }
 
- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 DQMFileSaver (const edm::ParameterSet &ps)
 
- Public Member Functions inherited from edm::global::EDAnalyzer< edm::RunCache< saverDetails::NoCache >, edm::LuminosityBlockCache< saverDetails::NoCache > >
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static boost::property_tree::ptree fillJson (int run, int lumi, const std::string &dataFilePathName, const std::string &transferDestinationStr, const std::string &mergeTypeStr, evf::FastMonitoringService *fms)
 
- Static Public Member Functions inherited from edm::global::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void analyze (edm::StreamID, const edm::Event &e, const edm::EventSetup &) const override
 
void beginJob () override
 
void endJob () override
 
std::shared_ptr< saverDetails::NoCacheglobalBeginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) const override
 
std::shared_ptr< saverDetails::NoCacheglobalBeginRun (const edm::Run &, const edm::EventSetup &) const override
 
void globalEndLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) const override
 
void globalEndRun (const edm::Run &, const edm::EventSetup &) const override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

void saveForFilterUnit (const std::string &rewrite, int run, int lumi, const FileFormat fileFormat) const
 
void saveForOffline (const std::string &workflow, int run, int lumi) const
 
void saveForOfflinePB (const std::string &workflow, int run) const
 
void saveForOnline (int run, const std::string &suffix, const std::string &rewrite) const
 
void saveForOnlinePB (int run, const std::string &suffix) const
 
void saveJobReport (const std::string &filename) const
 

Private Attributes

std::string child_
 
Convention convention_
 
DQMStoredbe_
 
std::string dirName_
 
bool enableMultiThread_
 
bool fakeFilterUnitMode_
 
std::string fileBaseName_
 
FileFormat fileFormat_
 
std::atomic< int > fileUpdate_
 
std::string filterName_
 
evf::FastMonitoringServicefms_
 
int forceRunNumber_
 
std::atomic< int > irun_
 
std::string mergeType_
 
std::atomic< int > nlumi_
 
std::atomic< int > nrun_
 
std::string producer_
 
bool runIsComplete_
 
bool saveAtJobEnd_
 
int saveByLumiSection_
 
int saveByRun_
 
int saveReference_
 
int saveReferenceQMin_
 
std::string stream_label_
 
std::string transferDestination_
 
int version_
 
std::string workflow_
 

Static Private Attributes

static const std::string streamPrefix_
 
static const std::string streamSuffix_
 

Detailed Description

Definition at line 15 of file DQMFileSaver.h.

Member Enumeration Documentation

Enumerator
Online 
Offline 
FilterUnit 

Definition at line 36 of file DQMFileSaver.h.

Enumerator
ROOT 
PB 

Definition at line 43 of file DQMFileSaver.h.

44  {
45  ROOT,
46  PB
47  };

Constructor & Destructor Documentation

DQMFileSaver::DQMFileSaver ( const edm::ParameterSet ps)

Definition at line 363 of file DQMFileSaver.cc.

References globaldigis_analyze_cff::convention, convention_, KineDebug3::count(), dirName_, Exception, fakeFilterUnitMode_, fileBaseName_, fileFormat_, filterName_, FilterUnit, fms_, forceRunNumber_, getAnInt(), edm::ParameterSet::getUntrackedParameter(), Offline, Online, PB, producer_, ROOT, runIsComplete_, alignCSCRings::s, saveAtJobEnd_, saveByLumiSection_, saveByRun_, saveReference_, saveReferenceQMin_, DQMStore::SaveWithoutReference, DQMStore::SaveWithReference, DQMStore::SaveWithReferenceForQTest, trackingPlots::stat, stream_label_, streamPrefix_, streamSuffix_, AlCaHLTBitMon_QueryRunRegistry::string, jets_cff::version, version_, and workflow_.

364  : convention_ (Offline),
365  fileFormat_(ROOT),
366  workflow_ (""),
367  producer_ ("DQM"),
368  stream_label_ (""),
369  dirName_ ("."),
370  child_ (""),
371  filterName_(""),
372  version_ (1),
373  runIsComplete_ (false),
374  enableMultiThread_ (false),
375  saveByLumiSection_ (-1),
376  saveByRun_ (-1),
377  saveAtJobEnd_ (false),
380  forceRunNumber_ (-1),
381  fileBaseName_ (""),
382  fileUpdate_ (0),
384  nrun_ (0),
385  nlumi_ (0),
386  irun_ (0),
387  fms_(nullptr)
388 {
389  // Determine the file saving convention, and adjust defaults accordingly.
390  std::string convention = ps.getUntrackedParameter<std::string>("convention", "Offline");
391  fakeFilterUnitMode_ = ps.getUntrackedParameter<bool>("fakeFilterUnitMode", false);
392 
393  if (convention == "Offline")
395  else if (convention == "Online")
397  else if (convention == "FilterUnit")
399  else
400  throw cms::Exception("DQMFileSaver")
401  << "Invalid 'convention' parameter '" << convention << "'."
402  << " Expected one of 'Online' or 'Offline' or 'FilterUnit'.";
403 
404  // If this is neither online nor FU convention, check workflow.
405  // In this way, FU is treated as online, so we cannot specify a workflow. TBC
407  {
409  if (workflow_.empty()
410  || workflow_[0] != '/'
411  || *workflow_.rbegin() == '/'
412  || std::count(workflow_.begin(), workflow_.end(), '/') != 3
413  || workflow_.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
414  "abcdefghijklmnopqrstuvwxyz"
415  "0123456789"
416  "-_/") != std::string::npos)
417  throw cms::Exception("DQMFileSaver")
418  << "Invalid 'workflow' parameter '" << workflow_
419  << "'. Expected '/A/B/C'.";
420  }
421  else if (! ps.getUntrackedParameter<std::string>("workflow", "").empty())
422  throw cms::Exception("DQMFileSaver")
423  << "The 'workflow' parameter must be empty in 'Online' and 'FilterUnit' conventions.";
424  else // for online set parameters
425  {
426  workflow_="/Global/Online/P5";
427  }
428 
429  // Determine the file format, and adjust defaults accordingly.
430  std::string fileFormat = ps.getUntrackedParameter<std::string>("fileFormat", "ROOT");
431  if (fileFormat == "ROOT")
432  fileFormat_ = ROOT;
433  else if (fileFormat == "PB")
434  fileFormat_ = PB;
435  else
436  throw cms::Exception("DQMFileSaver")
437  << "Invalid 'fileFormat' parameter '" << fileFormat << "'."
438  << " Expected one of 'ROOT' or 'PB'.";
439 
440  // Allow file producer to be set to specific values in certain conditions.
442  // Setting the same constraints on file producer both for online and FilterUnit conventions
443  // TODO(diguida): limit the producer for FilterUnit to be 'DQM' or 'HLTDQM'?
444  // TODO(diguida): how to handle histograms produced in the playback for the FU case?
446  && producer_ != "DQM"
447  && producer_ != "HLTDQM"
448  && producer_ != "Playback")
449  {
450  throw cms::Exception("DQMFileSaver")
451  << "Invalid 'producer' parameter '" << producer_
452  << "'. Expected 'DQM', 'HLTDQM' or 'Playback'.";
453  }
454  else if (convention_ != Online
455  && convention != FilterUnit
456  && producer_ != "DQM")
457  {
458  throw cms::Exception("DQMFileSaver")
459  << "Invalid 'producer' parameter '" << producer_
460  << "'. Expected 'DQM'.";
461  }
462 
464 
465  // version number to be used in filename
466  version_ = ps.getUntrackedParameter<int>("version", version_);
467  // flag to signal that file contains data from complete run
468  runIsComplete_ = ps.getUntrackedParameter<bool>("runIsComplete", runIsComplete_);
469 
470  // Check how we should save the references.
471  std::string refsave = ps.getUntrackedParameter<std::string>("referenceHandling", "default");
472  if (refsave == "default")
473  ;
474  else if (refsave == "skip")
475  {
477  // std::cout << "skip saving all references" << std::endl;
478  }
479  else if (refsave == "all")
480  {
482  // std::cout << "saving all references" << std::endl;
483  }
484  else if (refsave == "qtests")
485  {
487  // std::cout << "saving qtest references" << std::endl;
488  }
489  else
490  throw cms::Exception("DQMFileSaver")
491  << "Invalid 'referenceHandling' parameter '" << refsave
492  << "'. Expected 'default', 'skip', 'all' or 'qtests'.";
493 
494  // Check minimum required quality test result for which reference is saved.
495  saveReferenceQMin_ = ps.getUntrackedParameter<int>("referenceRequireStatus", saveReferenceQMin_);
496 
497  // Get and check the output directory.
498  struct stat s;
500  if (dirName_.empty() || stat(dirName_.c_str(), &s) == -1)
501  throw cms::Exception("DQMFileSaver")
502  << "Invalid 'dirName' parameter '" << dirName_ << "'.";
503 
505  // Find out when and how to save files. The following contraints apply:
506  // - For online, filter unit, and offline, allow files to be saved per lumi
507  // - For online, allow files to be saved per run, at event and time intervals.
508  // - For offline allow files to be saved per run, at job end, and run number to be overridden (for mc data).
510  {
511  getAnInt(ps, saveByLumiSection_, "saveByLumiSection");
512  }
513 
514  if (convention_ == Online)
515  {
516  getAnInt(ps, saveByRun_, "saveByRun");
517  }
518 
519  if (convention_ == Offline)
520  {
521  getAnInt(ps, saveByRun_, "saveByRun");
522  getAnInt(ps, forceRunNumber_, "forceRunNumber");
523  saveAtJobEnd_ = ps.getUntrackedParameter<bool>("saveAtJobEnd", saveAtJobEnd_);
524  }
525 
526  // Set up base file name:
527  // - for online and offline, follow the convention <dirName>/<producer>_V<4digits>_
528  // - for FilterUnit, we need to follow the DAQ2 convention, so we need the run and lumisection:
529  // the path is provided by the DAQ director service.
530  if (convention_ != FilterUnit)
531  {
532  char version[8];
533  sprintf(version, "_V%04d_", int(version_));
534  version[7]='\0';
535  fileBaseName_ = dirName_ + "/" + producer_ + version;
536  }
537  else if (fakeFilterUnitMode_)
538  {
539  edm::LogInfo("DQMFileSaver")
540  << "Fake FU mode, files are saved under <dirname>/runXXXXXX/runXXXXXX_lsXXXX_<stream_Label>.pb.\n";
541  }
542  else
543  {
544  // For FU, dirName_ will not be considered at all
545  edm::LogInfo("DQMFileSaver")
546  << "The base dir provided in the configuration '" << dirName_ << "'\n"
547  << " will not be considered: for FU, the DAQ2 services will handle directories\n";
548  //check that DAQ2 services are available: throw if not
551 
552  if (!(fms_ && daqDirector))
553  throw cms::Exception("DQMFileSaver")
554  << "Internal error, cannot initialize DAQ services.";
555  }
556 
557  // Log some information what we will do.
558  edm::LogInfo("DQMFileSaver")
559  << "DQM file saving settings:\n"
560  << " using base file name '" << fileBaseName_ << "'\n"
561  << " forcing run number " << forceRunNumber_ << "\n"
562  << " saving every " << saveByLumiSection_ << " lumi section(s)\n"
563  << " saving every " << saveByRun_ << " run(s)\n"
564  << " saving at job end: " << (saveAtJobEnd_ ? "yes" : "no") << "\n";
565 }
T getUntrackedParameter(std::string const &, T const &) const
int forceRunNumber_
Definition: DQMFileSaver.h:77
int saveReferenceQMin_
Definition: DQMFileSaver.h:76
Convention convention_
Definition: DQMFileSaver.h:59
evf::FastMonitoringService * fms_
Definition: DQMFileSaver.h:90
DQMStore * dbe_
Definition: DQMFileSaver.h:82
std::atomic< int > nlumi_
Definition: DQMFileSaver.h:84
std::string dirName_
Definition: DQMFileSaver.h:64
std::string fileBaseName_
Definition: DQMFileSaver.h:79
int saveByLumiSection_
Definition: DQMFileSaver.h:72
bool enableMultiThread_
Definition: DQMFileSaver.h:69
static void getAnInt(const edm::ParameterSet &ps, int &value, const std::string &name)
Definition: DQMFileSaver.cc:39
bool fakeFilterUnitMode_
Definition: DQMFileSaver.h:70
bool runIsComplete_
Definition: DQMFileSaver.h:68
std::string stream_label_
Definition: DQMFileSaver.h:63
static const std::string streamPrefix_
Definition: DQMFileSaver.h:92
std::string workflow_
Definition: DQMFileSaver.h:61
std::string producer_
Definition: DQMFileSaver.h:62
std::string child_
Definition: DQMFileSaver.h:65
int saveReference_
Definition: DQMFileSaver.h:75
std::string filterName_
Definition: DQMFileSaver.h:66
std::atomic< int > fileUpdate_
Definition: DQMFileSaver.h:80
FileFormat fileFormat_
Definition: DQMFileSaver.h:60
std::atomic< int > irun_
Definition: DQMFileSaver.h:87
bool saveAtJobEnd_
Definition: DQMFileSaver.h:74
std::atomic< int > nrun_
Definition: DQMFileSaver.h:83
static const int STATUS_OK
static const std::string streamSuffix_
Definition: DQMFileSaver.h:93

Member Function Documentation

void DQMFileSaver::analyze ( edm::StreamID  ,
const edm::Event e,
const edm::EventSetup  
) const
overrideprotected

Definition at line 610 of file DQMFileSaver.cc.

611 {
612  //save by event and save by time are not supported
613  //anymore in the threaded framework. please use
614  //savebyLumiSection instead.
615 }
void DQMFileSaver::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::global::EDAnalyzerBase.

Definition at line 569 of file DQMFileSaver.cc.

References convention_, dbe_, enableMultiThread_, DQMStore::enableMultiThread_, fakeFilterUnitMode_, FilterUnit, irun_, mergeType_, evf::MergeTypePB, nlumi_, nrun_, stream_label_, and transferDestination_.

570 {
571  nrun_ = nlumi_ = irun_ = 0;
572 
573  // Determine if we are running multithreading asking to the DQMStore. Not to be moved in the ctor
575 
577  {
580  }
581 }
Convention convention_
Definition: DQMFileSaver.h:59
DQMStore * dbe_
Definition: DQMFileSaver.h:82
std::atomic< int > nlumi_
Definition: DQMFileSaver.h:84
bool enableMultiThread_
Definition: DQMFileSaver.h:69
std::string transferDestination_
Definition: DQMFileSaver.h:94
bool fakeFilterUnitMode_
Definition: DQMFileSaver.h:70
std::string stream_label_
Definition: DQMFileSaver.h:63
std::atomic< int > irun_
Definition: DQMFileSaver.h:87
std::atomic< int > nrun_
Definition: DQMFileSaver.h:83
std::string mergeType_
Definition: DQMFileSaver.h:95
bool enableMultiThread_
Definition: DQMStore.h:637
void DQMFileSaver::endJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::global::EDAnalyzerBase.

Definition at line 746 of file DQMFileSaver.cc.

References convention_, Exception, forceRunNumber_, irun_, Offline, saveAtJobEnd_, saveForOffline(), and workflow_.

747 {
748  if (saveAtJobEnd_)
749  {
750  if (convention_ == Offline && forceRunNumber_ > 0)
752  else if (convention_ == Offline)
754  else
755  throw cms::Exception("DQMFileSaver")
756  << "Internal error. Can only save files at the end of the"
757  << " job in Offline mode.";
758  }
759 }
int forceRunNumber_
Definition: DQMFileSaver.h:77
void saveForOffline(const std::string &workflow, int run, int lumi) const
Definition: DQMFileSaver.cc:87
Convention convention_
Definition: DQMFileSaver.h:59
std::string workflow_
Definition: DQMFileSaver.h:61
std::atomic< int > irun_
Definition: DQMFileSaver.h:87
bool saveAtJobEnd_
Definition: DQMFileSaver.h:74
boost::property_tree::ptree DQMFileSaver::fillJson ( int  run,
int  lumi,
const std::string &  dataFilePathName,
const std::string &  transferDestinationStr,
const std::string &  mergeTypeStr,
evf::FastMonitoringService fms 
)
static

Definition at line 265 of file DQMFileSaver.cc.

References dqmfilesaver::fillJson().

Referenced by saveForFilterUnit().

266 {
267  return dqmfilesaver::fillJson(run, lumi, dataFilePathName, transferDestinationStr, mergeTypeStr, fms);
268 }
boost::property_tree::ptree fillJson(int run, int lumi, const std::string &dataFilePathName, const std::string &transferDestinationStr, const std::string &mergeTypeStr, evf::FastMonitoringService *fms)
Definition: fillJson.cc:30
std::shared_ptr< saverDetails::NoCache > DQMFileSaver::globalBeginLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup  
) const
overrideprotected

Definition at line 604 of file DQMFileSaver.cc.

References nlumi_.

605 {
606  ++nlumi_;
607  return nullptr;
608 }
std::atomic< int > nlumi_
Definition: DQMFileSaver.h:84
std::shared_ptr< saverDetails::NoCache > DQMFileSaver::globalBeginRun ( const edm::Run r,
const edm::EventSetup  
) const
overrideprotected

Definition at line 584 of file DQMFileSaver.cc.

References convention_, fakeFilterUnitMode_, FrontierConditions_GlobalTag_cff::file, FilterUnit, evf::EvFDaqDirector::getInitFilePath(), nrun_, stream_label_, and AlCaHLTBitMon_QueryRunRegistry::string.

585 {
586  ++nrun_;
587 
588  // For Filter Unit, create an empty ini file:
589  // it is needed by the HLT deamon in order to start merging
590  // The run number is established in the service
591  // TODO(diguida): check that they are the same?
593  {
595  const std::string initFileName = daqDirector->getInitFilePath(stream_label_);
596  std::ofstream file(initFileName);
597  file.close();
598  }
599 
600  return nullptr;
601 }
Convention convention_
Definition: DQMFileSaver.h:59
std::string getInitFilePath(std::string const &stream) const
bool fakeFilterUnitMode_
Definition: DQMFileSaver.h:70
std::string stream_label_
Definition: DQMFileSaver.h:63
std::atomic< int > nrun_
Definition: DQMFileSaver.h:83
void DQMFileSaver::globalEndLuminosityBlock ( const edm::LuminosityBlock iLS,
const edm::EventSetup  
) const
overrideprotected

Definition at line 618 of file DQMFileSaver.cc.

References convention_, dbe_, DQMStore::deleteUnusedLumiHistograms(), enableMultiThread_, Exception, fileFormat_, FilterUnit, fms_, edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), nlumi_, Offline, Online, PB, edm::LuminosityBlockID::run(), saveByLumiSection_, saveForFilterUnit(), saveForOffline(), saveForOnline(), saveForOnlinePB(), evf::FastMonitoringService::shouldWriteFiles(), createPayload::suffix, and workflow_.

619 {
620  int ilumi = iLS.id().luminosityBlock();
621  int irun = iLS.id().run();
622  if (ilumi > 0 && saveByLumiSection_ > 0 )
623  {
625  throw cms::Exception("DQMFileSaver")
626  << "Internal error, can save files at end of lumi block"
627  << " only in Online, FilterUnit or Offline mode.";
628 
629  if (convention_ == Online && (nlumi_ % saveByLumiSection_) == 0) // insist on lumi section ordering
630  {
631  char suffix[64];
632  char rewrite[128];
633  sprintf(suffix, "_R%09d_L%06d", irun, ilumi);
634  sprintf(rewrite, "\\1Run %d/\\2/By Lumi Section %d-%d", irun, ilumi-nlumi_, ilumi);
635  if (fileFormat_ == ROOT)
636  saveForOnline(irun, suffix, rewrite);
637  else if (fileFormat_ == PB)
638  saveForOnlinePB(irun, suffix);
639  else
640  throw cms::Exception("DQMFileSaver")
641  << "Internal error, can save files"
642  << " only in ROOT or ProtocolBuffer format.";
643  }
644 
645  // Store at every lumi section end only if some events have been processed.
646  // Caveat: if faking FilterUnit, i.e. not accessing DAQ2 services,
647  // we cannot ask FastMonitoringService the processed events, so we are forced
648  // to save the file at every lumisection, even with no statistics.
649  // Here, we protect the call to get the processed events in a lumi section
650  // by testing the pointer to FastMonitoringService: if not null, i.e. in real FU mode,
651  // we check that the events are not 0; otherwise, we skip the test, so we store at every lumi transition.
652  // TODO(diguida): allow fake FU mode to skip file creation at empty lumi sections.
653  if (convention_ == FilterUnit && (fms_ ? fms_->shouldWriteFiles(ilumi) : !fms_))
654  {
655  char rewrite[128];
656  sprintf(rewrite, "\\1Run %d/\\2/By Lumi Section %d-%d", irun, ilumi, ilumi);
657  saveForFilterUnit(rewrite, irun, ilumi, fileFormat_);
658  }
659  if (convention_ == Offline)
660  {
661  if (fileFormat_ == ROOT)
662  saveForOffline(workflow_, irun, ilumi);
663  else
664  // TODO(diguida): do we need to support lumisection saving in Offline for PB?
665  // In this case, for ROOT, we only save EventInfo folders: we can filter them...
666  throw cms::Exception("DQMFileSaver")
667  << "Internal error, can save files"
668  << " only in ROOT format.";
669  }
670 
671  // after saving per LS, delete the old LS global histograms.
673  }
674 }
LuminosityBlockID id() const
void saveForOffline(const std::string &workflow, int run, int lumi) const
Definition: DQMFileSaver.cc:87
Convention convention_
Definition: DQMFileSaver.h:59
evf::FastMonitoringService * fms_
Definition: DQMFileSaver.h:90
bool shouldWriteFiles(unsigned int lumi, unsigned int *proc=0)
DQMStore * dbe_
Definition: DQMFileSaver.h:82
std::atomic< int > nlumi_
Definition: DQMFileSaver.h:84
int saveByLumiSection_
Definition: DQMFileSaver.h:72
bool enableMultiThread_
Definition: DQMFileSaver.h:69
void deleteUnusedLumiHistograms(uint32_t run, uint32_t lumi)
Definition: DQMStore.cc:2005
RunNumber_t run() const
void saveForOnline(int run, const std::string &suffix, const std::string &rewrite) const
std::string workflow_
Definition: DQMFileSaver.h:61
void saveForOnlinePB(int run, const std::string &suffix) const
FileFormat fileFormat_
Definition: DQMFileSaver.h:60
LuminosityBlockNumber_t luminosityBlock() const
void saveForFilterUnit(const std::string &rewrite, int run, int lumi, const FileFormat fileFormat) const
void DQMFileSaver::globalEndRun ( const edm::Run iRun,
const edm::EventSetup  
) const
overrideprotected

Definition at line 677 of file DQMFileSaver.cc.

References convention_, data, dirName_, Exception, fakeFilterUnitMode_, FrontierConditions_GlobalTag_cff::file, fileFormat_, cmsPerfStripChart::format, edm::RunBase::id(), irun_, nlumi_, nrun_, Offline, Online, PB, EnergyCorrector::pt, edm::RunID::run(), saveByRun_, saveForOffline(), saveForOfflinePB(), saveForOnline(), saveForOnlinePB(), str, AlCaHLTBitMon_QueryRunRegistry::string, createPayload::suffix, and workflow_.

678 {
679  int irun = iRun.id().run();
680  irun_ = irun;
681  if (irun > 0 && saveByRun_ > 0 && (nrun_ % saveByRun_) == 0)
682  {
683  if (convention_ == Online)
684  {
685  char suffix[64];
686  sprintf(suffix, "_R%09d", irun);
687  char rewrite[64];
688  sprintf(rewrite, "\\1Run %d/\\2/Run summary", irun);
689  if (fileFormat_ == ROOT)
690  saveForOnline(irun, suffix, rewrite);
691  else if (fileFormat_ == PB)
692  saveForOnlinePB(irun, suffix);
693  else
694  throw cms::Exception("DQMFileSaver")
695  << "Internal error, can save files"
696  << " only in ROOT or ProtocolBuffer format.";
697  }
698  else if (convention_ == Offline && fileFormat_ == ROOT)
699  saveForOffline(workflow_, irun, 0);
700  else if (convention_ == Offline && fileFormat_ == PB)
702  else
703  throw cms::Exception("DQMFileSaver")
704  << "Internal error. Can only save files in endRun()"
705  << " in Online and Offline modes.";
706  }
707 
708  // create a fake EoR file for testing purposes.
709  if (fakeFilterUnitMode_) {
710  edm::LogInfo("DQMFileSaver")
711  << "Producing fake EoR file.\n";
712 
713  std::string runDir = str(boost::format("%s/run%06d") % dirName_ % irun);
714  std::string jsonFilePathName = str(boost::format("%s/run%06d_ls0000_EoR.jsn") % runDir % irun);
715  std::string openJsonFilePathName = jsonFilePathName + ".open";
716 
717  boost::filesystem::create_directories(runDir);
718 
719  using namespace boost::property_tree;
720  ptree pt;
721  ptree data;
722 
723  ptree child1, child2, child3;
724 
725  child1.put("", -1); // Processed
726  child2.put("", -1); // Accepted
727  child3.put("", nlumi_); // number of lumi
728 
729  data.push_back(std::make_pair("", child1));
730  data.push_back(std::make_pair("", child2));
731  data.push_back(std::make_pair("", child3));
732 
733  pt.add_child("data", data);
734  pt.put("definition", "/non-existant/");
735  pt.put("source", "--hostname--");
736 
737  std::ofstream file(jsonFilePathName);
738  write_json(file, pt, true);
739  file.close();
740 
741  rename(openJsonFilePathName.c_str(), jsonFilePathName.c_str());
742  }
743 }
RunID const & id() const
Definition: RunBase.h:39
void saveForOffline(const std::string &workflow, int run, int lumi) const
Definition: DQMFileSaver.cc:87
Definition: rename.py:1
RunNumber_t run() const
Definition: RunID.h:39
Convention convention_
Definition: DQMFileSaver.h:59
std::atomic< int > nlumi_
Definition: DQMFileSaver.h:84
std::string dirName_
Definition: DQMFileSaver.h:64
void saveForOnline(int run, const std::string &suffix, const std::string &rewrite) const
bool fakeFilterUnitMode_
Definition: DQMFileSaver.h:70
format
Some error handling for the usage.
std::string workflow_
Definition: DQMFileSaver.h:61
void saveForOnlinePB(int run, const std::string &suffix) const
FileFormat fileFormat_
Definition: DQMFileSaver.h:60
std::atomic< int > irun_
Definition: DQMFileSaver.h:87
void saveForOfflinePB(const std::string &workflow, int run) const
Definition: DQMFileSaver.cc:78
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::atomic< int > nrun_
Definition: DQMFileSaver.h:83
#define str(s)
void DQMFileSaver::saveForFilterUnit ( const std::string &  rewrite,
int  run,
int  lumi,
const FileFormat  fileFormat 
) const
private

Definition at line 271 of file DQMFileSaver.cc.

References dataFileExtension(), dbe_, dirName_, enableMultiThread_, Exception, fakeFilterUnitMode_, fileUpdate_, fillJson(), filterName_, fms_, cmsPerfStripChart::format, evf::FastMonitoringService::getEventsProcessedForLumi(), mergeType_, PB, EnergyCorrector::pt, DQMStore::save(), DQMStore::savePB(), saveReference_, saveReferenceQMin_, str, stream_label_, AlCaHLTBitMon_QueryRunRegistry::string, and transferDestination_.

Referenced by globalEndLuminosityBlock().

272 {
273  // get from DAQ2 services where to store the files according to their format
274  namespace bpt = boost::property_tree;
275 
276  std::string openJsonFilePathName;
277  std::string jsonFilePathName;
278  std::string openHistoFilePathName;
279  std::string histoFilePathName;
280 
281  // create the files names
282  if (fakeFilterUnitMode_) {
283  std::string runDir = str(boost::format("%s/run%06d") % dirName_ % run);
284  std::string baseName = str(boost::format("%s/run%06d_ls%04d_%s") % runDir % run % lumi % stream_label_ );
285 
286  boost::filesystem::create_directories(runDir);
287 
288  jsonFilePathName = baseName + ".jsn";
289  openJsonFilePathName = jsonFilePathName + ".open";
290 
291  histoFilePathName = baseName + dataFileExtension(fileFormat);
292  openHistoFilePathName = histoFilePathName + ".open";
293  } else {
294  openJsonFilePathName = edm::Service<evf::EvFDaqDirector>()->getOpenOutputJsonFilePath(lumi, stream_label_);
295  jsonFilePathName = edm::Service<evf::EvFDaqDirector>()->getOutputJsonFilePath(lumi, stream_label_);
296 
297  if (fileFormat == ROOT) {
298  openHistoFilePathName = edm::Service<evf::EvFDaqDirector>()->getOpenRootHistogramFilePath(lumi, stream_label_);
299  histoFilePathName = edm::Service<evf::EvFDaqDirector>()->getRootHistogramFilePath(lumi, stream_label_);
300  } else if (fileFormat == PB) {
301  openHistoFilePathName = edm::Service<evf::EvFDaqDirector>()->getOpenProtocolBufferHistogramFilePath(lumi, stream_label_);
302  histoFilePathName = edm::Service<evf::EvFDaqDirector>()->getProtocolBufferHistogramFilePath(lumi, stream_label_);
303  }
304  }
305 
306  if (fms_ ? fms_->getEventsProcessedForLumi(lumi) : true) {
307  if (fileFormat == ROOT)
308  {
309  // Save the file with the full directory tree,
310  // modifying it according to @a rewrite,
311  // but not looking for MEs inside the DQMStore, as in the online case,
312  // nor filling new MEs, as in the offline case.
313  dbe_->save(openHistoFilePathName,
314  "",
315  "^(Reference/)?([^/]+)",
316  rewrite,
317  enableMultiThread_ ? run : 0,
318  lumi,
321  fileUpdate_ ? "UPDATE" : "RECREATE");
322  }
323  else if (fileFormat == PB)
324  {
325  // Save the file in the open directory.
326  dbe_->savePB(openHistoFilePathName,
327  filterName_,
328  enableMultiThread_ ? run : 0,
329  lumi);
330  }
331  else
332  throw cms::Exception("DQMFileSaver")
333  << "Internal error, can save files"
334  << " only in ROOT or ProtocolBuffer format.";
335 
336  // Now move the the data and json files into the output directory.
337  rename(openHistoFilePathName.c_str(), histoFilePathName.c_str());
338  }
339 
340  // Write the json file in the open directory.
341  bpt::ptree pt = fillJson(run, lumi, histoFilePathName, transferDestination_, mergeType_, fms_);
342  write_json(openJsonFilePathName, pt);
343  rename(openJsonFilePathName.c_str(), jsonFilePathName.c_str());
344 }
unsigned int getEventsProcessedForLumi(unsigned int lumi, bool *abortFlag=0)
int saveReferenceQMin_
Definition: DQMFileSaver.h:76
Definition: rename.py:1
void savePB(std::string const &filename, std::string const &path="", uint32_t run=0, uint32_t lumi=0)
Definition: DQMStore.cc:2650
static std::string dataFileExtension(DQMFileSaver::FileFormat fileFormat)
Definition: DQMFileSaver.cc:49
evf::FastMonitoringService * fms_
Definition: DQMFileSaver.h:90
DQMStore * dbe_
Definition: DQMFileSaver.h:82
std::string dirName_
Definition: DQMFileSaver.h:64
SaveReferenceTag
Definition: DQMStore.h:78
bool enableMultiThread_
Definition: DQMFileSaver.h:69
std::string transferDestination_
Definition: DQMFileSaver.h:94
bool fakeFilterUnitMode_
Definition: DQMFileSaver.h:70
format
Some error handling for the usage.
std::string stream_label_
Definition: DQMFileSaver.h:63
int saveReference_
Definition: DQMFileSaver.h:75
std::string filterName_
Definition: DQMFileSaver.h:66
std::atomic< int > fileUpdate_
Definition: DQMFileSaver.h:80
static boost::property_tree::ptree fillJson(int run, int lumi, const std::string &dataFilePathName, const std::string &transferDestinationStr, const std::string &mergeTypeStr, evf::FastMonitoringService *fms)
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
Definition: DQMStore.cc:2465
std::string mergeType_
Definition: DQMFileSaver.h:95
#define str(s)
void DQMFileSaver::saveForOffline ( const std::string &  workflow,
int  run,
int  lumi 
) const
private

Definition at line 87 of file DQMFileSaver.cc.

References DQMStore::bookFloat(), DQMStore::bookString(), DQMStore::cd(), child_, dbe_, MillePedeFileConverter_cfg::e, enableMultiThread_, fileBaseName_, corrVsCorr::filename, fileUpdate_, MonitorElement::Fill(), DQMStore::get(), edm::getReleaseVersion(), DQMStore::getSubdirs(), mps_fire::i, mps_check::msg, onlineOfflineFileName(), runIsComplete_, DQMStore::save(), saveJobReport(), saveReference_, saveReferenceQMin_, DQMStore::SaveWithoutReference, DQMStore::setCurrentFolder(), dqm::qstatus::STATUS_OK, AlCaHLTBitMon_QueryRunRegistry::string, and createPayload::suffix.

Referenced by endJob(), globalEndLuminosityBlock(), and globalEndRun().

88 {
89  char suffix[64];
90  sprintf(suffix, "R%09d", run);
91 
92  char rewrite[128];
93  if (lumi == 0) // save for run
94  sprintf(rewrite, "\\1Run %d/\\2/Run summary", run);
95  else
96  sprintf(rewrite, "\\1Run %d/\\2/By Lumi Section %d-%d", run, lumi, lumi);
97 
99 
100  if (lumi == 0) // save for run
101  {
102  // set run end flag
103  dbe_->cd();
104  dbe_->setCurrentFolder("Info/ProvInfo");
105 
106  // do this, because ProvInfo is not yet run in offline DQM
107  MonitorElement* me = dbe_->get("Info/ProvInfo/CMSSW");
108  if (!me) me = dbe_->bookString("CMSSW", edm::getReleaseVersion().c_str() );
109 
110  me = dbe_->get("Info/ProvInfo/runIsComplete");
111  if (!me) me = dbe_->bookFloat("runIsComplete");
112 
113  if (me)
114  {
115  if (runIsComplete_)
116  me->Fill(1.);
117  else
118  me->Fill(0.);
119  }
120 
121  dbe_->save(filename,
122  "",
123  "^(Reference/)?([^/]+)",
124  rewrite,
125  enableMultiThread_ ? run : 0,
126  lumi,
129  fileUpdate_ ? "UPDATE" : "RECREATE");
130 
131  // save the JobReport
132  saveJobReport(filename);
133  }
134  else // save EventInfo folders for luminosity sections
135  {
136  std::vector<std::string> systems = (dbe_->cd(), dbe_->getSubdirs());
137 
138  edm::LogAbsolute msg("fileAction");
139  msg << "DQMFileSaver: storing EventInfo folders for Run: "
140  << run << ", Lumi Section: " << lumi << ", Subsystems: " ;
141 
142  for (size_t i = 0, e = systems.size(); i != e; ++i) {
143  if (systems[i] != "Reference") {
144  dbe_->cd();
145  msg << systems[i] << " " ;
146 
147  dbe_->save(filename,
148  systems[i]+"/EventInfo", "^(Reference/)?([^/]+)",
149  rewrite,
150  enableMultiThread_ ? run : 0,
151  lumi,
154  fileUpdate_ ? "UPDATE" : "RECREATE");
155 
156  // from now on update newly created file
157  if (fileUpdate_.load() == 0) fileUpdate_ = 1;
158  }
159  }
160  }
161 
162 }
int saveReferenceQMin_
Definition: DQMFileSaver.h:76
DQMStore * dbe_
Definition: DQMFileSaver.h:82
std::string fileBaseName_
Definition: DQMFileSaver.h:79
MonitorElement * bookFloat(char_string const &name)
Book float.
Definition: DQMStore.cc:1048
SaveReferenceTag
Definition: DQMStore.h:78
void Fill(long long x)
bool enableMultiThread_
Definition: DQMFileSaver.h:69
void saveJobReport(const std::string &filename) const
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1613
static std::string onlineOfflineFileName(const std::string &fileBaseName, const std::string &suffix, const std::string &workflow, const std::string &child, DQMFileSaver::FileFormat fileFormat)
Definition: DQMFileSaver.cc:60
bool runIsComplete_
Definition: DQMFileSaver.h:68
std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:1564
MonitorElement * bookString(char_string const &name, char_string const &value)
Book string.
Definition: DQMStore.cc:1069
std::string getReleaseVersion()
std::string child_
Definition: DQMFileSaver.h:65
int saveReference_
Definition: DQMFileSaver.h:75
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:571
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:546
std::atomic< int > fileUpdate_
Definition: DQMFileSaver.h:80
tuple msg
Definition: mps_check.py:279
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
Definition: DQMStore.cc:2465
static const int STATUS_OK
void DQMFileSaver::saveForOfflinePB ( const std::string &  workflow,
int  run 
) const
private

Definition at line 78 of file DQMFileSaver.cc.

References child_, dbe_, fileBaseName_, corrVsCorr::filename, filterName_, onlineOfflineFileName(), PB, DQMStore::savePB(), AlCaHLTBitMon_QueryRunRegistry::string, and createPayload::suffix.

Referenced by globalEndRun().

79 {
80  char suffix[64];
81  sprintf(suffix, "R%09d", run);
83  dbe_->savePB(filename, filterName_);
84 }
void savePB(std::string const &filename, std::string const &path="", uint32_t run=0, uint32_t lumi=0)
Definition: DQMStore.cc:2650
DQMStore * dbe_
Definition: DQMFileSaver.h:82
std::string fileBaseName_
Definition: DQMFileSaver.h:79
static std::string onlineOfflineFileName(const std::string &fileBaseName, const std::string &suffix, const std::string &workflow, const std::string &child, DQMFileSaver::FileFormat fileFormat)
Definition: DQMFileSaver.cc:60
std::string child_
Definition: DQMFileSaver.h:65
std::string filterName_
Definition: DQMFileSaver.h:66
void DQMFileSaver::saveForOnline ( int  run,
const std::string &  suffix,
const std::string &  rewrite 
) const
private

Definition at line 212 of file DQMFileSaver.cc.

References DQMStore::cd(), child_, dbe_, doSaveForOnline(), MillePedeFileConverter_cfg::e, enableMultiThread_, fileBaseName_, DQMStore::get(), DQMStore::getMatchingContents(), DQMStore::getSubdirs(), mps_fire::i, saveReference_, and saveReferenceQMin_.

Referenced by globalEndLuminosityBlock(), and globalEndRun().

213 {
214  std::vector<std::string> systems = (dbe_->cd(), dbe_->getSubdirs());
215 
216  for (size_t i = 0, e = systems.size(); i != e; ++i)
217  {
218  if (systems[i] != "Reference")
219  {
220  dbe_->cd();
221  if (MonitorElement* me = dbe_->get(systems[i] + "/EventInfo/processName"))
222  {
224  fileBaseName_ + me->getStringValue() + suffix + child_ + ".root",
225  "", "^(Reference/)?([^/]+)", rewrite,
228  "", ROOT);
229  return;
230  }
231  }
232  }
233 
234  // look for EventInfo folder in an unorthodox location
235  for (size_t i = 0, e = systems.size(); i != e; ++i)
236  if (systems[i] != "Reference")
237  {
238  dbe_->cd();
239  std::vector<MonitorElement*> pNamesVector = dbe_->getMatchingContents("^" + systems[i] + "/.*/EventInfo/processName",lat::Regexp::Perl);
240  if (!pNamesVector.empty()){
242  fileBaseName_ + systems[i] + suffix + child_ + ".root",
243  "", "^(Reference/)?([^/]+)", rewrite,
246  "", ROOT);
247  pNamesVector.clear();
248  return;
249  }
250  }
251 
252  // if no EventInfo Folder is found, then store subsystem wise
253  for (size_t i = 0, e = systems.size(); i != e; ++i)
254  if (systems[i] != "Reference")
256  fileBaseName_ + systems[i] + suffix + child_ + ".root",
257  systems[i], "^(Reference/)?([^/]+)", rewrite,
260  "", ROOT);
261 }
int saveReferenceQMin_
Definition: DQMFileSaver.h:76
std::vector< MonitorElement * > getMatchingContents(std::string const &pattern, lat::Regexp::Syntax syntaxType=lat::Regexp::Wildcard) const
Definition: DQMStore.cc:1813
DQMStore * dbe_
Definition: DQMFileSaver.h:82
std::string fileBaseName_
Definition: DQMFileSaver.h:79
SaveReferenceTag
Definition: DQMStore.h:78
bool enableMultiThread_
Definition: DQMFileSaver.h:69
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1613
std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:1564
std::string child_
Definition: DQMFileSaver.h:65
int saveReference_
Definition: DQMFileSaver.h:75
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:546
static void doSaveForOnline(DQMStore *store, int run, bool enableMultiThread, const std::string &filename, const std::string &directory, const std::string &rxpat, const std::string &rewrite, DQMStore::SaveReferenceTag saveref, int saveRefQMin, const std::string &filterName, DQMFileSaver::FileFormat fileFormat)
void DQMFileSaver::saveForOnlinePB ( int  run,
const std::string &  suffix 
) const
private

Definition at line 195 of file DQMFileSaver.cc.

References child_, dbe_, doSaveForOnline(), enableMultiThread_, fileBaseName_, corrVsCorr::filename, filterName_, onlineOfflineFileName(), PB, saveReference_, saveReferenceQMin_, AlCaHLTBitMon_QueryRunRegistry::string, and workflow_.

Referenced by globalEndLuminosityBlock(), and globalEndRun().

196 {
197  // The file name contains the Online workflow name,
198  // as we do not want to look inside the DQMStore,
199  // and the @a suffix, defined in the run/lumi transitions.
200  // TODO(diguida): add the possibility to change the dir structure with rewrite.
203  filename,
204  "", "^(Reference/)?([^/]+)", "\\1\\2",
207  filterName_,
208  PB);
209 }
int saveReferenceQMin_
Definition: DQMFileSaver.h:76
DQMStore * dbe_
Definition: DQMFileSaver.h:82
std::string fileBaseName_
Definition: DQMFileSaver.h:79
SaveReferenceTag
Definition: DQMStore.h:78
bool enableMultiThread_
Definition: DQMFileSaver.h:69
static std::string onlineOfflineFileName(const std::string &fileBaseName, const std::string &suffix, const std::string &workflow, const std::string &child, DQMFileSaver::FileFormat fileFormat)
Definition: DQMFileSaver.cc:60
std::string workflow_
Definition: DQMFileSaver.h:61
std::string child_
Definition: DQMFileSaver.h:65
int saveReference_
Definition: DQMFileSaver.h:75
std::string filterName_
Definition: DQMFileSaver.h:66
static void doSaveForOnline(DQMStore *store, int run, bool enableMultiThread, const std::string &filename, const std::string &directory, const std::string &rxpat, const std::string &rewrite, DQMStore::SaveReferenceTag saveref, int saveRefQMin, const std::string &filterName, DQMFileSaver::FileFormat fileFormat)
void DQMFileSaver::saveJobReport ( const std::string &  filename) const
private

Definition at line 347 of file DQMFileSaver.cc.

References info(), edm::Service< T >::isAvailable(), and edm::JobReport::reportAnalysisFile().

Referenced by saveForOffline().

348 {
349 
350  // Report the file to job report service.
352  if (jr.isAvailable())
353  {
354  std::map<std::string, std::string> info;
355  info["Source"] = "DQMStore";
356  info["FileClass"] = "DQM";
357  jr->reportAnalysisFile(filename, info);
358  }
359 
360 }
static const TGPicture * info(bool iBackgroundIsBlack)
bool isAvailable() const
Definition: Service.h:40
void reportAnalysisFile(std::string const &fileName, std::map< std::string, std::string > const &fileData)
Definition: JobReport.cc:473

Member Data Documentation

std::string DQMFileSaver::child_
private

Definition at line 65 of file DQMFileSaver.h.

Referenced by saveForOffline(), saveForOfflinePB(), saveForOnline(), and saveForOnlinePB().

Convention DQMFileSaver::convention_
private
DQMStore* DQMFileSaver::dbe_
private
std::string DQMFileSaver::dirName_
private

Definition at line 64 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), globalEndRun(), and saveForFilterUnit().

bool DQMFileSaver::enableMultiThread_
private
bool DQMFileSaver::fakeFilterUnitMode_
private
std::string DQMFileSaver::fileBaseName_
private
FileFormat DQMFileSaver::fileFormat_
private

Definition at line 60 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), globalEndLuminosityBlock(), and globalEndRun().

std::atomic<int> DQMFileSaver::fileUpdate_
mutableprivate

Definition at line 80 of file DQMFileSaver.h.

Referenced by saveForFilterUnit(), and saveForOffline().

std::string DQMFileSaver::filterName_
private

Definition at line 66 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), saveForFilterUnit(), saveForOfflinePB(), and saveForOnlinePB().

evf::FastMonitoringService* DQMFileSaver::fms_
private

Definition at line 90 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), globalEndLuminosityBlock(), and saveForFilterUnit().

int DQMFileSaver::forceRunNumber_
private

Definition at line 77 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), and endJob().

std::atomic<int> DQMFileSaver::irun_
mutableprivate

Definition at line 87 of file DQMFileSaver.h.

Referenced by beginJob(), endJob(), and globalEndRun().

std::string DQMFileSaver::mergeType_
private

Definition at line 95 of file DQMFileSaver.h.

Referenced by beginJob(), and saveForFilterUnit().

std::atomic<int> DQMFileSaver::nlumi_
mutableprivate
std::atomic<int> DQMFileSaver::nrun_
mutableprivate

Definition at line 83 of file DQMFileSaver.h.

Referenced by beginJob(), globalBeginRun(), and globalEndRun().

std::string DQMFileSaver::producer_
private

Definition at line 62 of file DQMFileSaver.h.

Referenced by DQMFileSaver().

bool DQMFileSaver::runIsComplete_
private

Definition at line 68 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), and saveForOffline().

bool DQMFileSaver::saveAtJobEnd_
private

Definition at line 74 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), and endJob().

int DQMFileSaver::saveByLumiSection_
private

Definition at line 72 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), and globalEndLuminosityBlock().

int DQMFileSaver::saveByRun_
private

Definition at line 73 of file DQMFileSaver.h.

Referenced by DQMFileSaver(), and globalEndRun().

int DQMFileSaver::saveReference_
private
int DQMFileSaver::saveReferenceQMin_
private
std::string DQMFileSaver::stream_label_
private

Definition at line 63 of file DQMFileSaver.h.

Referenced by beginJob(), DQMFileSaver(), globalBeginRun(), and saveForFilterUnit().

const std::string DQMFileSaver::streamPrefix_
staticprivate

Definition at line 92 of file DQMFileSaver.h.

Referenced by DQMFileSaver().

const std::string DQMFileSaver::streamSuffix_
staticprivate

Definition at line 93 of file DQMFileSaver.h.

Referenced by DQMFileSaver().

std::string DQMFileSaver::transferDestination_
private

Definition at line 94 of file DQMFileSaver.h.

Referenced by beginJob(), and saveForFilterUnit().

int DQMFileSaver::version_
private

Definition at line 67 of file DQMFileSaver.h.

Referenced by DQMFileSaver().

std::string DQMFileSaver::workflow_
private