CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DQMTTreeIO::TreeSimpleReader< T > Class Template Reference
Inheritance diagram for DQMTTreeIO::TreeSimpleReader< T >:
DQMTTreeIO::TreeReaderBase

Public Member Functions

void read (ULong64_t iIndex, DQMStore *dqmstore, int run, int lumi) override
 
void setTree (TTree *iTree) override
 
 TreeSimpleReader (MonitorElementData::Kind kind, MonitorElementData::Scope rescope)
 
- Public Member Functions inherited from DQMTTreeIO::TreeReaderBase
MonitorElementData::Key makeKey (std::string const &fullname, int run, int lumi)
 
 TreeReaderBase (MonitorElementData::Kind kind, MonitorElementData::Scope rescope)
 
virtual ~TreeReaderBase ()
 

Private Attributes

T m_buffer = 0
 
std::string * m_fullName = nullptr
 
uint32_t m_tag = 0
 
TTree * m_tree = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from DQMTTreeIO::TreeReaderBase
MonitorElementData::Kind m_kind
 
MonitorElementData::Scope m_rescope
 

Detailed Description

template<class T>
class DQMTTreeIO::TreeSimpleReader< T >

Definition at line 268 of file DQMRootSource.cc.

Constructor & Destructor Documentation

◆ TreeSimpleReader()

Member Function Documentation

◆ read()

template<class T >
void DQMTTreeIO::TreeSimpleReader< T >::read ( ULong64_t  iIndex,
DQMStore dqmstore,
int  run,
int  lumi 
)
inlineoverridevirtual

Implements DQMTTreeIO::TreeReaderBase.

Definition at line 274 of file DQMRootSource.cc.

274  {
275  // This will populate the fields as defined in setTree method
276  m_tree->GetEntry(iIndex);
277 
278  auto key = makeKey(*m_fullName, run, lumi);
279  auto existing = dqmstore->findOrRecycle(key);
280 
281  if (existing) {
282  existing->Fill(m_buffer);
283  } else {
284  // We make our own MEs here, to avoid a round-trip through the booking API.
285  MonitorElementData meData;
286  meData.key_ = key;
288  meData.value_.scalar_.num = m_buffer;
290  meData.value_.scalar_.real = m_buffer;
291  auto me = new MonitorElement(std::move(meData));
292  dqmstore->putME(me);
293  }
294  }

References dqmPostProcessing_online::existing, dqm::implementation::DQMStore::findOrRecycle(), MonitorElementData::INT, crabWrapper::key, MonitorElementData::key_, DQMTTreeIO::TreeSimpleReader< T >::m_buffer, DQMTTreeIO::TreeSimpleReader< T >::m_fullName, DQMTTreeIO::TreeReaderBase::m_kind, DQMTTreeIO::TreeSimpleReader< T >::m_tree, DQMTTreeIO::TreeReaderBase::makeKey(), hlt_dqm_clientPB-live_cfg::me, eostools::move(), MonitorElementData::Scalar::num, dqm::implementation::DQMStore::putME(), MonitorElementData::Scalar::real, MonitorElementData::REAL, writedatasetfile::run, MonitorElementData::Value::scalar_, and MonitorElementData::value_.

Referenced by edmIntegrityCheck.PublishToFileSystem::get().

◆ setTree()

template<class T >
void DQMTTreeIO::TreeSimpleReader< T >::setTree ( TTree *  iTree)
inlineoverridevirtual

Member Data Documentation

◆ m_buffer

template<class T >
T DQMTTreeIO::TreeSimpleReader< T >::m_buffer = 0
private

◆ m_fullName

template<class T >
std::string* DQMTTreeIO::TreeSimpleReader< T >::m_fullName = nullptr
private

◆ m_tag

template<class T >
uint32_t DQMTTreeIO::TreeSimpleReader< T >::m_tag = 0
private

Definition at line 307 of file DQMRootSource.cc.

Referenced by DQMTTreeIO::TreeSimpleReader< T >::setTree().

◆ m_tree

template<class T >
TTree* DQMTTreeIO::TreeSimpleReader< T >::m_tree = nullptr
private
kValueBranch
static const char *const kValueBranch
Definition: format.h:55
dqm::implementation::DQMStore::findOrRecycle
MonitorElement * findOrRecycle(MonitorElementData::Key const &)
Definition: DQMStore.cc:317
MonitorElementData::Kind::INT
MonitorElementData::Scalar::num
int64_t num
Definition: MonitorElementCollection.h:46
MonitorElementData::Scalar::real
double real
Definition: MonitorElementCollection.h:47
dqmPostProcessing_online.existing
existing
Definition: dqmPostProcessing_online.py:126
cms::cuda::assert
assert(be >=bs)
kFullNameBranch
static const char *const kFullNameBranch
Definition: format.h:53
MonitorElementData::key_
Key key_
Definition: MonitorElementCollection.h:245
DQMTTreeIO::TreeSimpleReader::m_buffer
T m_buffer
Definition: DQMRootSource.cc:306
DQMTTreeIO::TreeReaderBase::makeKey
MonitorElementData::Key makeKey(std::string const &fullname, int run, int lumi)
Definition: DQMRootSource.cc:157
MonitorElementData::Value::scalar_
Scalar scalar_
Definition: MonitorElementCollection.h:157
MonitorElementData::value_
Value value_
Definition: MonitorElementCollection.h:246
kFlagBranch
static const char *const kFlagBranch
Definition: format.h:54
dqm::implementation::DQMStore::putME
MonitorElement * putME(MonitorElement *me)
Definition: DQMStore.cc:148
DQMTTreeIO::TreeSimpleReader::m_tree
TTree * m_tree
Definition: DQMRootSource.cc:304
DQMTTreeIO::TreeReaderBase::TreeReaderBase
TreeReaderBase(MonitorElementData::Kind kind, MonitorElementData::Scope rescope)
Definition: DQMRootSource.cc:153
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
DQMTTreeIO::TreeSimpleReader::m_fullName
std::string * m_fullName
Definition: DQMRootSource.cc:305
eostools.move
def move(src, dest)
Definition: eostools.py:511
writedatasetfile.run
run
Definition: writedatasetfile.py:27
DQMTTreeIO::MonitorElement
dqm::harvesting::MonitorElement MonitorElement
Definition: DQMRootSource.cc:57
MonitorElementData
Definition: MonitorElementCollection.h:43
DQMTTreeIO::TreeReaderBase::m_kind
MonitorElementData::Kind m_kind
Definition: DQMRootSource.cc:182
DQMTTreeIO::TreeSimpleReader::m_tag
uint32_t m_tag
Definition: DQMRootSource.cc:307
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
crabWrapper.key
key
Definition: crabWrapper.py:19
lumi
Definition: LumiSectionData.h:20
MonitorElementData::Kind::REAL