////////////////////////////////////////////////////////// // This class has been automatically generated on // Wed Dec 13 13:25:57 2006 by ROOT version 5.13/06 // from TTree data/data // found on file: Data.root ////////////////////////////////////////////////////////// #ifndef NtpAnalyze_h #define NtpAnalyze_h #include #include #include class NtpAnalyze { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leave types Int_t station; Int_t region; Int_t chmbNum; Int_t cardNum; Int_t channel; Int_t testNum; Int_t prodNum; vector *chmbName; vector *cardName; vector *testSite; vector *prodSite; Double_t slope; Double_t offset; Double_t sensitivity; Double_t resbias; Double_t cap1; Double_t cap2; Double_t rate1; Double_t rate2; Double_t rate3; vector *chaThScReg; vector *chaThScCou; // List of branches TBranch *b_station; //! TBranch *b_region; //! TBranch *b_chmbNum; //! TBranch *b_cardNum; //! TBranch *b_channel; //! TBranch *b_testNum; //! TBranch *b_prodNum; //! TBranch *b_chmbName; //! TBranch *b_cardName; //! TBranch *b_testSite; //! TBranch *b_prodSite; //! TBranch *b_slope; //! TBranch *b_offset; //! TBranch *b_sensitivity; //! TBranch *b_resbias; //! TBranch *b_cap1; //! TBranch *b_cap2; //! TBranch *b_rate1; //! TBranch *b_rate2; //! TBranch *b_rate3; //! TBranch *b_chaThScReg; //! TBranch *b_chaThScCou; //! NtpAnalyze(TTree *tree=0); virtual ~NtpAnalyze(); virtual Int_t Cut(Long64_t entry); virtual Int_t GetEntry(Long64_t entry); virtual Long64_t LoadTree(Long64_t entry); virtual void Init(TTree *tree); virtual void Loop(); virtual Bool_t Notify(); virtual void Show(Long64_t entry = -1); }; #endif #ifdef NtpAnalyze_cxx NtpAnalyze::NtpAnalyze(TTree *tree) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. if (tree == 0) { TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("Data.root"); if (!f) { f = new TFile("Data.root"); } tree = (TTree*)gDirectory->Get("data"); } Init(tree); } NtpAnalyze::~NtpAnalyze() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t NtpAnalyze::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t NtpAnalyze::LoadTree(Long64_t entry) { // Set the environment to read one entry if (!fChain) return -5; Long64_t centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (!fChain->InheritsFrom(TChain::Class())) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } void NtpAnalyze::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch // pointers of the tree will be set. // It is normaly not necessary to make changes to the generated // code, but the routine can be extended by the user if needed. // Init() will be called many times when running on PROOF // (once per file to be processed). // Set object pointer chmbName = 0; cardName = 0; testSite = 0; prodSite = 0; chaThScReg = 0; chaThScCou = 0; // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("station", &station, &b_station); fChain->SetBranchAddress("region", ®ion, &b_region); fChain->SetBranchAddress("chmbNum", &chmbNum, &b_chmbNum); fChain->SetBranchAddress("cardNum", &cardNum, &b_cardNum); fChain->SetBranchAddress("channel", &channel, &b_channel); fChain->SetBranchAddress("testNum", &testNum, &b_testNum); fChain->SetBranchAddress("prodNum", &prodNum, &b_prodNum); fChain->SetBranchAddress("chmbName", &chmbName, &b_chmbName); fChain->SetBranchAddress("cardName", &cardName, &b_cardName); fChain->SetBranchAddress("testSite", &testSite, &b_testSite); fChain->SetBranchAddress("prodSite", &prodSite, &b_prodSite); fChain->SetBranchAddress("slope", &slope, &b_slope); fChain->SetBranchAddress("offset", &offset, &b_offset); fChain->SetBranchAddress("sensitivity", &sensitivity, &b_sensitivity); fChain->SetBranchAddress("resbias", &resbias, &b_resbias); fChain->SetBranchAddress("cap1", &cap1, &b_cap1); fChain->SetBranchAddress("cap2", &cap2, &b_cap2); fChain->SetBranchAddress("rate1", &rate1, &b_rate1); fChain->SetBranchAddress("rate2", &rate2, &b_rate2); fChain->SetBranchAddress("rate3", &rate3, &b_rate3); fChain->SetBranchAddress("chaThScReg", &chaThScReg, &b_chaThScReg); fChain->SetBranchAddress("chaThScCou", &chaThScCou, &b_chaThScCou); Notify(); } Bool_t NtpAnalyze::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. It is normaly not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. The return value is currently not used. return kTRUE; } void NtpAnalyze::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t NtpAnalyze::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef NtpAnalyze_cxx