CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
DQMRootSource Class Reference
Inheritance diagram for DQMRootSource:
edm::InputSource edm::ProductRegistryHelper

Classes

class  RunLumiPHIDKey
 
class  RunPHIDKey
 

Public Member Functions

 DQMRootSource (edm::ParameterSet const &, const edm::InputSourceDescription &)
 
virtual ~DQMRootSource ()
 
- Public Member Functions inherited from edm::InputSource
boost::shared_ptr
< ActivityRegistry
actReg () const
 Accessor for Activity Registry. More...
 
boost::shared_ptr
< BranchIDListHelper
branchIDListHelper () const
 Accessor for branchIDListHelper. More...
 
void closeFile (FileBlock *, bool cleaningUpAfterException)
 close current file More...
 
void doBeginJob ()
 Called by framework at beginning of job. More...
 
void doBeginLumi (LuminosityBlockPrincipal &lbp, ProcessContext const *)
 Called by framework at beginning of lumi block. More...
 
void doBeginRun (RunPrincipal &rp, ProcessContext const *)
 Called by framework at beginning of run. More...
 
void doEndJob ()
 Called by framework at end of job. More...
 
void doEndLumi (LuminosityBlockPrincipal &lbp, bool cleaningUpAfterException, ProcessContext const *)
 Called by framework at end of lumi block. More...
 
void doEndRun (RunPrincipal &rp, bool cleaningUpAfterException, ProcessContext const *)
 Called by framework at end of run. More...
 
void doPostForkReacquireResources (boost::shared_ptr< multicore::MessageReceiverForSource >)
 
void doPreForkReleaseResources ()
 Called by the framework before forking the process. More...
 
ProcessingController::ForwardState forwardState () const
 
bool goToEvent (EventID const &eventID)
 
 InputSource (ParameterSet const &, InputSourceDescription const &)
 Constructor. More...
 
 InputSource (InputSource const &)=delete
 
void issueReports (EventID const &eventID)
 issue an event report More...
 
LuminosityBlockNumber_t luminosityBlock () const
 Accessor for current luminosity block number. More...
 
boost::shared_ptr
< LuminosityBlockAuxiliary
luminosityBlockAuxiliary () const
 Called by the framework to merge or insert lumi in principal cache. More...
 
int maxEvents () const
 
int maxLuminosityBlocks () const
 
ModuleDescription const & moduleDescription () const
 Accessor for 'module' description. More...
 
ItemType nextItemType ()
 Advances the source to the next item. More...
 
InputSourceoperator= (InputSource const &)=delete
 
bool primary () const
 Accessor for primary input source flag. More...
 
ProcessConfiguration const & processConfiguration () const
 Accessor for Process Configuration. More...
 
std::string const & processGUID () const
 Accessor for global process identifier. More...
 
ProcessHistoryRegistry const & processHistoryRegistry () const
 Const accessor for process history registry. More...
 
ProcessHistoryRegistryprocessHistoryRegistryForUpdate ()
 Non-const accessor for process history registry. More...
 
ProcessingMode processingMode () const
 RunsLumisAndEvents (default), RunsAndLumis, or Runs. More...
 
boost::shared_ptr
< ProductRegistry const > 
productRegistry () const
 Accessor for product registry. More...
 
bool randomAccess () const
 
void readAndMergeLumi (LuminosityBlockPrincipal &lbp)
 Read next luminosity block (same as a prior lumi) More...
 
void readAndMergeRun (RunPrincipal &rp)
 Read next run (same as a prior run) More...
 
void readEvent (EventPrincipal &ep, StreamContext &)
 Read next event. More...
 
bool readEvent (EventPrincipal &ep, EventID const &, StreamContext &)
 Read a specific event. More...
 
std::unique_ptr< FileBlockreadFile ()
 Read next file. More...
 
void readLuminosityBlock (LuminosityBlockPrincipal &lumiPrincipal, HistoryAppender &historyAppender)
 Read next luminosity block (new lumi) More...
 
boost::shared_ptr
< LuminosityBlockAuxiliary
readLuminosityBlockAuxiliary ()
 Read next luminosity block Auxilary. More...
 
void readRun (RunPrincipal &runPrincipal, HistoryAppender &historyAppender)
 Read next run (new run) More...
 
boost::shared_ptr< RunAuxiliaryreadRunAuxiliary ()
 Read next run Auxiliary. More...
 
ProcessHistoryID const & reducedProcessHistoryID () const
 
void registerProducts ()
 Register any produced products. More...
 
int remainingEvents () const
 
int remainingLuminosityBlocks () const
 
void repeat ()
 Reset the remaining number of events/lumis to the maximum number. More...
 
ProcessingController::ReverseState reverseState () const
 
void rewind ()
 Begin again at the first event. More...
 
RunNumber_t run () const
 Accessor for current run number. More...
 
boost::shared_ptr< RunAuxiliaryrunAuxiliary () const
 Called by the framework to merge or insert run in principal cache. More...
 
void setLuminosityBlockNumber_t (LuminosityBlockNumber_t lb)
 Set the luminosity block ID. More...
 
void setRunNumber (RunNumber_t r)
 Set the run number. More...
 
void skipEvents (int offset)
 
bool skipForForking ()
 
Timestamp const & timestamp () const
 Accessor for the current time, as seen by the input source. More...
 
virtual ~InputSource ()
 Destructor. More...
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::InputSource
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

virtual void closeFile_ () override
 
 DQMRootSource (const DQMRootSource &)
 
virtual edm::InputSource::ItemType getNextItemType () override
 
void logFileAction (char const *msg, char const *fileName) const
 
const DQMRootSourceoperator= (const DQMRootSource &)
 
void readElements ()
 
virtual void readEvent_ (edm::EventPrincipal &) override
 
virtual std::unique_ptr
< edm::FileBlock
readFile_ () override
 
virtual void readLuminosityBlock_ (edm::LuminosityBlockPrincipal &lbCache) override
 
virtual boost::shared_ptr
< edm::LuminosityBlockAuxiliary
readLuminosityBlockAuxiliary_ () override
 
void readNextItemType ()
 
virtual void readRun_ (edm::RunPrincipal &rpCache) override
 
virtual boost::shared_ptr
< edm::RunAuxiliary
readRunAuxiliary_ () override
 
bool setupFile (unsigned int iIndex)
 
bool skipIt (edm::RunNumber_t, edm::LuminosityBlockNumber_t) const
 

Private Attributes

edm::InputFileCatalog m_catalog
 
std::auto_ptr< TFile > m_file
 
size_t m_fileIndex
 
unsigned int m_filterOnRun
 
std::vector
< edm::ProcessHistoryID
m_historyIDs
 
edm::JobReport::Token m_jrToken
 
bool m_justOpenedFileSoNeedToGenerateRunTransition
 
unsigned int m_lastSeenLumi2
 
edm::ProcessHistoryID m_lastSeenReducedPHID
 
edm::ProcessHistoryID m_lastSeenReducedPHID2
 
unsigned int m_lastSeenRun
 
unsigned int m_lastSeenRun2
 
