/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Protected Member Functions | Protected Attributes
PerMuonRecSimple Class Reference

#include <PerMuonRecSimple.h>

Inheritance diagram for PerMuonRecSimple:
Inheritance graph
[legend]
Collaboration diagram for PerMuonRecSimple:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PerMuonRecSimple (TTree *tree)
virtual ~PerMuonRecSimple ()
virtual DataSecToTran (long entry, int iFile, long iEvent)

Protected Member Functions

void init ()

Protected Attributes

TTree * fChain
std::map< long, long > * imap
std::vector< int > * DetectorId
int EndIndex
int FiredDet
int Flag
int IWSNhit
int OWSNhit
std::vector< float > * PointX
std::vector< float > * PointY
std::vector< float > * PointZ
int StartIndex

Detailed Description

Definition at line 8 of file PerMuonRecSimple.h.


Constructor & Destructor Documentation

PerMuonRecSimple::PerMuonRecSimple ( TTree *  tree)

Definition at line 4 of file PerMuonRecSimple.cc.

    : fChain(tree),
      imap(0)
{
}
PerMuonRecSimple::~PerMuonRecSimple ( ) [virtual]

Definition at line 10 of file PerMuonRecSimple.cc.

{
    delete [] imap;
}

Member Function Documentation

DataSec * PerMuonRecSimple::ToTran ( long  entry,
int  iFile,
long  iEvent 
) [virtual]

Implements IPerDataSec.

Definition at line 15 of file PerMuonRecSimple.cc.

{
    if ( imap == 0 ) init();

    DataSec* obj = 0;
    std::map<long, long>::iterator it = imap[iFile].find(iEvent);
    if ( it != imap[iFile].end() && fChain->GetEntry(it->second) > 0 ) {
        obj = new MuonRecSimple(*this);
    }
    return obj;
}
void PerMuonRecSimple::init ( ) [protected]

Definition at line 27 of file PerMuonRecSimple.cc.

{
    TChain* ftmp = dynamic_cast<TChain*>(fChain);
    imap = new std::map<long, long>[ftmp->GetNtrees()];

    fChain->SetMakeClass(1);
    // skip the unnecessary branches
    UInt_t nBr = 0;
    fChain->SetBranchStatus("*", 0, &nBr);

    // initialize the execNumber map
    int en;
    fChain->SetBranchAddress("execNumber", &en);

    long nn = fChain->GetEntries();
    for ( long i = 0; i < nn; ++i ) {
        fChain->GetEntry(i);
        imap[fChain->GetTreeNumber()][en] = i;
    }

    // initialize the class vars
    fChain->SetBranchStatus("*", 0, &nBr);
    fChain->SetBranchAddress("DetectorId", &DetectorId);
    fChain->SetBranchAddress("EndIndex",   &EndIndex);
    fChain->SetBranchAddress("FiredDet",   &FiredDet);
    fChain->SetBranchAddress("Flag",       &Flag);
    fChain->SetBranchAddress("IWSNhit",    &IWSNhit);
    fChain->SetBranchAddress("OWSNhit",    &OWSNhit);
    fChain->SetBranchAddress("PointX",     &PointX);
    fChain->SetBranchAddress("PointY",     &PointY);
    fChain->SetBranchAddress("PointZ",     &PointZ);
    fChain->SetBranchAddress("StartIndex", &StartIndex);
}

Member Data Documentation

TTree* PerMuonRecSimple::fChain [protected]

Definition at line 21 of file PerMuonRecSimple.h.

std::map<long, long>* PerMuonRecSimple::imap [protected]

Definition at line 23 of file PerMuonRecSimple.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:51:07 for ReconInputSvc by doxygen 1.7.4