//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Wed Jul 18 12:42:26 2007 by ROOT version 5.10/00e
// from TTree tree/Combined Ntuple
// found on file: ../../../PitCBNT/ntuplePit7977.root
//////////////////////////////////////////////////////////

#ifndef PitCBNT_h
#define PitCBNT_h

#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>

class PitCBNT {
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           Run;
   Int_t           Event;
   Int_t           Time;
   Double_t        Weight;
   Int_t           IEvent;
   Int_t           sct_rdo_nhits;
   Float_t         sct_rdo_strips[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_tbin[24000];   //[sct_rdo_nhits]
   Int_t           sct_rdo_rdoId[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_layer[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_eta[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_phi[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_side[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_errorhit[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_SyncronizationError[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_PreambleError[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_LVL1Error[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_BCIDError[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_FormatterError[24000];   //[sct_rdo_nhits]
   Float_t         sct_rdo_FirstSecondHitError[24000];   //[sct_rdo_nhits]
   Int_t           sct_nrobs;
   Int_t           sct_rob_robid[1000];   //[sct_nrobs]
   Int_t           sct_rob_lvl1id[1000];   //[sct_nrobs]
   Int_t           sct_rob_bcid[1000];   //[sct_nrobs]
   Int_t           sct_rob_timedelay[1000];   //[sct_nrobs]
   Int_t           trt_nrobs;
   Int_t           trt_rob_robid[1000];   //[sct_nrobs]
   Int_t           trt_rob_lvl1id[1000];   //[trt_nrobs]
   Int_t           trt_rob_bcid[1000];   //[sct_nrobs]
   Int_t           trt_rob_phasetime[1000];   //[sct_nrobs]
   Int_t           tdc_ntdcs;
   Int_t           tdc_channel[1000];   //[tdc_ntdcs]
   Float_t         tdc_phase[1000];   //[tdc_ntdcs]
   Int_t           adc_nadcs;
   Int_t           adc_channel[1000];   //[adc_nadcs]
   Float_t         adc_pulseheight[1000];   //[adc_nadcs]
   Int_t           sct_clus_nclusters;
   Float_t         sct_clus_x[24000];   //[sct_clus_nclusters]
   Float_t         sct_clus_y[24000];   //[sct_clus_nclusters]
   Float_t         sct_clus_z[24000];   //[sct_clus_nclusters]
   Int_t           sct_clus_groupsize[24000];   //[sct_clus_nclusters]
   Int_t           sct_clus_layer[24000];   //[sct_clus_nclusters]
   Int_t           sct_clus_eta[24000];   //[sct_clus_nclusters]
   Int_t           sct_clus_phi[24000];   //[sct_clus_nclusters]
   Int_t           sct_clus_side[24000];   //[sct_clus_nclusters]
   Int_t           pixel_clus_nclusters;
   Float_t         pixel_clus_LocX[24000];   //[pixel_clus_nclusters]
   Float_t         pixel_clus_LocY[24000];   //[pixel_clus_nclusters]
   Int_t           pixel_clus_groupsize[24000];   //[pixel_clus_nclusters]
   Int_t           pixel_clus_layer[24000];   //[pixel_clus_nclusters]
   Int_t           pixel_clus_phi[24000];   //[pixel_clus_nclusters]
   Int_t           sct_sp_nspacepoints;
   Float_t         sct_sp_x[12000];   //[sct_sp_nspacepoints]
   Float_t         sct_sp_y[12000];   //[sct_sp_nspacepoints]
   Float_t         sct_sp_z[12000];   //[sct_sp_nspacepoints]
   Int_t           sct_sp_layer[12000];   //[sct_sp_nspacepoints]
   Int_t           sct_sp_phi[12000];   //[sct_sp_nspacepoints]
   Int_t           pixel_sp_nspacepoints;
   Float_t         pixel_sp_x[12000];   //[pixel_sp_nspacepoints]
   Float_t         pixel_sp_y[12000];   //[pixel_sp_nspacepoints]
   Float_t         pixel_sp_z[12000];   //[pixel_sp_nspacepoints]
   Int_t           pixel_sp_layer[12000];   //[pixel_sp_nspacepoints]
   Int_t           pixel_sp_phi[12000];   //[pixel_sp_nspacepoints]

   // List of branches
   TBranch        *b_Run;   //!
   TBranch        *b_Event;   //!
   TBranch        *b_Time;   //!
   TBranch        *b_Weight;   //!
   TBranch        *b_IEvent;   //!
   TBranch        *b_sct_rdo_nhits;   //!
   TBranch        *b_sct_rdo_strips;   //!
   TBranch        *b_sct_rdo_tbin;   //!
   TBranch        *b_sct_rdo_rdoId;   //!
   TBranch        *b_sct_rdo_layer;   //!
   TBranch        *b_sct_rdo_eta;   //!
   TBranch        *b_sct_rdo_phi;   //!
   TBranch        *b_sct_rdo_side;   //!
   TBranch        *b_sct_rdo_errorhit;   //!
   TBranch        *b_sct_rdo_SyncronizationError;   //!
   TBranch        *b_sct_rdo_PreambleError;   //!
   TBranch        *b_sct_rdo_LVL1Error;   //!
   TBranch        *b_sct_rdo_BCIDError;   //!
   TBranch        *b_sct_rdo_FormatterError;   //!
   TBranch        *b_sct_rdo_FirstSecondHitError;   //!
   TBranch        *b_sct_nrobs;   //!
   TBranch        *b_sct_rob_robid;   //!
   TBranch        *b_sct_rob_lvl1id;   //!
   TBranch        *b_sct_rob_bcid;   //!
   TBranch        *b_sct_rob_timedelay;   //!
   TBranch        *b_trt_nrobs;   //!
   TBranch        *b_trt_rob_robid;   //!
   TBranch        *b_trt_rob_lvl1id;   //!
   TBranch        *b_trt_rob_bcid;   //!
   TBranch        *b_trt_rob_phasetime;   //!
   TBranch        *b_tdc_ntdcs;   //!
   TBranch        *b_tdc_channel;   //!
   TBranch        *b_tdc_phase;   //!
   TBranch        *b_adc_nadcs;   //!
   TBranch        *b_adc_channel;   //!
   TBranch        *b_adc_pulseheight;   //!
   TBranch        *b_sct_clus_nclusters;   //!
   TBranch        *b_sct_clus_x;   //!
   TBranch        *b_sct_clus_y;   //!
   TBranch        *b_sct_clus_z;   //!
   TBranch        *b_sct_clus_groupsize;   //!
   TBranch        *b_sct_clus_layer;   //!
   TBranch        *b_sct_clus_eta;   //!
   TBranch        *b_sct_clus_phi;   //!
   TBranch        *b_sct_clus_side;   //!
   TBranch        *b_pixel_clus_nclusters;   //!
   TBranch        *b_pixel_clus_LocX;   //!
   TBranch        *b_pixel_clus_LocY;   //!
   TBranch        *b_pixel_clus_groupsize;   //!
   TBranch        *b_pixel_clus_layer;   //!
   TBranch        *b_pixel_clus_phi;   //!
   TBranch        *b_sct_sp_nspacepoints;   //!
   TBranch        *b_sct_sp_x;   //!
   TBranch        *b_sct_sp_y;   //!
   TBranch        *b_sct_sp_z;   //!
   TBranch        *b_sct_sp_layer;   //!
   TBranch        *b_sct_sp_phi;   //!
   TBranch        *b_pixel_sp_nspacepoints;   //!
   TBranch        *b_pixel_sp_x;   //!
   TBranch        *b_pixel_sp_y;   //!
   TBranch        *b_pixel_sp_z;   //!
   TBranch        *b_pixel_sp_layer;   //!
   TBranch        *b_pixel_sp_phi;   //!

   PitCBNT(TTree *tree=0);
   virtual ~PitCBNT();
   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 PitCBNT_cxx
PitCBNT::PitCBNT(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("../../../PitCBNT/ntuplePit7977.root");
      if (!f) {
         f = new TFile("../../../PitCBNT/ntuplePit7977.root");
         f->cd("../../../PitCBNT/ntuplePit7977.root:/Cosmic");
      }
      tree = (TTree*)gDirectory->Get("tree");

   }
   Init(tree);
}

PitCBNT::~PitCBNT()
{
   if (!fChain) return;
   delete fChain->GetCurrentFile();
}

Int_t PitCBNT::GetEntry(Long64_t entry)
{
// Read contents of entry.
   if (!fChain) return 0;
   return fChain->GetEntry(entry);
}
Long64_t PitCBNT::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->IsA() != TChain::Class()) return centry;
   TChain *chain = (TChain*)fChain;
   if (chain->GetTreeNumber() != fCurrent) {
      fCurrent = chain->GetTreeNumber();
      Notify();
   }
   return centry;
}

void PitCBNT::Init(TTree *tree)
{
   // The Init() function is called when the selector needs to initialize
   // a new tree or chain. Typically here the branch addresses 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 with PROOF.

   // Set branch addresses
   if (tree == 0) return;
   fChain = tree;
   fCurrent = -1;
   fChain->SetMakeClass(1);

   fChain->SetBranchAddress("Run",&Run);
   fChain->SetBranchAddress("Event",&Event);
   fChain->SetBranchAddress("Time",&Time);
   fChain->SetBranchAddress("Weight",&Weight);
   fChain->SetBranchAddress("IEvent",&IEvent);
   fChain->SetBranchAddress("sct_rdo_nhits",&sct_rdo_nhits);
   fChain->SetBranchAddress("sct_rdo_strips",sct_rdo_strips);
   fChain->SetBranchAddress("sct_rdo_tbin",sct_rdo_tbin);
   fChain->SetBranchAddress("sct_rdo_rdoId",sct_rdo_rdoId);
   fChain->SetBranchAddress("sct_rdo_layer",sct_rdo_layer);
   fChain->SetBranchAddress("sct_rdo_eta",sct_rdo_eta);
   fChain->SetBranchAddress("sct_rdo_phi",sct_rdo_phi);
   fChain->SetBranchAddress("sct_rdo_side",sct_rdo_side);
   fChain->SetBranchAddress("sct_rdo_errorhit",sct_rdo_errorhit);
   fChain->SetBranchAddress("sct_rdo_SyncronizationError",sct_rdo_SyncronizationError);
   fChain->SetBranchAddress("sct_rdo_PreambleError",sct_rdo_PreambleError);
   fChain->SetBranchAddress("sct_rdo_LVL1Error",sct_rdo_LVL1Error);
   fChain->SetBranchAddress("sct_rdo_BCIDError",sct_rdo_BCIDError);
   fChain->SetBranchAddress("sct_rdo_FormatterError",sct_rdo_FormatterError);
   fChain->SetBranchAddress("sct_rdo_FirstSecondHitError",sct_rdo_FirstSecondHitError);
   fChain->SetBranchAddress("sct_nrobs",&sct_nrobs);
   fChain->SetBranchAddress("sct_rob_robid",sct_rob_robid);
   fChain->SetBranchAddress("sct_rob_lvl1id",sct_rob_lvl1id);
   fChain->SetBranchAddress("sct_rob_bcid",sct_rob_bcid);
   fChain->SetBranchAddress("sct_rob_timedelay",sct_rob_timedelay);
   fChain->SetBranchAddress("trt_nrobs",&trt_nrobs);
   fChain->SetBranchAddress("trt_rob_robid",trt_rob_robid);
   fChain->SetBranchAddress("trt_rob_lvl1id",trt_rob_lvl1id);
   fChain->SetBranchAddress("trt_rob_bcid",trt_rob_bcid);
   fChain->SetBranchAddress("trt_rob_phasetime",trt_rob_phasetime);
   fChain->SetBranchAddress("tdc_ntdcs",&tdc_ntdcs);
   fChain->SetBranchAddress("tdc_channel",tdc_channel);
   fChain->SetBranchAddress("tdc_phase",tdc_phase);
   fChain->SetBranchAddress("adc_nadcs",&adc_nadcs);
   fChain->SetBranchAddress("adc_channel",adc_channel);
   fChain->SetBranchAddress("adc_pulseheight",adc_pulseheight);
   fChain->SetBranchAddress("sct_clus_nclusters",&sct_clus_nclusters);
   fChain->SetBranchAddress("sct_clus_x",sct_clus_x);
   fChain->SetBranchAddress("sct_clus_y",sct_clus_y);
   fChain->SetBranchAddress("sct_clus_z",sct_clus_z);
   fChain->SetBranchAddress("sct_clus_groupsize",sct_clus_groupsize);
   fChain->SetBranchAddress("sct_clus_layer",sct_clus_layer);
   fChain->SetBranchAddress("sct_clus_eta",sct_clus_eta);
   fChain->SetBranchAddress("sct_clus_phi",sct_clus_phi);
   fChain->SetBranchAddress("sct_clus_side",sct_clus_side);
   fChain->SetBranchAddress("pixel_clus_nclusters",&pixel_clus_nclusters);
   fChain->SetBranchAddress("pixel_clus_LocX",pixel_clus_LocX);
   fChain->SetBranchAddress("pixel_clus_LocY",pixel_clus_LocY);
   fChain->SetBranchAddress("pixel_clus_groupsize",pixel_clus_groupsize);
   fChain->SetBranchAddress("pixel_clus_layer",pixel_clus_layer);
   fChain->SetBranchAddress("pixel_clus_phi",pixel_clus_phi);
   fChain->SetBranchAddress("sct_sp_nspacepoints",&sct_sp_nspacepoints);
   fChain->SetBranchAddress("sct_sp_x",sct_sp_x);
   fChain->SetBranchAddress("sct_sp_y",sct_sp_y);
   fChain->SetBranchAddress("sct_sp_z",sct_sp_z);
   fChain->SetBranchAddress("sct_sp_layer",sct_sp_layer);
   fChain->SetBranchAddress("sct_sp_phi",sct_sp_phi);
   fChain->SetBranchAddress("pixel_sp_nspacepoints",&pixel_sp_nspacepoints);
   fChain->SetBranchAddress("pixel_sp_x",pixel_sp_x);
   fChain->SetBranchAddress("pixel_sp_y",pixel_sp_y);
   fChain->SetBranchAddress("pixel_sp_z",pixel_sp_z);
   fChain->SetBranchAddress("pixel_sp_layer",pixel_sp_layer);
   fChain->SetBranchAddress("pixel_sp_phi",pixel_sp_phi);
   Notify();
}

Bool_t PitCBNT::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. Typically here the branch pointers
   // will be retrieved. It is normaly not necessary to make changes
   // to the generated code, but the routine can be extended by the
   // user if needed.

   // Get branch pointers
   b_Run = fChain->GetBranch("Run");
   b_Event = fChain->GetBranch("Event");
   b_Time = fChain->GetBranch("Time");
   b_Weight = fChain->GetBranch("Weight");
   b_IEvent = fChain->GetBranch("IEvent");
   b_sct_rdo_nhits = fChain->GetBranch("sct_rdo_nhits");
   b_sct_rdo_strips = fChain->GetBranch("sct_rdo_strips");
   b_sct_rdo_tbin = fChain->GetBranch("sct_rdo_tbin");
   b_sct_rdo_rdoId = fChain->GetBranch("sct_rdo_rdoId");
   b_sct_rdo_layer = fChain->GetBranch("sct_rdo_layer");
   b_sct_rdo_eta = fChain->GetBranch("sct_rdo_eta");
   b_sct_rdo_phi = fChain->GetBranch("sct_rdo_phi");
   b_sct_rdo_side = fChain->GetBranch("sct_rdo_side");
   b_sct_rdo_errorhit = fChain->GetBranch("sct_rdo_errorhit");
   b_sct_rdo_SyncronizationError = fChain->GetBranch("sct_rdo_SyncronizationError");
   b_sct_rdo_PreambleError = fChain->GetBranch("sct_rdo_PreambleError");
   b_sct_rdo_LVL1Error = fChain->GetBranch("sct_rdo_LVL1Error");
   b_sct_rdo_BCIDError = fChain->GetBranch("sct_rdo_BCIDError");
   b_sct_rdo_FormatterError = fChain->GetBranch("sct_rdo_FormatterError");
   b_sct_rdo_FirstSecondHitError = fChain->GetBranch("sct_rdo_FirstSecondHitError");
   b_sct_nrobs = fChain->GetBranch("sct_nrobs");
   b_sct_rob_robid = fChain->GetBranch("sct_rob_robid");
   b_sct_rob_lvl1id = fChain->GetBranch("sct_rob_lvl1id");
   b_sct_rob_bcid = fChain->GetBranch("sct_rob_bcid");
   b_sct_rob_timedelay = fChain->GetBranch("sct_rob_timedelay");
   b_trt_nrobs = fChain->GetBranch("trt_nrobs");
   b_trt_rob_robid = fChain->GetBranch("trt_rob_robid");
   b_trt_rob_lvl1id = fChain->GetBranch("trt_rob_lvl1id");
   b_trt_rob_bcid = fChain->GetBranch("trt_rob_bcid");
   b_trt_rob_phasetime = fChain->GetBranch("trt_rob_phasetime");
   b_tdc_ntdcs = fChain->GetBranch("tdc_ntdcs");
   b_tdc_channel = fChain->GetBranch("tdc_channel");
   b_tdc_phase = fChain->GetBranch("tdc_phase");
   b_adc_nadcs = fChain->GetBranch("adc_nadcs");
   b_adc_channel = fChain->GetBranch("adc_channel");
   b_adc_pulseheight = fChain->GetBranch("adc_pulseheight");
   b_sct_clus_nclusters = fChain->GetBranch("sct_clus_nclusters");
   b_sct_clus_x = fChain->GetBranch("sct_clus_x");
   b_sct_clus_y = fChain->GetBranch("sct_clus_y");
   b_sct_clus_z = fChain->GetBranch("sct_clus_z");
   b_sct_clus_groupsize = fChain->GetBranch("sct_clus_groupsize");
   b_sct_clus_layer = fChain->GetBranch("sct_clus_layer");
   b_sct_clus_eta = fChain->GetBranch("sct_clus_eta");
   b_sct_clus_phi = fChain->GetBranch("sct_clus_phi");
   b_sct_clus_side = fChain->GetBranch("sct_clus_side");
   b_pixel_clus_nclusters = fChain->GetBranch("pixel_clus_nclusters");
   b_pixel_clus_LocX = fChain->GetBranch("pixel_clus_LocX");
   b_pixel_clus_LocY = fChain->GetBranch("pixel_clus_LocY");
   b_pixel_clus_groupsize = fChain->GetBranch("pixel_clus_groupsize");
   b_pixel_clus_layer = fChain->GetBranch("pixel_clus_layer");
   b_pixel_clus_phi = fChain->GetBranch("pixel_clus_phi");
   b_sct_sp_nspacepoints = fChain->GetBranch("sct_sp_nspacepoints");
   b_sct_sp_x = fChain->GetBranch("sct_sp_x");
   b_sct_sp_y = fChain->GetBranch("sct_sp_y");
   b_sct_sp_z = fChain->GetBranch("sct_sp_z");
   b_sct_sp_layer = fChain->GetBranch("sct_sp_layer");
   b_sct_sp_phi = fChain->GetBranch("sct_sp_phi");
   b_pixel_sp_nspacepoints = fChain->GetBranch("pixel_sp_nspacepoints");
   b_pixel_sp_x = fChain->GetBranch("pixel_sp_x");
   b_pixel_sp_y = fChain->GetBranch("pixel_sp_y");
   b_pixel_sp_z = fChain->GetBranch("pixel_sp_z");
   b_pixel_sp_layer = fChain->GetBranch("pixel_sp_layer");
   b_pixel_sp_phi = fChain->GetBranch("pixel_sp_phi");

   return kTRUE;
}

void PitCBNT::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
   if (!fChain) return;
   fChain->Show(entry);
}
Int_t PitCBNT::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns  1 if entry is accepted.
// returns -1 otherwise.
   return 1;
}
#endif // #ifdef PitCBNT_cxx