edm::LuminosityBlockAuxiliary m_lumiAux
 
std::set< MonitorElement * > m_lumiElements
 
std::vector
< edm::LuminosityBlockRange
m_lumisToProcess
 
std::list< unsigned int >::iterator m_nextIndexItr
 
edm::InputSource::ItemType m_nextItemType
 
std::list< unsigned int > m_orderedIndices
 
std::list< unsigned int >::iterator m_presentIndexItr
 
size_t m_presentlyOpenFileIndex
 
std::vector
< edm::ProcessHistoryID
m_reducedHistoryIDs
 
edm::RunAuxiliary m_runAux
 
std::set< MonitorElement * > m_runElements
 
std::vector< RunLumiToRange > m_runlumiToRange
 
bool m_shouldReadMEs
 
bool m_skipBadFiles
 
std::vector< boost::shared_ptr
< TreeReaderBase > > 
m_treeReaders
 
std::vector< TTree * > m_trees
 

Additional Inherited Members

- Public Types inherited from edm::InputSource
enum  ItemType {
  IsInvalid, IsStop, IsFile, IsRun,
  IsLumi, IsEvent, IsRepeat, IsSynchronize
}
 
enum  ProcessingMode { Runs, RunsAndLumis, RunsLumisAndEvents }
 
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Protected Member Functions inherited from edm::InputSource
void decreaseRemainingEventsBy (int iSkipped)
 
bool eventCached () const
 
boost::shared_ptr
< LuminosityBlockPrincipal >
const 
luminosityBlockPrincipal () const
 
bool newLumi () const
 
bool newRun () const
 
ProcessHistoryRegistryprocessHistoryRegistryUpdate () const
 
ProductRegistryproductRegistryUpdate () const
 
void reset () const
 
void resetEventCached ()
 
void resetLuminosityBlockAuxiliary (bool isNewLumi=true) const
 
void resetNewLumi ()
 
void resetNewRun ()
 
void resetRunAuxiliary (bool isNewRun=true) const
 
boost::shared_ptr
< RunPrincipal > const 
runPrincipal () const
 
void setEventCached ()
 Called by the framework to merge or ached() const {return eventCached_;}. More...
 
void setLuminosityBlockAuxiliary (LuminosityBlockAuxiliary *lbp)
 
void setNewLumi ()
 
void setNewRun ()
 
void setRunAuxiliary (RunAuxiliary *rp)
 
void setTimestamp (Timestamp const &theTime)
 To set the current time, as seen by the input source. More...
 
virtual void skip (int offset)
 
ItemType state () const
 

Detailed Description

Definition at line 295 of file DQMRootSource.cc.

Constructor & Destructor Documentation

DQMRootSource::DQMRootSource ( edm::ParameterSet const &  iPSet,
const edm::InputSourceDescription iDesc 
)

Definition at line 435 of file DQMRootSource.cc.

References edm::InputFileCatalog::fileNames(), edm::InputSource::IsStop, kFloatIndex, kIntIndex, kStringIndex, kTH1DIndex, kTH1FIndex, kTH1SIndex, kTH2DIndex, kTH2FIndex, kTH2SIndex, kTH3FIndex, kTProfile2DIndex, kTProfileIndex, m_catalog, m_fileIndex, m_lumisToProcess, m_nextItemType, m_treeReaders, and edm::sortAndRemoveOverlaps().

435  :
436  edm::InputSource(iPSet,iDesc),
437  m_catalog(iPSet.getUntrackedParameter<std::vector<std::string> >("fileNames"),
438  iPSet.getUntrackedParameter<std::string>("overrideCatalog")),
440  m_fileIndex(0),
442  m_trees(kNIndicies,static_cast<TTree*>(0)),
443  m_treeReaders(kNIndicies,boost::shared_ptr<TreeReaderBase>()),
445  m_lastSeenRun(0),
447  m_lastSeenRun2(0),
448  m_lastSeenLumi2(0),
449  m_filterOnRun(iPSet.getUntrackedParameter<unsigned int>("filterOnRun", 0)),
450  m_skipBadFiles(iPSet.getUntrackedParameter<bool>("skipBadFiles", false)),
451  m_lumisToProcess(iPSet.getUntrackedParameter<std::vector<edm::LuminosityBlockRange> >("lumisToProcess",std::vector<edm::LuminosityBlockRange>())),
453  m_shouldReadMEs(true)
454 {
456  if(m_fileIndex ==m_catalog.fileNames().size()) {
458  } else{
459  m_treeReaders[kIntIndex].reset(new TreeSimpleReader<Long64_t>());
460  m_treeReaders[kFloatIndex].reset(new TreeSimpleReader<double>());
461  m_treeReaders[kStringIndex].reset(new TreeObjectReader<std::string>());
462  m_treeReaders[kTH1FIndex].reset(new TreeObjectReader<TH1F>());
463  m_treeReaders[kTH1SIndex].reset(new TreeObjectReader<TH1S>());
464  m_treeReaders[kTH1DIndex].reset(new TreeObjectReader<TH1D>());
465  m_treeReaders[kTH2FIndex].reset(new TreeObjectReader<TH2F>());
466  m_treeReaders[kTH2SIndex].reset(new TreeObjectReader<TH2S>());
467  m_treeReaders[kTH2DIndex].reset(new TreeObjectReader<TH2D>());
468  m_treeReaders[kTH3FIndex].reset(new TreeObjectReader<TH3F>());
469  m_treeReaders[kTProfileIndex].reset(new TreeObjectReader<TProfile>());
470  m_treeReaders[kTProfile2DIndex].reset(new TreeObjectReader<TProfile2D>());
471  }
472 }
edm::InputSource::ItemType m_nextItemType
unsigned int m_lastSeenRun2
std::vector< boost::shared_ptr< TreeReaderBase > > m_treeReaders
size_t m_presentlyOpenFileIndex
unsigned int m_filterOnRun
bool m_justOpenedFileSoNeedToGenerateRunTransition
edm::InputFileCatalog m_catalog
edm::ProcessHistoryID m_lastSeenReducedPHID2
std::vector< TTree * > m_trees
std::vector< std::string > const & fileNames() const
unsigned int m_lastSeenLumi2
std::vector< edm::LuminosityBlockRange > m_lumisToProcess
edm::ProcessHistoryID m_lastSeenReducedPHID
std::vector< EventRange > & sortAndRemoveOverlaps(std::vector< EventRange > &eventRange)
Definition: EventRange.cc:102
unsigned int m_lastSeenRun
DQMRootSource::~DQMRootSource ( )
virtual

Definition at line 479 of file DQMRootSource.cc.

References edm::InputFileCatalog::fileNames(), logFileAction(), m_catalog, m_file, and m_presentlyOpenFileIndex.

480 {
481  if(m_file.get() != 0 && m_file->IsOpen()) {
482  m_file->Close();
483  logFileAction(" Closed file ", m_catalog.fileNames()[m_presentlyOpenFileIndex].c_str());
484  }
485 }
void logFileAction(char const *msg, char const *fileName) const
size_t m_presentlyOpenFileIndex
edm::InputFileCatalog m_catalog
std::auto_ptr< TFile > m_file
std::vector< std::string > const & fileNames() const
DQMRootSource::DQMRootSource ( const DQMRootSource )
private

