CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
DQMTTreeIO::TreeReaderBase Class Referenceabstract
Inheritance diagram for DQMTTreeIO::TreeReaderBase:
DQMTTreeIO::TreeObjectReader< T > DQMTTreeIO::TreeSimpleReader< T > DQMTTreeIO::TreeStringReader

Public Member Functions

MonitorElementData::Key makeKey (std::string const &fullname, int run, int lumi)
 
virtual void read (ULong64_t iIndex, DQMStore *dqmstore, int run, int lumi)=0
 
virtual void setTree (TTree *iTree)=0
 
 TreeReaderBase (MonitorElementData::Kind kind, MonitorElementData::Scope rescope)
 
virtual ~TreeReaderBase ()
 

Protected Attributes

MonitorElementData::Kind m_kind
 
MonitorElementData::Scope m_rescope
 

Detailed Description

Definition at line 151 of file DQMRootSource.cc.

Constructor & Destructor Documentation

◆ TreeReaderBase()

DQMTTreeIO::TreeReaderBase::TreeReaderBase ( MonitorElementData::Kind  kind,
MonitorElementData::Scope  rescope 
)
inline

Definition at line 153 of file DQMRootSource.cc.

154  : m_kind(kind), m_rescope(rescope) {}

◆ ~TreeReaderBase()

virtual DQMTTreeIO::TreeReaderBase::~TreeReaderBase ( )
inlinevirtual

Definition at line 155 of file DQMRootSource.cc.

155 {}

Member Function Documentation

◆ makeKey()

MonitorElementData::Key DQMTTreeIO::TreeReaderBase::makeKey ( std::string const &  fullname,
int  run,
int  lumi 
)
inline

Definition at line 157 of file DQMRootSource.cc.

157  {
159  key.kind_ = m_kind;
161  if (m_rescope == MonitorElementData::Scope::LUMI) {
162  // no rescoping
163  key.scope_ = lumi == 0 ? MonitorElementData::Scope::RUN : MonitorElementData::Scope::LUMI;
165  } else if (m_rescope == MonitorElementData::Scope::RUN) {
166  // everything becomes run, we'll never see Scope::JOB inside DQMIO files.
167  key.scope_ = MonitorElementData::Scope::RUN;
168  key.id_ = edm::LuminosityBlockID(run, 0);
169  } else if (m_rescope == MonitorElementData::Scope::JOB) {
170  // Everything is aggregated over the entire job.
171  key.scope_ = MonitorElementData::Scope::JOB;
172  key.id_ = edm::LuminosityBlockID(0, 0);
173  } else {
174  assert(!"Invalid Scope in rescope option.");
175  }
176  return key;
177  }

References cms::cuda::assert(), MonitorElementData::Path::DIR_AND_NAME, crabWrapper::key, m_kind, m_rescope, and writedatasetfile::run.

Referenced by DQMTTreeIO::TreeObjectReader< T >::read(), DQMTTreeIO::TreeStringReader::read(), and DQMTTreeIO::TreeSimpleReader< T >::read().

◆ read()

virtual void DQMTTreeIO::TreeReaderBase::read ( ULong64_t  iIndex,
DQMStore dqmstore,
int  run,
int  lumi 
)
pure virtual

◆ setTree()

virtual void DQMTTreeIO::TreeReaderBase::setTree ( TTree *  iTree)
pure virtual

Member Data Documentation

◆ m_kind

MonitorElementData::Kind DQMTTreeIO::TreeReaderBase::m_kind
protected

◆ m_rescope

MonitorElementData::Scope DQMTTreeIO::TreeReaderBase::m_rescope
protected

Definition at line 183 of file DQMRootSource.cc.

Referenced by makeKey().

DQMTTreeIO::TreeReaderBase::m_rescope
MonitorElementData::Scope m_rescope
Definition: DQMRootSource.cc:183
cms::cuda::assert
assert(be >=bs)
MonitorElementData::Path::Type::DIR_AND_NAME
MonitorElementData::Key
Definition: MonitorElementCollection.h:224
edm::LuminosityBlockID
Definition: LuminosityBlockID.h:31
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
writedatasetfile.run
run
Definition: writedatasetfile.py:27
DQMTTreeIO::TreeReaderBase::m_kind
MonitorElementData::Kind m_kind
Definition: DQMRootSource.cc:182
crabWrapper.key
key
Definition: crabWrapper.py:19
lumi
Definition: LumiSectionData.h:20