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 149 of file DQMRootSource.cc.

Constructor & Destructor Documentation

◆ TreeReaderBase()

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

Definition at line 151 of file DQMRootSource.cc.

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

◆ ~TreeReaderBase()

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

Definition at line 153 of file DQMRootSource.cc.

153 {}

Member Function Documentation

◆ makeKey()

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

Definition at line 155 of file DQMRootSource.cc.

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

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 181 of file DQMRootSource.cc.

Referenced by makeKey().

DQMTTreeIO::TreeReaderBase::m_rescope
MonitorElementData::Scope m_rescope
Definition: DQMRootSource.cc:181
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:180
crabWrapper.key
key
Definition: crabWrapper.py:19
lumi
Definition: LumiSectionData.h:20