Member Function Documentation

void DQMRootSource::closeFile_ ( )
overrideprivatevirtual

Reimplemented from edm::InputSource.

Definition at line 669 of file DQMRootSource.cc.

References edm::JobReport::inputFileClosed(), m_file, m_jrToken, and edm::Primary.

669  {
670  if(m_file.get()==nullptr) { return; }
673 }
edm::JobReport::Token m_jrToken
std::auto_ptr< TFile > m_file
void inputFileClosed(InputType inputType, Token fileToken)
Definition: JobReport.cc:453
void DQMRootSource::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 416 of file DQMRootSource.cc.

References edm::ConfigurationDescriptions::addDefault(), edm::ParameterSetDescription::addUntracked(), and AlCaHLTBitMon_QueryRunRegistry::string.

416  {
418  desc.addUntracked<std::vector<std::string> >("fileNames")
419  ->setComment("Names of files to be processed.");
420  desc.addUntracked<unsigned int>("filterOnRun",0)
421  ->setComment("Just limit the process to the selected run.");
422  desc.addUntracked<bool>("skipBadFiles",false)
423  ->setComment("Skip the file if it is not valid");
424  desc.addUntracked<std::string>("overrideCatalog",std::string())
425  ->setComment("An alternate file catalog to use instead of the standard site one.");
426  std::vector<edm::LuminosityBlockRange> defaultLumis;
427  desc.addUntracked<std::vector<edm::LuminosityBlockRange> >("lumisToProcess",defaultLumis)
428  ->setComment("Skip any lumi inside the specified run:lumi range.");
429 
430  descriptions.addDefault(desc);
431 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void addDefault(ParameterSetDescription const &psetDescription)
edm::InputSource::ItemType DQMRootSource::getNextItemType ( )
overrideprivatevirtual

Implements edm::InputSource.

Definition at line 507 of file DQMRootSource.cc.

References m_nextItemType.

508 {
509  //std::cout <<"getNextItemType "<<m_nextItemType<<std::endl;
510  return m_nextItemType;
511 }
edm::InputSource::ItemType m_nextItemType
void DQMRootSource::logFileAction ( char const *  msg,
char const *  fileName 
) const
private

Definition at line 1035 of file DQMRootSource.cc.

References convertXMLtoSQLite_cfg::fileName, and edm::FlushMessageLog().

Referenced by setupFile(), and ~DQMRootSource().

1035  {
1036  edm::LogAbsolute("fileAction") << std::setprecision(0) << edm::TimeOfDay() << msg << fileName;
1038 }
void FlushMessageLog()
const DQMRootSource& DQMRootSource::operator= ( const DQMRootSource )
private
void DQMRootSource::readElements ( )
private

Definition at line 675 of file DQMRootSource.cc.

References getHLTprescales::index, kNoTypesStored, m_orderedIndices, m_presentIndexItr, m_reducedHistoryIDs, m_runlumiToRange, m_shouldReadMEs, m_treeReaders, and matplotRender::reader.

Referenced by readLuminosityBlock_(), and readRun_().

675  {
677  RunLumiToRange runLumiRange = m_runlumiToRange[*m_presentIndexItr];
678  bool shouldContinue = false;
679  do
680  {
681  shouldContinue = false;
683  if(runLumiRange.m_type == kNoTypesStored) {continue;}
684  boost::shared_ptr<TreeReaderBase> reader = m_treeReaders[runLumiRange.m_type];
685  ULong64_t index = runLumiRange.m_firstIndex;
686  ULong64_t endIndex = runLumiRange.m_lastIndex+1;
687  for (; index != endIndex; ++index)
688  {
689  bool isLumi = runLumiRange.m_lumi !=0;
690  if (m_shouldReadMEs)
691  reader->read(index,*store,isLumi);
692 // if (isLumi)
693 // {
694 // std::cout << runLumiRange.m_run << " " << runLumiRange.m_lumi << " lumi element "<< element->getFullname()<<" "<<index<< " " << runLumiRange.m_type << std::endl;
695 // m_lumiElements.insert(element);
696 // }
697 // else
698 // {
699 // std::cout << runLumiRange.m_run << " " << runLumiRange.m_lumi << " run element "<< element->getFullname()<<" "<<index<< " " << runLumiRange.m_type << std::endl;
700 // m_runElements.insert(element);
701 // }
702  }
703  if (m_presentIndexItr != m_orderedIndices.end())
704  {
705  //are there more parts to this same run/lumi?
706  const RunLumiToRange nextRunLumiRange = m_runlumiToRange[*m_presentIndexItr];
707  //continue to the next item if that item is either
708  if ( (m_reducedHistoryIDs.at(nextRunLumiRange.m_historyIDIndex) == m_reducedHistoryIDs.at(runLumiRange.m_historyIDIndex)) &&
709  (nextRunLumiRange.m_run == runLumiRange.m_run) &&
710  (nextRunLumiRange.m_lumi == runLumiRange.m_lumi) )
711  {
712  shouldContinue= true;
713  runLumiRange = nextRunLumiRange;
714  }
715  }
716  } while(shouldContinue);
717 }
std::vector< boost::shared_ptr< TreeReaderBase > > m_treeReaders
std::list< unsigned int >::iterator m_presentIndexItr
std::vector< edm::ProcessHistoryID > m_reducedHistoryIDs
std::vector< RunLumiToRange > m_runlumiToRange
std::list< unsigned int > m_orderedIndices
void DQMRootSource::readEvent_ ( edm::EventPrincipal )
overrideprivatevirtual

Implements edm::InputSource.

Definition at line 502 of file DQMRootSource.cc.

503 {
504  //std::cout << "readEvent_" << std::endl;
505 }
std::unique_ptr< edm::FileBlock > DQMRootSource::readFile_ ( )
overrideprivatevirtual

Reimplemented from edm::InputSource.

Definition at line 639 of file DQMRootSource.cc.

References edm::InputFileCatalog::fileNames(), edm::JobReport::inputFileOpened(), edm::InputSource::IsStop, edm::InputFileCatalog::logicalFileNames(), m_catalog, m_file, m_fileIndex, m_jrToken, m_nextItemType, readNextItemType(), setupFile(), and AlCaHLTBitMon_QueryRunRegistry::string.

639  {
640  //std::cout <<"readFile_"<<std::endl;
641 
642 
643  auto const numFiles = m_catalog.fileNames().size();
644  while(m_fileIndex < numFiles && not setupFile(m_fileIndex++)) {}
645 
646  if(m_file.get() == nullptr) {
647  //last file in list was bad
649  return std::unique_ptr<edm::FileBlock>(new edm::FileBlock);
650  }
651 
653 
657  std::string(),
658  std::string(),
659  "DQMRootSource",
660  "source",
661  m_file->GetUUID().AsString(),//edm::createGlobalIdentifier(),
662  std::vector<std::string>()
663  );
664 
665  return std::unique_ptr<edm::FileBlock>(new edm::FileBlock);
666 }
edm::InputSource::ItemType m_nextItemType
edm::JobReport::Token m_jrToken
void readNextItemType()
Token inputFileOpened(std::string const &physicalFileName, std::string const &logicalFileName, std::string const &catalog, std::string const &inputType, std::string const &inputSourceClassName, std::string const &moduleLabel, std::string const &guid, std::vector< std::string > const &branchNames)
Definition: JobReport.cc:393
edm::InputFileCatalog m_catalog
std::auto_ptr< TFile > m_file
std::vector< std::string > const & logicalFileNames() const
std::vector< std::string > const & fileNames() const
bool setupFile(unsigned int iIndex)
void DQMRootSource::readLuminosityBlock_ ( edm::LuminosityBlockPrincipal lbCache)
overrideprivatevirtual

Reimplemented from edm::InputSource.

Definition at line 602 of file DQMRootSource.cc.

References edm::LuminosityBlockPrincipal::fillLuminosityBlockPrincipal(), edm::LuminosityBlockPrincipal::id(), edm::LuminosityBlockID::luminosityBlock(), m_lastSeenLumi2, m_lastSeenReducedPHID2, m_lastSeenRun2, m_orderedIndices, m_presentIndexItr, m_reducedHistoryIDs, m_runlumiToRange, m_shouldReadMEs, edm::InputSource::processHistoryRegistryForUpdate(), readElements(), readNextItemType(), edm::JobReport::reportInputLumiSection(), and edm::LuminosityBlockID::run().

603 {
604  assert(m_presentIndexItr != m_orderedIndices.end());
605  RunLumiToRange runLumiRange = m_runlumiToRange[*m_presentIndexItr];
606  assert(runLumiRange.m_run == lbCache.id().run());
607  assert(runLumiRange.m_lumi == lbCache.id().luminosityBlock());
608 
609  //NOTE: need to reset all lumi block elements at this point
610  if( ( m_lastSeenLumi2 != runLumiRange.m_lumi ||
611  m_lastSeenRun2 != runLumiRange.m_run ||
612  m_lastSeenReducedPHID2 != m_reducedHistoryIDs.at(runLumiRange.m_historyIDIndex) )
613  && m_shouldReadMEs) {
614 
616  std::vector<MonitorElement*> allMEs = (*store).getAllContents("");
617  for(auto const& ME : allMEs) {
618  // We do not want to reset Run Products here!
619  if (ME->getLumiFlag()) {
620  ME->Reset();
621  }
622  }
623  m_lastSeenReducedPHID2 = m_reducedHistoryIDs.at(runLumiRange.m_historyIDIndex);
624  m_lastSeenRun2 = runLumiRange.m_run;
625  m_lastSeenLumi2 = runLumiRange.m_lumi;
626  }
627 
629  readElements();
630 
632  jr->reportInputLumiSection(lbCache.id().run(),lbCache.id().luminosityBlock());
633 
635 
636 }
unsigned int m_lastSeenRun2
void readNextItemType()
std::list< unsigned int >::iterator m_presentIndexItr
std::vector< edm::ProcessHistoryID > m_reducedHistoryIDs
Definition: ME.h:11
void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
std::vector< RunLumiToRange > m_runlumiToRange
void reportInputLumiSection(unsigned int run, unsigned int lumiSectId)
Definition: JobReport.cc:544
edm::ProcessHistoryID m_lastSeenReducedPHID2
std::list< unsigned int > m_orderedIndices
RunNumber_t run() const
unsigned int m_lastSeenLumi2
LuminosityBlockNumber_t luminosityBlock() const
ProcessHistoryRegistry & processHistoryRegistryForUpdate()
Non-const accessor for process history registry.
Definition: InputSource.h:173
boost::shared_ptr< edm::LuminosityBlockAuxiliary > DQMRootSource::readLuminosityBlockAuxiliary_ ( )
overrideprivatevirtual

Implements edm::InputSource.

Definition at line 529 of file DQMRootSource.cc.

References m_historyIDs, m_lumiAux, m_nextIndexItr, m_orderedIndices, m_runlumiToRange, and edm::LuminosityBlockAuxiliary::setProcessHistoryID().

530 {
531  //std::cout <<"readLuminosityBlockAuxiliary_"<<std::endl;
532  assert(m_nextIndexItr != m_orderedIndices.end());
533  const RunLumiToRange runLumiRange = m_runlumiToRange[*m_nextIndexItr];
534  m_lumiAux = edm::LuminosityBlockAuxiliary(edm::LuminosityBlockID(runLumiRange.m_run,runLumiRange.m_lumi),
535  edm::Timestamp(runLumiRange.m_beginTime),
536  edm::Timestamp(runLumiRange.m_endTime));
537  assert(m_historyIDs.size() > runLumiRange.m_historyIDIndex);
538  //std::cout <<"lumi "<<m_lumiAux.beginTime().value()<<" "<<runLumiRange.m_beginTime<<std::endl;
539  m_lumiAux.setProcessHistoryID(m_historyIDs[runLumiRange.m_historyIDIndex]);
540 
541  return boost::shared_ptr<edm::LuminosityBlockAuxiliary>(new edm::LuminosityBlockAuxiliary(m_lumiAux));
542 }
std::vector< RunLumiToRange > m_runlumiToRange
edm::LuminosityBlockAuxiliary m_lumiAux
std::vector< edm::ProcessHistoryID > m_historyIDs
std::list< unsigned int > m_orderedIndices
void setProcessHistoryID(ProcessHistoryID const &phid)
std::list< unsigned int >::iterator m_nextIndexItr
void DQMRootSource::readNextItemType ( )
private

Definition at line 719 of file DQMRootSource.cc.

References edm::InputFileCatalog::fileNames(), edm::InputSource::IsFile, edm::InputSource::IsLumi, edm::InputSource::IsRun, edm::InputSource::IsStop, m_catalog, m_fileIndex, m_justOpenedFileSoNeedToGenerateRunTransition, m_lastSeenReducedPHID, m_lastSeenRun, m_nextIndexItr, m_nextItemType, m_orderedIndices, m_reducedHistoryIDs, m_runlumiToRange, and skipIt().

Referenced by readFile_(), readLuminosityBlock_(), and readRun_().

