TagHandle
class description - source file - inheritance tree (.pdf)
protected:
virtual void resetTypedBranch()
virtual Bool_t setTypedBranch(KanBranch& branch)
public:
TagHandle(KanCompMap::Index idx = KanCompMap::tag, const char* branchName = "Tag")
TagHandle(const TagHandle&)
virtual ~TagHandle()
void attachBool(const char* name, Bool_t& b)
void attachFloat(const char* name, Float_t& f)
void attachInt(const char* name, Int_t& i)
void list() const
Bool_t* newBool(const char* name)
Float_t* newFloat(const char* name)
Int_t* newInt(const char* name)
TagHandle& operator=(const TagHandle&)
void removeBool(const char* name)
void removeFloat(const char* name)
void removeInt(const char* name)
bool updateData()
private:
map<Bool_t*,Int_t> _boolMap !
map<Int_t*,Int_t> _intMap !
map<Float_t*,Int_t> _floatMap !
map<std::string,Bool_t*> _boolNames !
map<std::string,Int_t*> _intNames !
map<std::string,Float_t*> _floatNames !
This is the interface for accessing persistent Event Tag
To access tag data
// make a handle
TagHandle Tag;
// attach it to the event source (input)
input->setBranchToRead(Tag);
// declare & attach the data to the tag
Bool_t bit1, bit2, bit3;
Int_t int1;
Tag.attachBool("bit1",&bit1);
Tag.attachBool("bit2",&bit2);
Tag.attachBool("bit3",&bit3);
Tag.attachInt("int1",&int1);
// loop on events
for (UInt_t iEvt(0); iEvt < input->nEvts(); ++iEvt ) {
// Load the event;
input->LoadTree(iEvt);
// read the data for that event
if ( ! Tag(*input) ) {
cout << "Failed to read tag for Event " << iEvt << endl;
continue;
}
if ( ! Tag.updateData() ) {
cout << "Failed to update one or more tag bits for Event " << iEvt << endl;
}
// do stuff with the tag
if ( ! bit1 ) continue;
}
void attachBool(const char* name, Bool_t& b)
void removeBool(const char* name)
void attachInt(const char* name, Int_t& i)
void removeInt(const char* name)
void attachFloat(const char* name, Float_t& f)
void removeFloat(const char* name)
void list() const
bool updateData()
Bool_t setTypedBranch(KanBranch& branch)
void resetTypedBranch()
Inline Functions
void ~TagHandle()
TagHandle TagHandle(KanCompMap::Index idx = KanCompMap::tag, const char* branchName = "Tag")
Bool_t* newBool(const char* name)
Int_t* newInt(const char* name)
Float_t* newFloat(const char* name)
TagHandle TagHandle(const TagHandle&)
TagHandle& operator=(const TagHandle&)
Last update: TagHandle.cc,v 1.1 2004/11/30 23:25:14 echarles Exp $
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.
|