Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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

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().

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().

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.

Referenced by Knot::GetEntry().

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


Member Data Documentation

int KnotImp::fCurrentEntry
 

Definition at line 28 of file Knot.cxx.

Referenced by Knot::GetEntryNumber().

Knot::DeviceMap KnotImp::fDeviceMap
 

Definition at line 29 of file Knot.cxx.

Referenced by Knot::GetDevices().

TTree& KnotImp::fTree
 

Definition at line 27 of file Knot.cxx.

Referenced by Knot::GetSize().


The documentation for this class was generated from the following file:
Generated on Mon Feb 15 11:09:22 2010 for loon by  doxygen 1.3.9.1