720 {
721  //Do the work of actually figuring out where next to go
722 
723  assert (m_nextIndexItr != m_orderedIndices.end());
724  RunLumiToRange runLumiRange = m_runlumiToRange[*m_nextIndexItr];
725 
727  if (runLumiRange.m_lumi != 0 && m_nextItemType == edm::InputSource::IsRun) {
729  return;
730  }
731  ++m_nextIndexItr;
732  }
733  else
734  {
735  //NOTE: the following makes the iterator not be advanced in the
736  //do while loop below.
737  runLumiRange.m_run=0;
738  }
739 
740  bool shouldContinue = false;
741  do
742  {
743  shouldContinue = false;
745  {
746  ++m_nextIndexItr;
747  }
748 
749  if (m_nextIndexItr == m_orderedIndices.end())
750  {
751  //go to next file
753  //std::cout <<"going to next file"<<std::endl;
754  if(m_fileIndex == m_catalog.fileNames().size()) {
756  }
757  break;
758  }
759  const RunLumiToRange nextRunLumiRange = m_runlumiToRange[*m_nextIndexItr];
760  //continue to the next item if that item is the same run or lumi as we just did
761  if( (m_reducedHistoryIDs.at(nextRunLumiRange.m_historyIDIndex) == m_reducedHistoryIDs.at(runLumiRange.m_historyIDIndex) ) &&
762  (nextRunLumiRange.m_run == runLumiRange.m_run) &&
763  (nextRunLumiRange.m_lumi == runLumiRange.m_lumi) ) {
764  shouldContinue= true;
765  ++m_nextIndexItr;
766  //std::cout <<"advancing " <<nextRunLumiRange.m_run<<" "<<nextRunLumiRange.m_lumi<<std::endl;
767  }
768  } while(shouldContinue);
769 
770  if(m_nextIndexItr != m_orderedIndices.end()) {
775  } else {
777  }
778  }
779 }
edm::InputSource::ItemType m_nextItemType
std::vector< edm::ProcessHistoryID > m_reducedHistoryIDs
std::vector< RunLumiToRange > m_runlumiToRange
bool m_justOpenedFileSoNeedToGenerateRunTransition
edm::InputFileCatalog m_catalog
std::list< unsigned int > m_orderedIndices
std::vector< std::string > const & fileNames() const
edm::ProcessHistoryID m_lastSeenReducedPHID
bool skipIt(edm::RunNumber_t, edm::LuminosityBlockNumber_t) const
std::list< unsigned int >::iterator m_nextIndexItr
unsigned int m_lastSeenRun
void DQMRootSource::readRun_ ( edm::RunPrincipal rpCache)
overrideprivatevirtual

If the collate option is not set for the DQMStore, we should indeed be sure to reset all histograms after a run transition, but we should definitely avoid doing it using a local, private copy of the actual content of the DQMStore. Clients are completely free to delete/add MonitorElements from the DQMStore and the local copy stored in the std::set will never notice it until it will try to reset a deleted object. That's why the resetting directly queries the DQMStore for its current content.

Reimplemented from edm::InputSource.

Definition at line 545 of file DQMRootSource.cc.

References edm::RunPrincipal::fillRunPrincipal(), edm::RunPrincipal::id(), m_filterOnRun, m_justOpenedFileSoNeedToGenerateRunTransition, m_lastSeenReducedPHID, m_lastSeenRun, m_orderedIndices, m_presentIndexItr, m_reducedHistoryIDs, m_runlumiToRange, m_shouldReadMEs, edm::InputSource::processHistoryRegistryForUpdate(), readElements(), readNextItemType(), edm::JobReport::reportInputRunNumber(), and edm::RunID::run().

546 {
547  assert(m_presentIndexItr != m_orderedIndices.end());
548  RunLumiToRange runLumiRange = m_runlumiToRange[*m_presentIndexItr];
549 
551  unsigned int runID =rpCache.id().run();
552  assert(runID == runLumiRange.m_run);
553 
554  m_shouldReadMEs = (m_filterOnRun == 0 ||
555  (m_filterOnRun != 0 && m_filterOnRun == runID));
556  // std::cout <<"readRun_"<<std::endl;
557  // std::cout <<"m_shouldReadMEs " << m_shouldReadMEs <<std::endl;
558 
569  //NOTE: need to reset all run elements at this point
570  if( m_lastSeenRun != runID ||
571  m_lastSeenReducedPHID != m_reducedHistoryIDs.at(runLumiRange.m_historyIDIndex) ) {
572  if (m_shouldReadMEs) {
574  std::vector<MonitorElement*> allMEs = (*store).getAllContents("");
575  for(auto const& ME : allMEs) {
576  // We do not want to reset here Lumi products, since a dedicated
577  // resetting is done at every lumi transition.
578  if (ME->getLumiFlag()) continue;
579  if ( !(*store).isCollate() )
580  ME->Reset();
581  }
582  }
583  m_lastSeenReducedPHID = m_reducedHistoryIDs.at(runLumiRange.m_historyIDIndex);
584  m_lastSeenRun = runID;
585  }
586 
588 
589  //NOTE: it is possible to have a Run when all we have stored is lumis
590  if(runLumiRange.m_lumi == 0) {
591  readElements();
592  }
593 
595  jr->reportInputRunNumber(rpCache.id().run());
596 
598 }
void readNextItemType()
RunNumber_t run() const
Definition: RunID.h:43
void reportInputRunNumber(unsigned int run)
Definition: JobReport.cc:554
std::list< unsigned int >::iterator m_presentIndexItr
unsigned int m_filterOnRun
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
Definition: RunPrincipal.cc:22
std::vector< edm::ProcessHistoryID > m_reducedHistoryIDs
Definition: ME.h:11
std::vector< RunLumiToRange > m_runlumiToRange
bool m_justOpenedFileSoNeedToGenerateRunTransition
std::list< unsigned int > m_orderedIndices
RunID const & id() const
Definition: RunPrincipal.h:69
ProcessHistoryRegistry & processHistoryRegistryForUpdate()
Non-const accessor for process history registry.
Definition: InputSource.h:173
edm::ProcessHistoryID m_lastSeenReducedPHID
unsigned int m_lastSeenRun
boost::shared_ptr< edm::RunAuxiliary > DQMRootSource::readRunAuxiliary_ ( )
overrideprivatevirtual

Implements edm::InputSource.

Definition at line 513 of file DQMRootSource.cc.

References m_historyIDs, m_nextIndexItr, m_orderedIndices, m_runAux, m_runlumiToRange, and edm::RunAuxiliary::setProcessHistoryID().

514 {
515  //std::cout <<"readRunAuxiliary_"<<std::endl;
516  assert(m_nextIndexItr != m_orderedIndices.end());
517  RunLumiToRange runLumiRange = m_runlumiToRange[*m_nextIndexItr];
518 
519  //NOTE: the setBeginTime and setEndTime functions of RunAuxiliary only work if the previous value was invalid
520  // therefore we must copy
521  m_runAux = edm::RunAuxiliary(runLumiRange.m_run,edm::Timestamp(runLumiRange.m_beginTime),edm::Timestamp(runLumiRange.m_endTime));
522  assert(m_historyIDs.size() > runLumiRange.m_historyIDIndex);
523  //std::cout <<"readRunAuxiliary_ "<<m_historyIDs[runLumiRange.m_historyIDIndex]<<std::endl;
524  m_runAux.setProcessHistoryID(m_historyIDs[runLumiRange.m_historyIDIndex]);
525  return boost::shared_ptr<edm::RunAuxiliary>( new edm::RunAuxiliary(m_runAux) );
526 }
edm::RunAuxiliary m_runAux
std::vector< RunLumiToRange > m_runlumiToRange
std::vector< edm::ProcessHistoryID > m_historyIDs
std::list< unsigned int > m_orderedIndices
std::list< unsigned int >::iterator m_nextIndexItr
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: RunAuxiliary.h:36
bool DQMRootSource::setupFile ( unsigned int  iIndex)
private

