KnotImp Class Reference

List of all members.

Public Member Functions

 KnotImp (TTree &tree)
 ~KnotImp ()
const AcnetDeviceGetDevice (const char *devname)
int GetEntry (int entry)

Public Attributes

TTree & fTree
int fCurrentEntry
Knot::DeviceMap fDeviceMap

Detailed Description

Definition at line 24 of file Knot.cxx.


Constructor & Destructor Documentation

KnotImp::KnotImp ( TTree &  tree  )  [inline]

Definition at line 31 of file Knot.cxx.

00031 : fTree(tree), fCurrentEntry(-1) {}

KnotImp::~KnotImp (  )  [inline]

Definition at line 32 of file Knot.cxx.

References done(), fDeviceMap, and it.

00032                {
00033         Knot::DeviceMap::iterator it, done = fDeviceMap.end();
00034         for (it = fDeviceMap.begin(); it != done; ++it) {
00035             delete it->second;
00036             it->second = 0;
00037         }
00038     }


Member Function Documentation

const AcnetDevice* KnotImp::GetDevice ( const char *  devname  )  [inline]

Definition at line 40 of file Knot.cxx.

References acnet2branchname(), fCurrentEntry, fDeviceMap, fTree, GetEntry(), and it.

Referenced by Knot::GetDevice().

00040                                                       {
00041         Knot::DeviceMap::iterator it = fDeviceMap.find(devname);
00042         if (it != fDeviceMap.end()) return it->second;
00043 
00044         AcnetDevice* ad = new AcnetDevice(devname);
00045         fDeviceMap[devname] = ad;
00046 
00047         string dns = acnet2branchname(devname);
00048         //cerr << "Getting device " << devname << " as " << dns << endl;
00049         fTree.SetBranchStatus(dns.c_str(),1);
00050         fTree.SetBranchAddress(dns.c_str(),&fDeviceMap[devname]);
00051         if (fCurrentEntry >= 0)
00052             this->GetEntry(fCurrentEntry);
00053         return ad;
00054     }

int KnotImp::GetEntry ( int  entry  )  [inline]

Definition at line 56 of file Knot.cxx.

References fCurrentEntry, and fTree.

Referenced by GetDevice(), and Knot::GetEntry().

00056                             {
00057         fCurrentEntry = entry;
00058         return fTree.GetEntry(entry);
00059     }


Member Data Documentation

Definition at line 28 of file Knot.cxx.

Referenced by GetDevice(), GetEntry(), and Knot::GetEntryNumber().

Definition at line 29 of file Knot.cxx.

Referenced by GetDevice(), Knot::GetDevices(), and ~KnotImp().

Definition at line 27 of file Knot.cxx.

Referenced by GetDevice(), GetEntry(), and Knot::GetSize().


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

Generated on 24 Apr 2018 for loon by  doxygen 1.6.1