Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:12:31

0001 //////////////////////////////////////////////////////////
0002 // This class has been automatically generated on
0003 // Sun Mar  3 01:33:24 2024 by ROOT version 6.26/06
0004 // from TTree EventTree/EventTree
0005 // found on file: /gpfs/mnt/gpfs02/sphenix/user/cdean/software/analysis/dNdEta_Run2023/macros/intt_run20869.root
0006 //////////////////////////////////////////////////////////
0007 
0008 #ifndef ReadINTTDSTv1_h
0009 #define ReadINTTDSTv1_h
0010 
0011 #include <TROOT.h>
0012 #include <TChain.h>
0013 #include <TFile.h>
0014 
0015 // Header file for the classes stored in the TTree if any.
0016 #include "vector"
0017 #include "vector"
0018 #include "vector"
0019 #include "vector"
0020 
0021 class ReadINTTDSTv1 {
0022 public :
0023    TTree          *fChain;   //!pointer to the analyzed TTree or TChain
0024    Int_t           fCurrent; //!current Tree number in a TChain
0025 
0026 // Fixed size dimensions of array or collections stored in the TTree if any.
0027 
0028    // Declaration of leaf types
0029    Int_t           event_counter;
0030    ULong_t         INTT_BCO;
0031    Int_t           NClus_Layer1;
0032    Int_t           NClus;
0033    vector<int>     *ClusLayer;
0034    vector<float>   *ClusX;
0035    vector<float>   *ClusY;
0036    vector<float>   *ClusZ;
0037    vector<float>   *ClusR;
0038    vector<float>   *ClusPhi;
0039    vector<float>   *ClusEta;
0040    vector<unsigned int> *ClusAdc;
0041    vector<float>   *ClusPhiSize;
0042    vector<float>   *ClusZSize;
0043    vector<unsigned char> *ClusLadderZId;
0044    vector<unsigned char> *ClusLadderPhiId;
0045    vector<unsigned int> *ClusTrkrHitSetKey;
0046    vector<int>     *ClusTimeBucketId;
0047 
0048    // List of branches
0049    TBranch        *b_event_counter;   //!
0050    TBranch        *b_INTT_BCO;   //!
0051    TBranch        *b_NClus_Layer1;   //!
0052    TBranch        *b_NClus;   //!
0053    TBranch        *b_ClusLayer;   //!
0054    TBranch        *b_ClusX;   //!
0055    TBranch        *b_ClusY;   //!
0056    TBranch        *b_ClusZ;   //!
0057    TBranch        *b_ClusR;   //!
0058    TBranch        *b_ClusPhi;   //!
0059    TBranch        *b_ClusEta;   //!
0060    TBranch        *b_ClusAdc;   //!
0061    TBranch        *b_ClusPhiSize;   //!
0062    TBranch        *b_ClusZSize;   //!
0063    TBranch        *b_ClusLadderZId;   //!
0064    TBranch        *b_ClusLadderPhiId;   //!
0065    TBranch        *b_ClusTrkrHitSetKey;   //!
0066    TBranch        *b_ClusTimeBucketId;   //!
0067 
0068    ReadINTTDSTv1(TTree *tree=0);
0069    virtual ~ReadINTTDSTv1();
0070    virtual Int_t    Cut(Long64_t entry);
0071    virtual Int_t    GetEntry(Long64_t entry);
0072    virtual Long64_t LoadTree(Long64_t entry);
0073    virtual void     Init(TTree *tree);
0074    virtual void     Loop();
0075    virtual Bool_t   Notify();
0076    virtual void     Show(Long64_t entry = -1);
0077 };
0078 
0079 #endif
0080 
0081 #ifdef ReadINTTDSTv1_cxx
0082 ReadINTTDSTv1::ReadINTTDSTv1(TTree *tree) : fChain(0) 
0083 {
0084 // if parameter tree is not specified (or zero), connect the file
0085 // used to generate this class and read the Tree.
0086    if (tree == 0) {
0087       TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/gpfs/mnt/gpfs02/sphenix/user/cdean/software/analysis/dNdEta_Run2023/macros/intt_run20869.root");
0088       if (!f || !f->IsOpen()) {
0089          f = new TFile("/gpfs/mnt/gpfs02/sphenix/user/cdean/software/analysis/dNdEta_Run2023/macros/intt_run20869.root");
0090       }
0091       f->GetObject("EventTree",tree);
0092 
0093    }
0094    Init(tree);
0095 }
0096 
0097 ReadINTTDSTv1::~ReadINTTDSTv1()
0098 {
0099    if (!fChain) return;
0100    delete fChain->GetCurrentFile();
0101 }
0102 
0103 Int_t ReadINTTDSTv1::GetEntry(Long64_t entry)
0104 {
0105 // Read contents of entry.
0106    if (!fChain) return 0;
0107    return fChain->GetEntry(entry);
0108 }
0109 Long64_t ReadINTTDSTv1::LoadTree(Long64_t entry)
0110 {
0111 // Set the environment to read one entry
0112    if (!fChain) return -5;
0113    Long64_t centry = fChain->LoadTree(entry);
0114    if (centry < 0) return centry;
0115    if (fChain->GetTreeNumber() != fCurrent) {
0116       fCurrent = fChain->GetTreeNumber();
0117       Notify();
0118    }
0119    return centry;
0120 }
0121 
0122 void ReadINTTDSTv1::Init(TTree *tree)
0123 {
0124    // The Init() function is called when the selector needs to initialize
0125    // a new tree or chain. Typically here the branch addresses and branch
0126    // pointers of the tree will be set.
0127    // It is normally not necessary to make changes to the generated
0128    // code, but the routine can be extended by the user if needed.
0129    // Init() will be called many times when running on PROOF
0130    // (once per file to be processed).
0131 
0132    // Set object pointer
0133    ClusLayer = 0;
0134    ClusX = 0;
0135    ClusY = 0;
0136    ClusZ = 0;
0137    ClusR = 0;
0138    ClusPhi = 0;
0139    ClusEta = 0;
0140    ClusAdc = 0;
0141    ClusPhiSize = 0;
0142    ClusZSize = 0;
0143    ClusLadderZId = 0;
0144    ClusLadderPhiId = 0;
0145    ClusTrkrHitSetKey = 0;
0146    ClusTimeBucketId = 0;
0147    // Set branch addresses and branch pointers
0148    if (!tree) return;
0149    fChain = tree;
0150    fCurrent = -1;
0151    fChain->SetMakeClass(1);
0152 
0153    fChain->SetBranchAddress("event_counter", &event_counter, &b_event_counter);
0154    fChain->SetBranchAddress("INTT_BCO", &INTT_BCO, &b_INTT_BCO);
0155    fChain->SetBranchAddress("NClus_Layer1", &NClus_Layer1, &b_NClus_Layer1);
0156    fChain->SetBranchAddress("NClus", &NClus, &b_NClus);
0157    fChain->SetBranchAddress("ClusLayer", &ClusLayer, &b_ClusLayer);
0158    fChain->SetBranchAddress("ClusX", &ClusX, &b_ClusX);
0159    fChain->SetBranchAddress("ClusY", &ClusY, &b_ClusY);
0160    fChain->SetBranchAddress("ClusZ", &ClusZ, &b_ClusZ);
0161    fChain->SetBranchAddress("ClusR", &ClusR, &b_ClusR);
0162    fChain->SetBranchAddress("ClusPhi", &ClusPhi, &b_ClusPhi);
0163    fChain->SetBranchAddress("ClusEta", &ClusEta, &b_ClusEta);
0164    fChain->SetBranchAddress("ClusAdc", &ClusAdc, &b_ClusAdc);
0165    fChain->SetBranchAddress("ClusPhiSize", &ClusPhiSize, &b_ClusPhiSize);
0166    fChain->SetBranchAddress("ClusZSize", &ClusZSize, &b_ClusZSize);
0167    fChain->SetBranchAddress("ClusLadderZId", &ClusLadderZId, &b_ClusLadderZId);
0168    fChain->SetBranchAddress("ClusLadderPhiId", &ClusLadderPhiId, &b_ClusLadderPhiId);
0169    fChain->SetBranchAddress("ClusTrkrHitSetKey", &ClusTrkrHitSetKey, &b_ClusTrkrHitSetKey);
0170    fChain->SetBranchAddress("ClusTimeBucketId", &ClusTimeBucketId, &b_ClusTimeBucketId);
0171    Notify();
0172 }
0173 
0174 Bool_t ReadINTTDSTv1::Notify()
0175 {
0176    // The Notify() function is called when a new file is opened. This
0177    // can be either for a new TTree in a TChain or when when a new TTree
0178    // is started when using PROOF. It is normally not necessary to make changes
0179    // to the generated code, but the routine can be extended by the
0180    // user if needed. The return value is currently not used.
0181 
0182    return kTRUE;
0183 }
0184 
0185 void ReadINTTDSTv1::Show(Long64_t entry)
0186 {
0187 // Print contents of entry.
0188 // If entry is not specified, print current entry
0189    if (!fChain) return;
0190    fChain->Show(entry);
0191 }
0192 Int_t ReadINTTDSTv1::Cut(Long64_t entry)
0193 {
0194 // This function may be called from Loop.
0195 // returns  1 if entry is accepted.
0196 // returns -1 otherwise.
0197    return 1;
0198 }
0199 #endif // #ifdef ReadINTTDSTv1_cxx