Definition at line 782 of file DQMRootSource.cc.

References cms::Exception::addContext(), electronStore::configs, edm::InputFileCatalog::fileNames(), edm::errors::FileOpenError, edm::errors::FileReadError, i, edm::ProcessHistory::id(), getHLTprescales::index, edm::pset::Registry::instance(), kBeginTimeBranch, kEndTimeBranch, kFirstIndex, kIndicesTree, kLastIndex, kLumiBranch, kMetaDataDirectoryAbsolute, kNIndicies, kParameterSetBranch, kParameterSetTree, kPHIndexBranch, kProcessConfigurationParameterSetIDBranch, kProcessConfigurationPassID, kProcessConfigurationProcessNameBranch, kProcessConfigurationReleaseVersion, kProcessHistoryIndexBranch, kProcessHistoryTree, kRunBranch, kTypeBranch, kTypeNames, logFileAction(), m_catalog, m_file, m_historyIDs, m_justOpenedFileSoNeedToGenerateRunTransition, m_nextIndexItr, m_orderedIndices, m_presentIndexItr, m_presentlyOpenFileIndex, m_reducedHistoryIDs, m_runlumiToRange, m_skipBadFiles, m_treeReaders, m_trees, edm::InputSource::processHistoryRegistryUpdate(), edm::ProcessHistoryRegistry::reducedProcessHistoryID(), edm::ParameterSet::registerFromString(), edm::ProcessHistoryRegistry::registerProcessHistory(), AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by readFile_().

