CMS 3D CMS Logo

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

Public Member Functions

void read (ULong64_t iIndex, DQMStore *dqmstore, int run, int lumi) override
 
void setTree (TTree *iTree) override
 
 TreeObjectReader (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

Tm_buffer = nullptr
 
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::TreeObjectReader< T >

Definition at line 185 of file DQMRootSource.cc.

Constructor & Destructor Documentation

◆ TreeObjectReader()

Member Function Documentation

◆ read()

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

Implements DQMTTreeIO::TreeReaderBase.

Definition at line 193 of file DQMRootSource.cc.

193  {
194  // This will populate the fields as defined in setTree method
195  m_tree->GetEntry(iIndex);
196 
197  auto key = makeKey(*m_fullName, run, lumi);
198  auto existing = dqmstore->findOrRecycle(key);
199  if (existing) {
200  // TODO: make sure there is sufficient locking here.
202  } else {
203  // We make our own MEs here, to avoid a round-trip through the booking API.
204  MonitorElementData meData;
205  meData.key_ = key;
206  meData.value_.object_ = std::unique_ptr<T>((T*)(m_buffer->Clone()));
207  auto me = new MonitorElement(std::move(meData));
208  dqmstore->putME(me);
209  }
210  }

References dqmPostProcessing_online::existing, dqm::implementation::DQMStore::findOrRecycle(), crabWrapper::key, MonitorElementData::key_, DQMTTreeIO::TreeObjectReader< T >::m_buffer, DQMTTreeIO::TreeObjectReader< T >::m_fullName, DQMTTreeIO::TreeObjectReader< T >::m_tree, DQMTTreeIO::TreeReaderBase::makeKey(), hlt_dqm_clientPB-live_cfg::me, DQMTTreeIO::DQMMergeHelper::mergeTogether(), eostools::move(), MonitorElementData::Value::object_, dqm::implementation::DQMStore::putME(), writedatasetfile::run, and MonitorElementData::value_.

Referenced by edmIntegrityCheck.PublishToFileSystem::get().

◆ setTree()

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

Member Data Documentation

◆ m_buffer

template<class T >
T* DQMTTreeIO::TreeObjectReader< T >::m_buffer = nullptr
private

◆ m_fullName

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

◆ m_tag

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

Definition at line 223 of file DQMRootSource.cc.

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

◆ m_tree

template<class T >
TTree* DQMTTreeIO::TreeObjectReader< T >::m_tree = nullptr
private
kValueBranch
static const char *const kValueBranch
Definition: format.h:55
MonitorElementData::Kind::INT
DQMTTreeIO::TreeObjectReader::m_fullName
std::string * m_fullName
Definition: DQMRootSource.cc:221
MonitorElementData::Kind::STRING
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::TreeReaderBase::makeKey
MonitorElementData::Key makeKey(std::string const &fullname, int run, int lumi)
Definition: DQMRootSource.cc:155
DQMTTreeIO::TreeObjectReader::m_tree
TTree * m_tree
Definition: DQMRootSource.cc:220
DQMTTreeIO::DQMMergeHelper::mergeTogether
static void mergeTogether(TH1 *original, TH1 *toAdd)
Definition: DQMRootSource.cc:91
MonitorElementData::value_
Value value_
Definition: MonitorElementCollection.h:246
kFlagBranch
static const char *const kFlagBranch
Definition: format.h:54
DQMTTreeIO::TreeObjectReader::m_buffer
T * m_buffer
Definition: DQMRootSource.cc:222
DQMTTreeIO::TreeReaderBase::TreeReaderBase
TreeReaderBase(MonitorElementData::Kind kind, MonitorElementData::Scope rescope)
Definition: DQMRootSource.cc:151
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
MonitorElementData::Value::object_
edm::propagate_const< std::unique_ptr< TH1 > > object_
Definition: MonitorElementCollection.h:158
eostools.move
def move(src, dest)
Definition: eostools.py:511
writedatasetfile.run
run
Definition: writedatasetfile.py:27
DQMTTreeIO::TreeObjectReader::m_tag
uint32_t m_tag
Definition: DQMRootSource.cc:223
T
long double T
Definition: Basic3DVectorLD.h:48
DQMTTreeIO::MonitorElement
dqm::harvesting::MonitorElement MonitorElement
Definition: DQMRootSource.cc:55
MonitorElementData
Definition: MonitorElementCollection.h:43
DQMTTreeIO::TreeReaderBase::m_kind
MonitorElementData::Kind m_kind
Definition: DQMRootSource.cc:180
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:56
crabWrapper.key
key
Definition: crabWrapper.py:19
lumi
Definition: LumiSectionData.h:20
MonitorElementData::Kind::REAL