CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RootChamberWriter.h
Go to the documentation of this file.
1 #ifndef SimMuon_Neutron_RootChamberWriter_h
2 #define SimMuon_Neutron_RootChamberWriter_h
3 
4 #include <TTree.h>
5 #include <TClonesArray.h>
7 
9 public:
11  RootChamberWriter() : theTree(nullptr), theHits(nullptr) {}
12  RootChamberWriter(const std::string& treeName);
13 
16 
17  void write(const edm::PSimHitContainer& hits);
18 
19  TTree* tree() { return theTree; }
20 
21 private:
22  TTree* theTree;
23  TClonesArray* theHits;
24 };
25 
26 #endif
TClonesArray * theHits
RootChamberWriter()
default ctor, for STL
~RootChamberWriter()
writes the tree, and deletes everything
void write(const edm::PSimHitContainer &hits)
std::vector< PSimHit > PSimHitContainer