783 {
784  if(m_file.get() != 0 && iIndex > 0) {
785  m_file->Close();
786  logFileAction(" Closed file ", m_catalog.fileNames()[iIndex-1].c_str());
787  }
788  logFileAction(" Initiating request to open file ", m_catalog.fileNames()[iIndex].c_str());
789  m_presentlyOpenFileIndex = iIndex;
790  m_file.reset();
791  std::auto_ptr<TFile> newFile;
792  try {
793  newFile = std::auto_ptr<TFile>(TFile::Open(m_catalog.fileNames()[iIndex].c_str()));
794  } catch(cms::Exception const& e) {
795  if(!m_skipBadFiles) {
797  ex.addContext("Opening DQM Root file");
798  ex <<"\nInput file " << m_catalog.fileNames()[iIndex] << " was not found, could not be opened, or is corrupted.\n";
799  throw ex;
800  }
801  return 0;
802  }
803  if(not newFile->IsZombie()) {
804  logFileAction(" Successfully opened file ", m_catalog.fileNames()[iIndex].c_str());
805  } else {
806  if(!m_skipBadFiles) {
808  ex<<"Input file "<<m_catalog.fileNames()[iIndex].c_str() <<" could not be opened.\n";
809  ex.addContext("Opening DQM Root file");
810  throw ex;
811  }
812  return 0;
813  }
814  //Check file format version, which is encoded in the Title of the TFile
815  if(0 != strcmp(newFile->GetTitle(),"1")) {
817  ex<<"Input file "<<m_catalog.fileNames()[iIndex].c_str() <<" does not appear to be a DQM Root file.\n";
818  }
819 
820  //Get meta Data
821  TDirectory* metaDir = newFile->GetDirectory(kMetaDataDirectoryAbsolute);
822  if(0==metaDir) {
823  if(!m_skipBadFiles) {
825  ex<<"Input file "<<m_catalog.fileNames()[iIndex].c_str() <<" appears to be corrupted since it does not have the proper internal structure.\n"
826  " Check to see if the file was closed properly.\n";
827  ex.addContext("Opening DQM Root file");
828  throw ex;
829  }
830  else {return 0;}
831  }
832  m_file = newFile; //passed all tests so now we want to use this file
833  TTree* parameterSetTree = dynamic_cast<TTree*>(metaDir->Get(kParameterSetTree));
834  assert(0!=parameterSetTree);
835 
837  assert(0!=psr);
838  {
839  std::string blob;
840  std::string* pBlob = &blob;
841  parameterSetTree->SetBranchAddress(kParameterSetBranch,&pBlob);
842  for(unsigned int index = 0; index != parameterSetTree->GetEntries();++index)
843  {
844  parameterSetTree->GetEntry(index);
846  }
847  }
848 
849  {
850  TTree* processHistoryTree = dynamic_cast<TTree*>(metaDir->Get(kProcessHistoryTree));
851  assert(0!=processHistoryTree);
852  unsigned int phIndex = 0;
853  processHistoryTree->SetBranchAddress(kPHIndexBranch,&phIndex);
854  std::string processName;
855  std::string* pProcessName = &processName;
856  processHistoryTree->SetBranchAddress(kProcessConfigurationProcessNameBranch,&pProcessName);
857  std::string parameterSetIDBlob;
858  std::string* pParameterSetIDBlob = &parameterSetIDBlob;
859  processHistoryTree->SetBranchAddress(kProcessConfigurationParameterSetIDBranch,&pParameterSetIDBlob);
860  std::string releaseVersion;
861  std::string* pReleaseVersion = &releaseVersion;
862  processHistoryTree->SetBranchAddress(kProcessConfigurationReleaseVersion,&pReleaseVersion);
863  std::string passID;
864  std::string* pPassID = &passID;
865  processHistoryTree->SetBranchAddress(kProcessConfigurationPassID,&pPassID);
866 
868  std::vector<edm::ProcessConfiguration> configs;
869  configs.reserve(5);
870  m_historyIDs.clear();
871  m_reducedHistoryIDs.clear();
872  for(unsigned int i=0; i != processHistoryTree->GetEntries(); ++i) {
873  processHistoryTree->GetEntry(i);
874  if(phIndex==0) {
875  if(not configs.empty()) {
876  edm::ProcessHistory ph(configs);
877  m_historyIDs.push_back(ph.id());
878  phr.registerProcessHistory(ph);
879  m_reducedHistoryIDs.push_back(phr.reducedProcessHistoryID(ph.id()));
880  }
881  configs.clear();
882  }
883  edm::ParameterSetID psetID(parameterSetIDBlob);
884  edm::ProcessConfiguration pc(processName, psetID,releaseVersion,passID);
885  configs.push_back(pc);
886  }
887  if(not configs.empty()) {
888  edm::ProcessHistory ph(configs);
889  m_historyIDs.push_back(ph.id());
890  phr.registerProcessHistory(ph);
891  m_reducedHistoryIDs.push_back(phr.reducedProcessHistoryID(ph.id()));
892  //std::cout <<"inserted "<<ph.id()<<std::endl;
893  }
894  }
895 
896  //Setup the indices
897  TTree* indicesTree = dynamic_cast<TTree*>(m_file->Get(kIndicesTree));
898  assert(0!=indicesTree);
899 
900  m_runlumiToRange.clear();
901  m_runlumiToRange.reserve(indicesTree->GetEntries());
902  m_orderedIndices.clear();
903 
904  RunLumiToRange temp;
905  indicesTree->SetBranchAddress(kRunBranch,&temp.m_run);
906  indicesTree->SetBranchAddress(kLumiBranch,&temp.m_lumi);
907  indicesTree->SetBranchAddress(kBeginTimeBranch,&temp.m_beginTime);
908  indicesTree->SetBranchAddress(kEndTimeBranch,&temp.m_endTime);
909  indicesTree->SetBranchAddress(kProcessHistoryIndexBranch,&temp.m_historyIDIndex);
910  indicesTree->SetBranchAddress(kTypeBranch,&temp.m_type);
911  indicesTree->SetBranchAddress(kFirstIndex,&temp.m_firstIndex);
912  indicesTree->SetBranchAddress(kLastIndex,&temp.m_lastIndex);
913 
914  //Need to reorder items since if there was a merge done the same Run
915  //and/or Lumi can appear multiple times but we want to process them
916  //all at once
917 
918  //We use a std::list for m_orderedIndices since inserting into the
919  //middle of a std::list does not disrupt the iterators to already
920  //existing entries
921 
922  //The Map is used to see if a Run/Lumi pair has appeared before
923  typedef std::map<RunLumiPHIDKey, std::list<unsigned int>::iterator > RunLumiToLastEntryMap;
924  RunLumiToLastEntryMap runLumiToLastEntryMap;
925 
926  //Need to group all lumis for the same run together and move the run
927  //entry to the beginning
928  typedef std::map<RunPHIDKey, std::pair< std::list<unsigned int>::iterator, std::list<unsigned int>::iterator> > RunToFirstLastEntryMap;
929  RunToFirstLastEntryMap runToFirstLastEntryMap;
930 
931  for (Long64_t index = 0; index != indicesTree->GetEntries(); ++index)
932  {
933  indicesTree->GetEntry(index);
934 // std::cout <<"read r:"<<temp.m_run
935 // <<" l:"<<temp.m_lumi
936 // <<" b:"<<temp.m_beginTime
937 // <<" e:"<<temp.m_endTime
938 // <<" fi:" << temp.m_firstIndex
939 // <<" li:" << temp.m_lastIndex
940 // <<" type:" << temp.m_type << std::endl;
941  m_runlumiToRange.push_back(temp);
942 
943  RunLumiPHIDKey runLumi(m_reducedHistoryIDs.at(temp.m_historyIDIndex), temp.m_run, temp.m_lumi);
944  RunPHIDKey runKey(m_reducedHistoryIDs.at(temp.m_historyIDIndex), temp.m_run);
945 
946  RunLumiToLastEntryMap::iterator itFind = runLumiToLastEntryMap.find(runLumi);
947  if (itFind == runLumiToLastEntryMap.end())
948  {
949  //does not already exist
950  //does the run for this already exist?
951  std::list<unsigned int>::iterator itLastOfRun = m_orderedIndices.end();
952 
953  RunToFirstLastEntryMap::iterator itRunFirstLastEntryFind = runToFirstLastEntryMap.find(runKey);
954  bool needNewEntryInRunFirstLastEntryMap = true;
955  if (itRunFirstLastEntryFind != runToFirstLastEntryMap.end())
956  {
957  needNewEntryInRunFirstLastEntryMap=false;
958  if (temp.m_lumi!=0)
959  {
960  //lumis go to the end
961  itLastOfRun = itRunFirstLastEntryFind->second.second;
962  //we want to insert after this one so must advance the iterator
963  ++itLastOfRun;
964  }
965  else
966  {
967  //runs go at the beginning
968  itLastOfRun = itRunFirstLastEntryFind->second.first;
969  }
970  }
971  std::list<unsigned int>::iterator iter = m_orderedIndices.insert(itLastOfRun,index);
972  runLumiToLastEntryMap[runLumi]=iter;
973  if (needNewEntryInRunFirstLastEntryMap)
974  runToFirstLastEntryMap[runKey]=std::make_pair(iter,iter);
975  else
976  {
977  if(temp.m_lumi!=0)
978  {
979  //lumis go at end
980  runToFirstLastEntryMap[runKey].second = iter;
981  }
982  else
983  {
984  //since we haven't yet seen this run/lumi combination it means we haven't yet seen
985  // a run so we can put this first
986  runToFirstLastEntryMap[runKey].first = iter;
987  }
988  }
989  }
990  else
991  {
992  //We need to do a merge since the run/lumi already appeared. Put it after the existing entry
993  //std::cout <<" found a second instance of "<<runLumi.first<<" "<<runLumi.second<<" at "<<index<<std::endl;
994  std::list<unsigned int>::iterator itNext = itFind->second;
995  ++itNext;
996  std::list<unsigned int>::iterator iter = m_orderedIndices.insert(itNext,index);
997  RunToFirstLastEntryMap::iterator itRunFirstLastEntryFind = runToFirstLastEntryMap.find(runKey);
998  if (itRunFirstLastEntryFind->second.second == itFind->second)
999  {
1000  //if the previous one was the last in the run, we need to update to make this one the last
1001  itRunFirstLastEntryFind->second.second = iter;
1002  }
1003  itFind->second = iter;
1004  }
1005  }
1006  m_nextIndexItr = m_orderedIndices.begin();
1008 
1009  if(m_nextIndexItr != m_orderedIndices.end()) {
1010  for( size_t index = 0; index < kNIndicies; ++index) {
1011  m_trees[index] = dynamic_cast<TTree*>(m_file->Get(kTypeNames[index]));
1012  assert(0!=m_trees[index]);
1013  m_treeReaders[index]->setTree(m_trees[index]);
1014  }
1015  }
1016  //After a file open, the framework expects to see a new 'IsRun'
1018 
1019  return 1;
1020 }
int i
Definition: DBlmapReader.cc:9
static const char *const kProcessHistoryTree
Definition: format.h:54
static const char *const kRunBranch
Definition: format.h:41
static const char *const kTypeNames[]
Definition: format.h:28
void logFileAction(char const *msg, char const *fileName) const
std::vector< boost::shared_ptr< TreeReaderBase > > m_treeReaders
static const char *const kIndicesTree
Definition: format.h:40
bool registerProcessHistory(ProcessHistory const &processHistory)
static const char *const kFirstIndex
Definition: format.h:47
static const char *const kLumiBranch
Definition: format.h:42
size_t m_presentlyOpenFileIndex
std::list< unsigned int >::iterator m_presentIndexItr
std::vector< edm::ProcessHistoryID > m_reducedHistoryIDs
static const char *const kPHIndexBranch
Definition: format.h:55
static const char *const kParameterSetBranch
Definition: format.h:62
std::vector< RunLumiToRange > m_runlumiToRange
std::vector< edm::ProcessHistoryID > m_historyIDs
bool m_justOpenedFileSoNeedToGenerateRunTransition
edm::InputFileCatalog m_catalog
static const char *const kParameterSetTree
Definition: format.h:61
std::list< unsigned int > m_orderedIndices
static const char *const kTypeBranch
Definition: format.h:46
std::auto_ptr< TFile > m_file
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
static const char *const kProcessHistoryIndexBranch
Definition: format.h:43
static const char *const kEndTimeBranch
Definition: format.h:45
std::vector< TTree * > m_trees
static const char *const kProcessConfigurationPassID
Definition: format.h:59
static void registerFromString(std::string const &rep)
Definition: ParameterSet.cc:95
static const char *const kMetaDataDirectoryAbsolute
Definition: format.h:51
std::vector< std::string > const & fileNames() const
static const char *const kLastIndex
Definition: format.h:48
static const char *const kProcessConfigurationReleaseVersion
Definition: format.h:58
static const char *const kProcessConfigurationProcessNameBranch
Definition: format.h:56
static const char *const kBeginTimeBranch
Definition: format.h:44
ProcessHistoryRegistry & processHistoryRegistryUpdate() const
Definition: InputSource.h:344
std::list< unsigned int >::iterator m_nextIndexItr
static Registry * instance()
Definition: Registry.cc:14
static const char *const kProcessConfigurationParameterSetIDBranch
Definition: format.h:57
bool DQMRootSource::skipIt ( edm::RunNumber_t  run,
edm::LuminosityBlockNumber_t  lumi 
) const
private

Definition at line 1023 of file DQMRootSource.cc.

References edm::binary_search_all(), edm::lessThan(), lt, and m_lumisToProcess.

Referenced by readNextItemType().

1023  {
1025  edm::LuminosityBlockRange lumiRange = edm::LuminosityBlockRange(lumiID, lumiID);
1027  if(!m_lumisToProcess.empty() && !binary_search_all(m_lumisToProcess, lumiRange, lt)) {
1028  return true;
1029  }
1030  return false;
1031 }
tuple lumi
Definition: fjr2json.py:35
RunNumber_t run() const
Accessor for current run number.
Definition: InputSource.cc:600
std::vector< edm::LuminosityBlockRange > m_lumisToProcess
< trclass="colgroup">< tdclass="colgroup"colspan=5 > DT local reconstruction</td ></tr >< tr >< td >< ahref="classDTRecHit1DPair.html"> DTRecHit1DPair</a ></td >< td >< ahref="DataFormats_DTRecHit.html"> edm::RangeMap & lt
bool binary_search_all(ForwardSequence const &s, Datum const &d)
wrappers for std::binary_search
Definition: Algorithms.h:76
bool lessThan(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:67

Member Data Documentation

edm::InputFileCatalog DQMRootSource::m_catalog
private
std::auto_ptr<TFile> DQMRootSource::m_file
private

Definition at line 383 of file DQMRootSource.cc.

Referenced by closeFile_(), readFile_(), setupFile(), and ~DQMRootSource().

size_t DQMRootSource::m_fileIndex
private

Definition at line 378 of file DQMRootSource.cc.

Referenced by DQMRootSource(), readFile_(), and readNextItemType().

unsigned int DQMRootSource::m_filterOnRun
private

Definition at line 393 of file DQMRootSource.cc.

Referenced by readRun_().

std::vector<edm::ProcessHistoryID> DQMRootSource::m_historyIDs
private

Definition at line 401 of file DQMRootSource.cc.

Referenced by readLuminosityBlockAuxiliary_(), readRunAuxiliary_(), and setupFile().

edm::JobReport::Token DQMRootSource::m_jrToken
private

Definition at line 404 of file DQMRootSource.cc.

Referenced by closeFile_(), and readFile_().

bool DQMRootSource::m_justOpenedFileSoNeedToGenerateRunTransition
private

Definition at line 397 of file DQMRootSource.cc.

Referenced by readNextItemType(), readRun_(), and setupFile().

unsigned int DQMRootSource::m_lastSeenLumi2
private

Definition at line 392 of file DQMRootSource.cc.

Referenced by readLuminosityBlock_().

edm::ProcessHistoryID DQMRootSource::m_lastSeenReducedPHID
private

Definition at line 388 of file DQMRootSource.cc.

Referenced by readNextItemType(), and readRun_().

edm::ProcessHistoryID DQMRootSource::m_lastSeenReducedPHID2
private

Definition at line 390 of file DQMRootSource.cc.

Referenced by readLuminosityBlock_().

unsigned int DQMRootSource::m_lastSeenRun
private

Definition at line 389 of file DQMRootSource.cc.

Referenced by readNextItemType(), and readRun_().

unsigned int DQMRootSource::m_lastSeenRun2
private

Definition at line 391 of file DQMRootSource.cc.

Referenced by readLuminosityBlock_().

edm::LuminosityBlockAuxiliary DQMRootSource::m_lumiAux
private

Definition at line 375 of file DQMRootSource.cc.

Referenced by readLuminosityBlockAuxiliary_().

std::set<MonitorElement*> DQMRootSource::m_lumiElements
private

Definition at line 399 of file DQMRootSource.cc.

std::vector<edm::LuminosityBlockRange> DQMRootSource::m_lumisToProcess
private

Definition at line 395 of file DQMRootSource.cc.

Referenced by DQMRootSource(), and skipIt().

std::list<unsigned int>::iterator DQMRootSource::m_nextIndexItr
private
edm::InputSource::ItemType DQMRootSource::m_nextItemType
private

Definition at line 376 of file DQMRootSource.cc.

Referenced by DQMRootSource(), getNextItemType(), readFile_(), and readNextItemType().

std::list<unsigned int> DQMRootSource::m_orderedIndices
private
std::list<unsigned int>::iterator DQMRootSource::m_presentIndexItr
private

Definition at line 381 of file DQMRootSource.cc.

Referenced by readElements(), readLuminosityBlock_(), readRun_(), and setupFile().

size_t DQMRootSource::m_presentlyOpenFileIndex
private

Definition at line 379 of file DQMRootSource.cc.

Referenced by setupFile(), and ~DQMRootSource().

std::vector<edm::ProcessHistoryID> DQMRootSource::m_reducedHistoryIDs
private
edm::RunAuxiliary DQMRootSource::m_runAux
private

Definition at line 374 of file DQMRootSource.cc.

Referenced by readRunAuxiliary_().

std::set<MonitorElement*> DQMRootSource::m_runElements
private

Definition at line 400 of file DQMRootSource.cc.

std::vector<RunLumiToRange> DQMRootSource::m_runlumiToRange
private
bool DQMRootSource::m_shouldReadMEs
private

Definition at line 398 of file DQMRootSource.cc.

Referenced by readElements(), readLuminosityBlock_(), and readRun_().

bool DQMRootSource::m_skipBadFiles
private

Definition at line 394 of file DQMRootSource.cc.

Referenced by setupFile().

std::vector<boost::shared_ptr<TreeReaderBase> > DQMRootSource::m_treeReaders
private

Definition at line 385 of file DQMRootSource.cc.

Referenced by DQMRootSource(), readElements(), and setupFile().

std::vector<TTree*> DQMRootSource::m_trees
private

Definition at line 384 of file DQMRootSource.cc.

Referenced by setupFile().