Public Member Functions | Protected Attributes | List of all members
flat::FlatShowerBranch Class Reference

Flat encoding of SRShowerBranch. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/FlatMaker/FlatShowerBranch.h"

Public Member Functions

 FlatShowerBranch (const std::string &prefix, TTree *tr, const IBranchPolicy *policy)
 
 ~FlatShowerBranch ()
 
void Fill (const caf::SRShowerBranch &sr)
 

Protected Attributes

size_t nshwlid
 
TTree * shwlid_tree
 
FlatShower shwlid
 
long shwlid_idx
 
int shwlid_length
 

Detailed Description

Flat encoding of SRShowerBranch.

Definition at line 21 of file FlatShowerBranch.h.

Constructor & Destructor Documentation

flat::FlatShowerBranch::FlatShowerBranch ( const std::string prefix,
TTree *  tr,
const IBranchPolicy policy 
)

Definition at line 3533 of file FlatRecord.cxx.

References compare_h5_caf::branch, nshwlid, shwlid_idx, shwlid_length, and shwlid_tree.

3534  : shwlid_tree(make_tree(prefix+"shwlid", "shwlid", tr)),
3535  shwlid((prefix+"shwlid."), shwlid_tree, policy),
3536  shwlid_idx(0), shwlid_length(0)
3537 {
3538  branch(tr, prefix+"nshwlid", &nshwlid, policy);
3539  if(shwlid_tree->GetNbranches() > 0){
3540  branch(tr, prefix+"shwlid_idx", &shwlid_idx, 0);
3541  branch(tr, prefix+"shwlid_length", &shwlid_length, 0);
3542  }
3543 }
const XML_Char * prefix
Definition: expat.h:380
flat::FlatShowerBranch::~FlatShowerBranch ( )

Definition at line 3545 of file FlatRecord.cxx.

References shwlid_tree.

3546 {
3547  if(shwlid_tree->GetNbranches() > 0) shwlid_tree->Write();
3548  delete shwlid_tree;
3549 }

Member Function Documentation

void flat::FlatShowerBranch::Fill ( const caf::SRShowerBranch sr)

Definition at line 3551 of file FlatRecord.cxx.

References flat::FlatShower::Fill(), caf::SRShowerBranch::nshwlid, nshwlid, caf::SRShowerBranch::shwlid, shwlid, shwlid_idx, shwlid_length, shwlid_tree, and submit_syst::x.

3552 {
3553  nshwlid = sr.nshwlid;
3554 
3555  shwlid_idx += shwlid_length; // increment taken by previous record
3556  shwlid_length = sr.shwlid.size();
3557  for(const auto& x: sr.shwlid){
3558  shwlid.Fill(x);
3559  shwlid_tree->Fill();
3560  }
3561 }
void Fill(const caf::SRShower &sr)
std::vector< SRShower > shwlid

Member Data Documentation

size_t flat::FlatShowerBranch::nshwlid
protected

Definition at line 30 of file FlatShowerBranch.h.

Referenced by Fill(), and FlatShowerBranch().

FlatShower flat::FlatShowerBranch::shwlid
protected

Definition at line 33 of file FlatShowerBranch.h.

Referenced by Fill().

long flat::FlatShowerBranch::shwlid_idx
protected

Definition at line 34 of file FlatShowerBranch.h.

Referenced by Fill(), and FlatShowerBranch().

int flat::FlatShowerBranch::shwlid_length
protected

Definition at line 35 of file FlatShowerBranch.h.

Referenced by Fill(), and FlatShowerBranch().

TTree* flat::FlatShowerBranch::shwlid_tree
protected

Definition at line 32 of file FlatShowerBranch.h.

Referenced by Fill(), FlatShowerBranch(), and ~FlatShowerBranch().


The documentation for this class was generated from the following files: